News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TEBF0808 - Access I2C EEPROM

Started by koju155, April 13, 2017, 11:25:17 AM

Previous topic - Next topic

koju155

I can't access the I2C EEPROM at address 0x54 (https://wiki.trenz-electronic.de/display/PD/TEBF0808#TEBF0808-I2CBuses ) from U-Boot.

I have following behavior in U-Boot:

i2c dev 0
Setting bus to 0
i2c probe
Valid chip addresses: 73 77
i2c dev 1
Setting bus to 1
i2c probe
Valid chip addresses:


This is strange as according to the device tree there shouldn't be any device at the first i2c bus, whereas the EEPROM is supposed to be at the second at address 0x54.

Oleksandr Kiyenko

Hello,

At TEBF0808 almost all I2C devices is behind I2C switches, so to access it switch should be programmed first.
At bus 0 you see 2 switches at addresses 73 and 77 all other devices is behind this switches. To access EEPROM you have to use bus 6 in linux (bus number depend on device tree configuration), newest u-boot can also support bus multiplexor. Driver will automatically configure switch.
Alternative way is to enable bit 5 in switch 73 control register to enable access to corresponding I2C bus.

Best regards
Oleksandr Kiyenko