This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6548: AM6548 I2C Bus Issue

Part Number: AM6548

Hi TI,

SDK : 8.02

We have connected 5 devices on I2C bus 5 (main_i2c3) on AM654 controller. We have connected 5 EEPROMS on this. EEPROMS are properly getting detected in uboot on power cycle and also on runtime if we remove or add the device. 

Uboot Logs

=> i2c dev 5
Setting bus to 5
=> i2c probe
Valid chip addresses: 52 53 54 55 56

But from Linux side we see inconsistent behavior for this. with the 5 devices connected we dont see any i2c device using i2cdetect command. nor with i2c driver.

Boot logs :

[ 0.401038] pca953x 0-0038: supply vcc not found, using dummy regulator
[ 0.401192] pca953x 0-0038: using no AI
[ 0.425369] omap_i2c 42120000.i2c: bus 0 rev0.12 at 400 kHz
[ 0.426653] omap_i2c 40b00000.i2c: bus 1 rev0.12 at 100 kHz
[ 0.428143] pca953x 2-0021: supply vcc not found, using dummy regulator
[ 0.428279] pca953x 2-0021: using no AI
[ 0.453900] rtc-ds1307 2-0068: SET TIME!
[ 0.454666] rtc-ds1307 2-0068: registered as rtc0
[ 0.454998] rtc-ds1307 2-0068: setting system clock to 2000-01-01T00:00:05 UTC (946684805)
[ 0.455543] omap_i2c 2000000.i2c: bus 2 rev0.12 at 400 kHz
[ 0.456737] omap_i2c 2010000.i2c: bus 3 rev0.12 at 400 kHz
[ 0.457817] omap_i2c 2020000.i2c: bus 4 rev0.12 at 400 kHz
[ 0.460079] omap_i2c 2030000.i2c: bus 5 rev0.12 at 400 kHz

Here you can see other bus i2c devices are getting detected but on 5th bus no i2c device is detected

i2c detect logs:

~ # i2cdetect -y 5
i2cdetect: warning: can't use SMBus quick write command, will skip some addresses
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: -- -- -- -- -- -- -- --
40:
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60:
70:

But when we remove 1 device i.e. now total 4 devices on i2c we see 4 are getting detected properly.

Boot Logs:

[ 14.068483] at24 0-0050: supply vcc not found, using dummy regulator
[ 14.075679] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 14.083234] at24 5-0056: supply vcc not found, using dummy regulator
[ 14.119565] at24 5-0055: supply vcc not found, using dummy regulator
[ 14.126733] at24 5-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 14.133985] at24 5-0054: supply vcc not found, using dummy regulator
[ 14.141074] at24 5-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 14.148436] at24 5-0053: supply vcc not found, using dummy regulator
[ 14.155564] at24 5-0053: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 14.162851] at24 5-0052: supply vcc not found, using dummy regulator
[ 15.019789] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0x65
[ 15.027585] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.HC addr 0x66
[ 15.034631] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
[ 15.042105] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.HC addr 0xf
[ 17.220412] omap_i2c 2030000.i2c: controller timed out

i2cdetect logs :

~ # i2cdetect -y 5
i2cdetect: warning: can't use SMBus quick write command, will skip some addresses
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30: -- -- -- -- -- -- -- --
40:
50: -- -- 52 UU UU UU -- -- -- -- -- -- -- -- -- --
60:
70:

Here you can see the log of omap_i2c 2030000.i2c: controller timed out  

Can you let me know how can we fix this ?

Regards,

Sarfaraz

  • Hello Sarfaraz,

    Interesting.

    1) What is the part number of the EEPROM you are using? I would like to confirm that this EEPROM can actually program in 5 different I2C addresses, instead of being limited to just 4

    2) How are you "removing" a device? e.g., by deleting the Linux devicetree node? By physically modifying the board?

    3) Does it make a difference with which EEPROM device gets removed? i.e., does removing ANY of the 5 allow the other 4 to be observed, or does it only work when a specific EEPROM gets removed?

    4) Please attach the associated devicetree nodes

    Regards,

    Nick

  • Hi Nick,

    Thanks for looking into this. 

    1. 24LC256T-E/SN is the extact part number we are using this is same part number for all eeproms. I dont think this limits to 4 devices as in uboot we are able to detect all devices without any error as posted in logs above. 

    2. this is a stacked up boards which has 5 eeproms (5 different boards) we can remove and add the device (boards) run time so uboot detects the addition / removing of devices at runtime. 

    3. we cannot remove board from between layers as all are stacked up on each other.

    4. node code is here. 

    &main_i2c3 {
    pinctrl-names = "default";
    pinctrl-0 = <&main_i2c3_pins_default>;
    clock-frequency = <400000>;

    eeprom_ser2: eeprom@56 {
    compatible = "atmel,24c256";
    reg = <0x56>;
    };
    eeprom_ser1_ser2: eeprom@55 {
    compatible = "atmel,24c256";
    reg = <0x55>;
    };
    eeprom_hsvm_ser1: eeprom@54 {
    compatible = "atmel,24c256";
    reg = <0x54>;
    };
    eeprom_psio: eeprom@53 {
    compatible = "atmel,24c256";
    reg = <0x53>;
    };
    eeprom_ssm: eeprom@52 {
    compatible = "atmel,24c256";
    reg = <0x52>;
    };
    eeprom_ftmk: eeprom@50 {
    compatible = "atmel,24c256";
    reg = <0x50>;
    };
    };

  • Hello Sarfaraz,

    Ok the datasheet confirms that up to 8 of those EEPROMs can be on the same bus (except for certain packages, which only allow for 2 devices on the same bus, so you must not be using that one).

    Could you attach a picture of what the board stack looks like? I want to make sure I understand what you are working with.

    If I understand properly, your boards are stacked like this:
    EEPROM1
    EEPROM2
    EEPROM3
    EEPROM4
    EEPROM5
    Your custom board

    And you can remove either EEPROM1 from the stack, or EEPROM5 from the stack? Does it work with 4 EEPROMs if either of those EEPROM boards are removed, or only if a specific EEPROM board is removed?

    Regards,

    Nick