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.

TDA2SX: getting error logs at MLO & unable to write in to EEPROM

Part Number: TDA2SX

Hi all,

I am working on tda2sx processor with my custom board.I am getting the below errors at MLO log.

U-Boot SPL  DEBUGGING START in hwinit_common.c
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus are properly configured
ti_i2c_eeprom_init failed 1
1150 -> optimize_vcore_voltage:efuse 0x4a003b20 bits=16 Vnom=1150, using efuse value 1070
1070
1150 -> optimize_vcore_voltage:efuse 0x4a0025f4 bits=16 Vnom=1150, using efuse value 1045
1045
0 -> 0
1250 -> optimize_vcore_voltage:efuse 0x4a003b10 bits=16 Vnom=1250, using efuse value 1075
1075
1250 -> optimize_vcore_voltage:efuse 0x4a0025e8 bits=16 Vnom=1250, using efuse value 1075
1075
1250 -> optimize_vcore_voltage:efuse 0x4a0025d4 bits=16 Vnom=1250, using efuse value 1099
1099
cor: 1045
do_scale_vcore: volt - 1045 offset_code - 0x3d
i2c_write: pads on bus probably not configured (status=0x10)
Scaling voltage failed for 0x33
IODELAY: IO delay recalibration successfully completed
mpu: 1070
do_scale_vcore: volt - 1070 offset_code - 0x3f
i2c_write: pads on bus probably not configured (status=0x10)
Scaling voltage failed for 0x23
mm: 0
gpu: 1075
do_scale_vcore: volt - 1075 offset_code - 0x40
i2c_write: pads on bus probably not configured (status=0x10)
Scaling voltage failed for 0x2f
eve: 1075
do_scale_vcore: volt - 1075 offset_code - 0x40
i2c_write: pads on bus probably not configured (status=0x10)
Scaling voltage failed for 0x2b
iva: 1099
do_scale_vcore: volt - 1099 offset_code - 0x42
i2c_write: pads on bus probably not configured (status=0x10)
Scaling voltage failed for 0x37
setup_dplls

 core Dpll locked, but not for ideal M = 266,N = 4 values, current values are M = 532,N= 9Core DPLL configured

 per Dpll locked, but not for ideal M = 96,N = 4 values, current values are M = 1920,N= �NN�Q��DPLL locked

I am using vision sdk 03.04 sdk version.

Could you please help me to solve this issue.

I am unable to write data in to EEPROM.but the chip is detecting at the chip address.

Thanks & Regards,

