[U-Boot-Users] multiple i2c controllers

I've been looking into adding support for a system that has 2 i2c controllers accessible by the processor to u-boot. Has anyone done something like this? Does u-boot's current i2c infrastructure support the idea of two separate i2c busses?
Thanks, Andy Fleming

Dear Andy,
in message 2acbd3e404090213583c7c9e6@mail.gmail.com you wrote:
I've been looking into adding support for a system that has 2 i2c controllers accessible by the processor to u-boot. Has anyone done something like this? Does u-boot's current i2c infrastructure support the idea of two separate i2c busses?
No, this is not supported yet. But I think it should be possible to add this in a compatible way.
For example, we could use a notation of "[bus:]chip" addresses so the existing commands in the i2* family will continue to work on systems with a single I2C bus, and on multi-bus systems you just add the bus number to the device address separated by a colon. For example, to address the device with chip address 0x50 on bus 1 you would type "imd 1:50 ..."; omitting the bus specifier would access the default I2C bus. For simplicity, we can define that this is the same as bus 0 always. If you have time to play around, you could add a default bus environment variable.
This would also work for example with the eeprom command; we could use the "bus:" extension in the offset part, like:
eeprom read 100000 1:400 100
What do you think?
Best regards,
Wolfgang Denk
participants (2)
-
Andy Fleming
-
Wolfgang Denk