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.

AM3352: I2C error in MLO

Part Number: AM3352

Hi,

I am trying to board-bring up for custom AM3352, my i2c0 is connected to EEPROM and RTC.

I am getting following error during u-boot-spl.bin loading.

(Sep 05 2019 - 11:52:46)
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
Could not get board ID.
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
Could not get board ID.
Unknown board, cannot configure pinmux.### ERROR ### Please RESET the board ###

Please find below my mux configueration

static struct module_pin_mux i2c0_pin_mux[] = {
// {OFFSET(i2c0_sda), (MODE(0) | RXACTIVE | PULLUDDIS)},
// //PULLUDEN | SLEWCTRL)}, /* I2C_DATA */
// {OFFSET(i2c0_scl), (MODE(0) | RXACTIVE | PULLUDDIS)},
// //PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */
{OFFSET(i2c0_sda), (MODE(0) | RXACTIVE |
PULLUDEN | SLEWCTRL)}, /* I2C_DATA */

{OFFSET(i2c0_scl), (MODE(0) | RXACTIVE |
PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */
{-1},
};

void enable_board_pin_mux(struct am335x_baseboard_id *header)
{

configure_module_pin_mux(uart0_pin_mux);
configure_module_pin_mux(uart1_pin_mux);
configure_module_pin_mux(i2c0_pin_mux);
configure_module_pin_mux(i2c1_pin_mux);

}

Please help me solve this issue.

After SPL(u-boot-spl.bin) is getting this error

My u-boot version is u-boot-2014.07-g7e537bf

Regards,

Subramanya N M

  • Hi,

    Which processor pins are you using for I2C0? Do you have external pullups on the I2C bus?

  • Hi Biser,

    Yes external pullups are present and I2C0 connected to c16 and c17 processor pins.

    Regards,

    Subramanya

  • Subramanya,

    Is your AM335x custom board based on smoe of the AM335x TI boards (EVM, SK, ICE, BBB)?

    As this I2C0 pinmux is setup by default for AM335x TI EVM. This is done in below files:

    u-boot/board/ti/am335x/mux.c

    u-boot/board/ti/am335x/board.c

    u-boot/arch/arm/dts/am335x-evm.dts


    I can suggest you to below items:

    1. Check and verify your AM335x device is of type ZCZ

    2. Dump I2C0 pinmux registers and verify these have the correct values. You can do this with CCS/JTAG or printf() statements. You need to check these values in I2C driver, just before the first error message "Timed out in wait_for_event: status=0000"

    u-boot/drivers/i2c/omap24xx_i2c.c

    conf_i2c0_sda/0x44E10988

    conf_i2c0_scl/0x44E1098C

    Regards,
    Pavel

  • Hi Pavel,

    Thanks.

    I want to check EEPROM from device. Please let us know how to enade do_board_detect for eeprom check.

    #ifdef CONFIG_TI_I2C_BOARD_DETECT

    already defined in board.c and .config

    but not going in this function checked with given debug prints.

    Also checked in arch/arm/mach-omap2/am33xx/board.c for any FLAG enablement seen that function is not going in early_system_init(); function

    Please help me solve this

    Regards,

    Subramanya

  • Subramanya,

    Do you use am335x_evm_defconfig?

    CONFIG_TI_I2C_BOARD_DETECT is selected in below file:

    u-boot-2019.01/arch/arm/mach-omap2/am33xx/Kconfig

    Subramanya Musale said:
    Also checked in arch/arm/mach-omap2/am33xx/board.c

    Other files related to eeprom check are:

    u-boot-2019.01/board/ti/am335x/board.c

    u-boot-2019.01/board/ti/common/board_detect.c

    Regards,
    Pavel

  • Hi Pavel,

    I checked in above file it is not available.

    Please let me know CONFIG_DM_I2C is required or CONFIG_TI_I2C_BOARD_DETECT Required for EEPROM read.

    Also seen that do_board_detect(void) in board.c file is not executing in code it is skipping this function.

    Please let me know which flasg makes this function to skip.

    should i use CONFIG_DM_I2C or CONFIG_TI_I2C_BOARD_DETECT to read from eeprom.

    If i disable CONFIG_DM_I2C will my eeprom will read.

    Regards,

    Subramanya N M

  • Subramanya,

    Yes, CONFIG_DM_I2C is required.

    When building my u-boot .config file with am335x_evm_defconfig I have:

    CONFIG_DM_I2C=y

    CONFIG_SPL_I2C_SUPPORT=y

    CONFIG_TI_I2C_BOARD_DETECT=y
    CONFIG_EEPROM_BUS_ADDRESS=0
    CONFIG_EEPROM_CHIP_ADDRESS=0x50

    CONFIG_SYS_I2C_OMAP24XX=y
    CONFIG_SYS_OMAP24_I2C_SLAVE=1
    CONFIG_SYS_OMAP24_I2C_SPEED=100000


    Regards,
    Pavel

  • Hi Pavel,

    Thanks for reply.

    Please let me know why do_board_detect function is not executing from board.c

    Regards,

    Subramanya

  • Subramanya,

    Subramanya Musale said:
    Please let me know why do_board_detect function is not executing from board.c

    Most probably you are missing some of the configs I have provided in my previous e2e post.

    Regards,
    Pavel

  • Hi Pavel,

    All configs are present and also i did with am335x_evm_defconfig.

    Regards,

    Subramanya

  • Subramanya,

    Is your AM335x custom board based on some of the TI boards (EVM, StarterKit, ICE, BeagleBone Black)? If yes, which exactly? From your console messages in your first e2e post, it seems to me your custom board in not properly detected.

    You are using u-boot-2014.07-g7e537bf, did you get it from some older version of AM335x TI PSDK Linux? If yes, which exactly? I would recommend you to switch to u-boot-2019.01 that comes with AM335x PSDK Linux v6.00.


    Besides I2C0 pinmux, have you made other changes in below files?

    u-boot/ti/am335x/mux.c
    u-boot/board/ti/am335x/board.c
    u-boot/arch/arm/mach-omap2/am33xx/board.c

    Could you please also provide me:

     - your full boot up console log, from the very beginning. You can also enable debug() messages in  u-boot/board/ti/am335x/omap24xx_i2c.c for more verbose output

    - your main u-boot DTS file


    Regards,
    Pavel