A.Kavya Harini

  • Hello Kavya Harini,

    May i know the i2c bus to which the EEPROM is connected to on your custom board?
    What is the slave ID on that?

    You can try to access the eeprom at u-boot prompt.
    Can you read/write in u-boot prompt using i2c md/mw commands?

    Regards,
    Keerthy

  • Hi Keerthy,

    The i2c bus is 0(i2c-1 interface).Thechip address is 0x54

    Yes,I tried it at u-boot propmpt.I am able to read the data in it,but not able to write anything.

    I enabled the write enable of EEPROM also.but still it is not able to write anything.

    In MLO code I added this below code,

    ret = gpio_request(241,VOUT1_D17);
            if (ret < 0) {
                    printf("Unable to get GPIO %d\n", VOUT1_D17);
            }

            /* Configure as output */
            gpio_direction_output(241, 0);

            /* Send a pulse on the GPIO pin */
            gpio_set_value(241, 1);

    Even I tried with i2cset from root prompt also.But no Luck.

    Please help me to solve this issue.

    Thanks & Regards,

    A.Kavya Harini.

  • Hi Kavya Harini,

    Have you changed the slave-id in the u-boot code?

    file: board/ti/common/Kconfig

    config EEPROM_BUS_ADDRESS
            int "Board EEPROM's I2C bus address"
            range 0 8
            default 0

    The above is fine.


    config EEPROM_CHIP_ADDRESS
            hex "Board EEPROM's I2C chip address"
            range 0 0xff
            default 0x50

    Above is 0x54 as you have mentioned right?

    If there is nothing on slave ID 0x50 then ti_i2c_eeprom_am_get will error out saying:
    ti_i2c_eeprom_init failed %d

    Also please share the outputs of your i2c commands for reading and writing in u-boot.


    Best Regards,
    Keerthy

  • Hi Keerthy,

    I am sorry for the late reply,I am busy with other works.

    Below is the log which are tested at u-boot prompt.

    => i2c dev 0
    Setting bus to 0
    => i2c probe 0x54
    Valid chip addresses: 54
    => i2c md 0x50 0.2 0x10
    i2c_write: error waiting for data ACK (status=0x116)
    Error reading the chip: -121
    => i2c speed
    Current bus speed=400000
    => i2c read 0x50 0.2 0x10 0x82000000
    i2c_write: error waiting for data ACK (status=0x116)
    Error reading the chip: -121
    => i2c mw 0x50 23.2 0x0
    i2c_write: error waiting for data ACK (status=0x116)
    Error writing the chip: -121

    Sometimes the error messages are not coming,but still it's not writing in to flash.

    I tried with both ways of enabling & disabling the write protect pin of eeprom.still no luck.

    ----> Have you changed the slave-id in the u-boot code?

    yes,I have changed.If i didn't change the chip itself is not detected.My EEPROM chip is detecting on the i2c bus 0.

    Thanks & Regards,

    A. Kavya Harini

  • Hello Kavya Harini,

    Apologies for the delay in responding. i2c md should have worked at the very least.
    Can you access any other i2c slave registers in u-boot? Like PMIC or any other known slave.

    This is to rule out basic pin muxing issues for i2c.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Can you access any other i2c slave registers in u-boot? Like PMIC or any other known slave.

    Yes PMIC is working, but i have observed some error logs while setting voltages to PMIC.

    Below are the logs;

    U-Boot SPL  DEBUGGING START in hwinit_common.c
    ***********In ti_i2c_eeprom_init after set_bus_num rc=0*********
    ***************i2c probe ********
    Timed out in wait_for_event: status=0000
    Check if pads/pull-ups of bus are properly configured
    ***********ti_i2c_eeprom_get rc=1*********
    ******rc=1
    ti_i2c_eeprom_init failed 1
    1150 -> optimize_vcore_voltage:efuse 0x4a003b20 bits=16 Vnom=1150, using efuse value 1070
    1070
    1150 -> optimize_vcore_voltage:efuse 0x4a0025f4 bits=16 Vnom=1150, using efuse value 1045
    1045
    0 -> 0
    1060 -> optimize_vcore_voltage:efuse 0x4a003b08 bits=16 Vnom=1060, using efuse value 1004
    1004
    1060 -> optimize_vcore_voltage:efuse 0x4a0025e0 bits=16 Vnom=1060, using efuse value 990
    990
    1060 -> optimize_vcore_voltage:efuse 0x4a0025cc bits=16 Vnom=1060, using efuse value 1005
    1005
    cor: 1045
    do_scale_vcore: volt - 1045 offset_code - 0x3d
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x33
    IODELAY: IO delay recalibration successfully completed
    mpu: 1070
    do_scale_vcore: volt - 1070 offset_code - 0x3f
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x23
    mm: 0
    gpu: 1004
    do_scale_vcore: volt - 1004 offset_code - 0x39
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x2f
    eve: 990
    do_scale_vcore: volt - 990 offset_code - 0x37
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x2b
    iva: 1005
    do_scale_vcore: volt - 1005 offset_code - 0x39
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x37
    setup_dplls

    Even though these errors are coming at uboot, but still PMIC is working.

    We have another audio codec IC(speaker) connected to i2c-1 only. That slave is also working.

    Only facing issue with EEPROM.

    Another thing I want to share one information with you that, with the same software our previous revision Boards are working. This problem is observing in the second revision of hardware boards.

    Could you please tell me, whether IO delay calibration will effect and getting these type of issues?

    Because according to schematics both first and second revisions are same.

    Please help me to solve this issue.

    Thanks & Regards,

    A. Kavya Harini.

  • Hello Kavya Harini,

    Can you tell us the difference between the working & non-working versions of boards?

    I2C1 padconfigs are set up early:

    Check this:

    File: arch/arm/mach-omap2/hwinit-common.c

    early_system_init --> set_mux_conf_regs --> set_muxconf_regs

    The above function in board/ti/dra7xx/evm.c early_padconf

    const struct pad_conf_entry early_padconf[] = {
            {UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */
            {UART1_TXD, (PIN_INPUT_SLEW | M0)}, /* UART1_TXD */
            {UART3_RXD, (PIN_INPUT_SLEW | M0)}, /* UART3_RXD */
            {UART3_TXD, (PIN_INPUT_SLEW | M0)}, /* UART3_TXD */
            {I2C1_SDA, (PIN_INPUT | M0)},   /* I2C1_SDA */
            {I2C1_SCL, (PIN_INPUT | M0)},   /* I2C1_SCL */
    };

    Please make sure that I2C1_SDA/SDL are set up as per above definitions. Hope i2c pinmuxing did not change
    between working & non working boards.

    On my board:

    CTRL_CORE_PAD_I2C1_SDA & CTRL_CORE_PAD_I2C1_SCL read as below:

    =md 0x4a003800 1
    4a003800: 00050000                               ....
    => md 0x4a003804 1
    4a003804: 00050000 

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Can you tell us the difference between the working & non-working versions of boards?

    There is no difference between working and non-working with respect to EEPROM (according to schematic). But I don't know w.r.t the layout design.

    One of the slave IC which is connected to i2c-1 bus is removed in new non-working revision board.

    Some other components are also changed from first revision board to second revision board.Those are not related to i2c-1 bus.

    Below is the pinmux I am using.

    {I2C1_SDA, (PIN_INPUT_PULLUP | M0)},    /* I2C1_SDA */
      {I2C1_SCL, (PIN_INPUT_PULLUP | M0)},    /* I2C1_SCL */

    Same uboot and MLO images I am using in two boards.I am not changing any pinmux settings.

    In Working board(first revision)

    => md 0x4a003800 1
    4a003800: 00060000                               ....
    => md 0x4a003804 1
    4a003804: 00060000                               ....

    The below data we are writing in to EEPROM after the EEPROM initilization happens.

    => i2c md 0x54 0.2 10
    0000: ee 33 55 aa 35 37 37 37 78 43 50 55 2d 44 44 52    .3U.5777xCPU-DDR

    In non-working board(second revision)

    => md 0x4a003800 1
    4a003800: 00060000                               ....
    => md 0x4a003804 1
    4a003804: 00060000                               ....
    In non-working board, due to the errors coming at i2c_probe(check out pad configuration/pull-ups). EEPROM initilization is failing and not writing data in to it.

    => i2c md 0x54 0.2 10
    0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    I tried with your suggested pinmux settings on non-working board still the issue is same.

    => md 0x4a003800 1
    4a003800: 00050000                               ....
    => md 0x4a003804 1
    4a003804: 00050000                               ....
    => i2c dev 0
    Setting bus to 0
    => i2c probe 0x54
    Valid chip addresses: 54
    => i2c md 0x54 0.2 10
    0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ...............

    Below errors are coming at MLO while initilizing the EEPROM->i2c_probe

    ***********In ti_i2c_eeprom_init after set_bus_num rc=0*********
    ***************i2c probe ********
    Timed out in wait_for_event: status=0000
    Check if pads/pull-ups of bus are properly configured
    ***********ti_i2c_eeprom_get rc=1*********
    ******rc=1
    ti_i2c_eeprom_init failed 1
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x33
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x23
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x2f
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x2b
    i2c_write: pads on bus probably not configured (status=0x10)
    Scaling voltage failed for 0x37

    Please help me to solve this issue.

    Thanks & regards,

    A.Kavya Harini.

  • I'm trying to isolate if the problem is: (1) a pin configuration issue (2) an eeprom driver issue (3) and hardware issue with eeprom, (4) a hardware issue with I2C

    There appears to be other peripherals on the same I2C bus, yes?  PMIC, Audio IC, etc.  The thread mentions these peripherals are working, but then also lists lots of errors when communicating with PMIC.  Does i2C work as expected with these other peripherals?

    The i2c_probe to the eeprom device does not fail - so that does indicate the eeprom acknowledged the scan.  However no acknowledge is received during write command.  This indicates the write protection is enabled - as typically eeprom will not acknowledge i2c write if protection is enabled.

  • Hi Robert,

    Thanks for the reply.

    --> Does i2C work as expected with these other peripherals?

    Yes, on I2c-1 bus we have PMIC, EEPROM, IMU sensor and audio codec(speaker). The IMU,audio are working as expected.

    PMIC is also working, even after showing the error logs also in MLO. But it is able to set the core voltages and dplls also.Only EEPROM initialization is not happening.

    I am attaching the debug logs for your reference. B1_logs.txt is the working board log and B2_logs.txt is the non-working board log. Same software I am using in both boards.

    ---> The i2c_probe to the eeprom device does not fail - so that does indicate the eeprom acknowledged the scan.

    I didn't understand this point.

    According to the log in non-working board, at the time of i2c_probe only errors are coming from i2c_core driver and it is failing so, EEPROM initialization is not happening. In this case, what ever I have implemented a code to write data in to EEPROM will not execute.

    Could you please go through the logs and compare the both logs once. Let me know if my assumption is wrong.

    Thanks & Regards,

    A.Kavya Harini.EEPROM_logs.zip

  • In the E2E thread, you show the eeprom READ is working on the failing board?

    -----------------------Copy from Previous Input --------------------------------------------------

    Setting bus to 0
    => i2c probe 0x54
    Valid chip addresses: 54
    => i2c md 0x54 0.2 10
    0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   

    -----------------------End Copy from Previous Input --------------------------------------------------

    This indicates I2C eeprom Read is working, and the eeprom is blank.  (Hardware is working for I2C reads to eeprom) 

    From hardware perspective - that only leaves the Write-Protect function.  As mentioned, if eeprom is protected - it will NOT respond to write command, meaning it will look like eeprom is not there (for writes - reads discussed above).

  • Hi Robert,

    Yes you are right, the EEPROM write protect is there. Actually in MLO code itself we are disabling the write protect gpio after initialization of EEPROM. But in non-working board due to initialization failed that code is not executing.

    So I tried to set the EEPROM_WCn to low at u-boot prompt. Now at u-boot prompt able to write data in to EEPROM.

    But this is not my requirement, at the time of MLO initialization I want to write data in to it. But the chip is also not detecting at that time of MLO booting. This is an unexpected behavior, same chip is detecting at u-boot prompt.

    I am attaching the logs on working and non-working boards after keeping the prints at i2c core driver.

    According to the logs, I understand that i2c_probe is failing because it is not receiving the ACK after writing the slave address on i2c bus.It's keep on waiting and after certain time "Time out" is happening.

    4520.EEPROM.zip

    Please help me to understand the problem.

    Thanks & Regards,

    A.Kavya Harini

  • Hi Kavya,

    So now both on working and non-working boards you are able to access & write EEPROM by manually
    setting the EEPROM_WCn to low at u-boot prompt.

    From the thread previously if i understood correctly even that was not helping you write. May i know
    the code sequence you tried in uboot to get the EEPROM write working on the non-working board?

    Also what are the changes you made in MLO code for:

     

    Alapati kavyaharini said:
    disabling the write protect


    Best Regards,
    Keerthy