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.

AM5728: U-Boot Error on Custom Board

Part Number: AM5728
Other Parts Discussed in Thread: BEAGLEBOARD-X15

Hi

We are working on a custom board based on AM5728 SoC. We are trying to boot from SD Card.

1. We are getting the following error while running u-boot on custom board :

Check if pads/pull-ups of bus are properly configured

2. Also why are we getting UNKNOWN in board information 

Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN

Following are the boot logs :

U-Boot SPL 2019.01-g323d514-dirty (May 05 2021 - 15:26:41 +0530)
DRA752-GP ES2.0                        
** Unable to read file dra7-ipu1-fw.xem4 **
Firmware loading failed                
Trying to boot from MMC1                
Loading Environment from FAT... *** Warning - bad CRC, using default environment
                                       
Loading Environment from MMC... *** Warning - bad CRC, using default environment
                                                                           
U-Boot 2019.01-g323d514-dirty (May 05 2021 - 15:26:41 +0530)

CPU  : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15
Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN
DRAM:  4 GiB
********** board_init() *********
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... Timed out in wait_for_event: status=1000
Check if pads/pull-ups of bus are properly configured
Timed out in wait_for_event: status=1000
Check if pads/pull-ups of bus are properly configured
Timed out in wait_for_event: status=1000
Timed out in wait_for_event: status=1000ly configured
Check if pads/pull-ups of bus are properly configured

  • Hi Rohit,

    Board: UNKNOWN(BeagleBoard X15?)

    Check: "board/ti/am57xx/board.c" in u-boot

    do_board_detect function.

    Your board does not fall under any of the if/else checks:

      if (board_is_x15())
                    bname = "BeagleBoard X15";
            else if (board_is_am572x_evm())
                    bname = "AM572x EVM";
            else if (board_is_am574x_idk())
                    bname = "AM574x IDK";
            else if (board_is_am572x_idk())
                    bname = "AM572x IDK";
            else if (board_is_am571x_idk())
                    bname = "AM571x IDK";
            else if (board_is_bbai())
                    bname = "BeagleBone AI";
    


    Since yours is a custom board and EEPROM might not be programmed or be programmed differently. Hence the UNKNOWN version message.


    Check if pads/pull-ups of bus are properly configured

    This is coming from "drivers/i2c/omap24xx_i2c.c"

    Please check if your i2c0 pins are configured properly as per your custom board pins layout.

    By default in u-boot: "board/ti/am57xx/mux_data.h"


    {I2C1_SDA, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_sda.i2c1_sda */
    {I2C1_SCL, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_scl.i2c1_scl */
    {I2C2_SDA, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_scl.hdmi1_ddc_sda */

    What is the DT setting for your specific board? What are the changes you have done?

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for the quick response. Please provide resolution to further queries:

    1. Yes, my EEPROM is currently not programmed. Is EEPROM programming, a mandatory step to initialize u-boot or is it just for board information. If it is mandatory, then how can the EEPROM be configured on a bare board, since u-boot prompt is not available.

    2. I2C0 configuration is same as our AM5728 evaluation module, hence the mux_data.h entries mentioned by you are same in our custom board. Also, in our custom board, two on-chip peripherals are connected - PMIC and EEPROM, exactly same as EVM. However, PMIC connected in EVM is TPS659038, but in our custom board, it is TPS6590378ZWSR. Does it make any difference.

    3. Now, after booting from SD-Card, contents having MLO, u-boot image compiled with latest pinmux and dts entries, but old uEnv.txt (EVM)

    We are getting the following logs :

    U-Boot SPL 2019.01-g323d514-dirty (May 06 2021 - 14:23:10 +0530)
    DRA752-GP ES2.0                        
    ** Unable to read file dra7-ipu1-fw.xem4 **
    Firmware loading failed                
    Trying to boot from MMC1                
    env_init: Environment FAT init done (ret=-2)
    env_init: Environment MMC init done (ret=-2)
    Loading Environment from FAT... *** Warning - bad CRC, using default environment
                                        
    Failed (-5)                            
    Loading Environment from MMC... *** Warning - bad CRC, using default environment
    Failed (-5)


    U-Boot 2019.01-g323d514-dirty (May 06 2021 - 14:23:10 +0530)

    CPU  : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV
    DRAM:  4 GiB
    ********** board_init() - DARSH ***********MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... Timed out in wait_for_event: status=1000
    Check if pads/pull-ups of bus are properly configured
    Timed out in wait_for_event: status=1000
    Check if pads/pull-ups of bus are properly configured

  • Hi

    This is a gentle reminder.

    Please resolve the query.

    Regards,

    Rohit Yadav 

  • 1. Yes, my EEPROM is currently not programmed. Is EEPROM programming, a mandatory step to initialize u-boot or is it just for board information. If it is mandatory, then how can the EEPROM be configured on a bare board, since u-boot prompt is not available.

    It should be okay not to have this. Let us try to get ahead with u-boot.

    2. I2C0 configuration is same as our AM5728 evaluation module, hence the mux_data.h entries mentioned by you are same in our custom board. Also, in our custom board, two on-chip peripherals are connected - PMIC and EEPROM, exactly same as EVM. However, PMIC connected in EVM is TPS659038, but in our custom board, it is TPS6590378ZWSR. Does it make any difference.

    The register sets are compatible. So that should be okay.

    Can you share the MMC dts nodes in u-boot for your custom board?

    Can you comment out:

            vmmc-supply = <&v3_3d>;
            vqmmc-supply = <&ldo1_reg>;
    Below in your DT node & try if it helps?

    - Keerthy

  • Hi Keerthy,

    MMC dts nodes are same as AM5728 EVM. 

    am57xx-beagle-x15.dts

    &mmc1 {
    pinctrl-names = "default", "hs";
    pinctrl-0 = <&mmc1_pins_default>;
    pinctrl-1 = <&mmc1_pins_hs>;

    // vmmc-supply = <&ldo1_reg>; 
    /delete-property/ sd-uhs-sdr104;
    /delete-property/ sd-uhs-sdr50;
    /delete-property/ sd-uhs-ddr50;
    /delete-property/ sd-uhs-sdr25;
    /delete-property/ sd-uhs-sdr12;
    };

    &mmc2 {
    pinctrl-names = "default", "hs", "ddr_1_8v";
    pinctrl-0 = <&mmc2_pins_default>;
    pinctrl-1 = <&mmc2_pins_hs>;
    pinctrl-2 = <&mmc2_pins_ddr_3_3v_rev11 &mmc2_iodelay_ddr_3_3v_rev11_conf>;
    /delete-property/ mmc-hs200-1_8v;
    };

    am57xx-beagle-x15-common.dtsi

    &mmc1 {
    status = "okay";

    pinctrl-names = "default";
    pinctrl-0 = <&mmc1_pins_default>;

    bus-width = <4>;
    cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
    no-1-8-v;
    };

    &mmc2 {
    status = "okay";

    pinctrl-names = "default";
    pinctrl-0 = <&mmc2_pins_default>;

    //vmmc-supply = <&vdd_3v3>; 
    bus-width = <8>;
    ti,non-removable;
    cap-mmc-dual-data-rate;
    };

    Following are the uboot logs after commenting vmmc-supply in mmc dts nodes 


    U-Boot SPL 2019.01-g323d514-dirty (May 10 2021 - 10:52:12 +0530)
    DRA752-GP ES2.0
    ** Unable to read file dra7-ipu1-fw.xem4 **
    Firmware loading failed
    Trying to boot from MMC1
    env_init: Environment FAT init d
    Reading file uboot.env
    *** Warning - bad CRC, using default environment

    U-Boot 2019.01-g323d514-dirty (May 10 2021 - 10:52:12 +0530)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV 
    DRAM: 4 GiB

    ********** board_init()
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT...

    *** Warning - bad CRC, using default environment

    omap24_i2c_findpsc: speed [kHz]: 400 psc: 0x9 sscl: 0x9 ssch: 0x3
    omap24_i2c_findpsc: speed [kHz]: 400 psc: 0x9 sscl: 0x9 ssch: 0x3
    Timed out in wait_for_event: status=1000
    Check if pads/pull-ups of bus are properly configured
    dm_i2c_probe: bus='i2c@48070000', address 50, ret=1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Warning: fastboot.board_rev: unknown board revision
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 38, ot detect I2C chip 38 on bus 0
    am57x_idk_lcd_detect: Failed to get I2C device 0/56 (ret 1)
    Net: Could not get PHY for ethernet@48484000: addr 1

    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    =>

    We are getting uboot command prompt but it is getting hang on command prompt and not taking any input from the keyboard. Can you suggest about this issue?

    Also, I am getting some errors regarding I2C chip here. Please note that there are no changes regarding I2C in mux_data.h and in DT setting in the custom board. Why is I2C not detected here?

  • i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000

    This is 0x58 slave ID failing so that is the PMIC slave ID on your board as well? Can you confirm that?

    - Keerthy

  • Yes, we have PMIC slave on 0x58 on the custom board as well.

  • Hi Rohit,

    Data sheet: https://www.ti.com/lit/gpn/am5718

    Page: 32

    Can you read CTRL_CORE_PAD _I2C1_SDA & CTRL_CORE_PAD _I2C1_SCL register values using debugger to ensure that
    pinmux is set correctly?

    Regards,
    Keerthy

  • Hi Keerthy,

    Yes, I can read CTRL_CORE_PAD _I2C1_SDA & CTRL_CORE_PAD _I2C1_SCL register values using the debugger. 

    Value of both the registers is 0x00060000.

  • Rohit,

    The above registers look correct for am5728 i2c1 configuration. Another thing to try would be reduce the i2c1 clock frequency
    in u-boot.

    In your dts file in u-boot try:

    &i2c1 {
    clock-frequency = <100000>;
    };

    To confirm if that change has taken effect:

    omap24_i2c_findpsc: speed [kHz]: 400 psc: 0x9 sscl: 0x9 ssch: 0x3

    Should show speed[kHz]: 100

    Let me know if that helps.

    Best Regards,
    Keerthy

  • Hello keerthy,

    1) We tried reducing the i2c1 clock frequency to 100kHz in uboot and got following logs:


    U-Boot 2019.01-g323d514-dirty (May 13 2021 - 10:19:35 +0530)

    U-Boot code: 80800000 -> 8086F9E4  BSS: -> 8088C0A8
    CPU  : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV

    DRAM:  4 GiB
    New Stack Pointer is: fcf21080
    Relocation Offset is: 7e763000
    Relocating to fef63000, new gd at fcf42ea8, sp at fcf21080
    Loading Environment from FAT...

     Reading file uboot.env
    *** Warning - bad CRC, using default environment

    OK
    omap24_i2c_findpsc: speed [kHz]: 100 psc: 0x17 sscl: 0xd ssch: 0xf
    omap24_i2c_findpsc: speed [kHz]: 100 psc: 0x17 sscl: 0xd ssch: 0xf
    Timed out in wait_for_event: status=1000
    Check if pads/pull-ups of bus are properly configured
    dm_i2c_probe: bus='i2c@48070000', address 50, ret=1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Warning: fastboot.board_rev: unknown board revision
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 38, ret=1
    Cannot detect I2C chip 38 on bus 0
    am57x_idk_lcd_detect: Failed to get I2C device 0/56 (ret 1)
    Net:   Could not get PHY for ethernet@48484000: addr 1

    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    Hit any key to stop autoboot:  0
    =>

    -------------------------------------------------------------------------------------------------------------

    2) When we run command "i2c probe" on BUS 0  at uboot prompt, we get the following logs:

    => i2c probe
    Valid chip addresses:dm_i2c_probe: bus='i2c@48070000', address 00, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 01, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 02, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 03, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 04, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 05, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 06, ret=1
    Timed out in wait_for_bb: status=1000
    dm_i2c_probe: bus='i2c@48070000', address 07, ret=1
    Timed out in wait_for_bb: status=1000

    ......... and so on

    --------------------------------------------------------------------------------------------

  • Rohit,

    So now you have give commands from u-boot prompt.  Good to know that.

    Can you please share the u-boot diff that you have done to get your custom board booting.
    Please share the diff format as a text file attachment or as a zip file attachment.

    Also: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/999934/am5728-environment-issue-in-custom-board-booting

    Is the above thread from your colleague same as what you are trying?

    - Keerthy

  • Hi Keerthy,

    Please find the diff file attached. 

    Yes, we are working on the same custom board. We are also getting error while loading the environment from SD Card which has been posted by my colleague in the thread you mentioned.

    diff.zip

  • Hi

    This is a gentle reminder.

    Please resolve the query.

    Regards,

    Rohit Yadav 

  • Rohit,

    There is a big difference that is being analyzed & i am also consulting internally if anything else is being missed.
    I will get back to you in a day or two. Thanks for your patience.

    Best Regards,
    Keerthy

  • Rohit,

    Once you get to u-boot prompt instead of 'i2c probe'

    Can you do:

    I2c dev 0
    i2c md 0x58 0x0

    Check if you are able to read the registers at u-boot.

    If that fails as well we will need to probe the i2c1 clk and sda basically the clock and data lines.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Following is the output of i2c md command :


    => i2c dev 0
    Setting bus to 0
    => i2c md 0x58 0x0
    i2c_get_chip: Searching bus 'i2c@48070000' for address 58: found, ret=0
    i2c_xfer: 2 messages
    i2c_xfer: chip=0x58, len=0x1
    Timed out in wait_for_bb: status=1000
    i2c_write: error sending
    Error reading the chip: -121

    I am not able to read registers of devices on i2c 0.

  • If that fails as well we will need to probe the i2c1 clk and sda basically the clock and data lines.

    Rohit,

    As mentioned earlier now we need to see what is happening in hardware. Could very well be issue with that.
    Can you probe clk and data lines on your custom board?

    - Keerthy

  • Hi Keerthy,

    The issue is resolved. It was a hardware issue, short circuit at I2C 1. 

    Thank you for your valuable time and support.