Project

General

Profile

I2C0 Bus Access in U-Boot

Currently U-Boot only has the necessary pins-muxed into operation for a 335x module. In this case that means that I2C1 is accessible which is connected to the factory configuration EEPROM and the PMIC. In order to use any devices attached to I2C0 you must write to the pin-mux configuration register from U-Boot to enable that I2C interface. This is useful for example if you want to access the current monitor IC on the 335x Development Kit PCB from U-Boot.

From a U-Boot prompt setup the pin-mux register for I2C0

U-Boot# mw.w 44e10988 68
U-Boot#mw.w 44e1098c 68

Then select the I2C0 bus and reset it

U-Boot# i2c dev 0
Setting bus to 0
U-Boot# i2c reset

At this point it is possible to read/write from the bus now. Here is an example of reading/writing to the current monitor on the 335x dev board

U-Boot# i2c md 48 0
0000: 01 fb 80 ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

Go to top
Add picture from clipboard (Maximum size: 1 GB)