PROCESSOR-SDK-AM62X: DFU-util error while loading u-boot.img

Part Number: PROCESSOR-SDK-AM62X

Tool/software:

We work on Processor SDK 09.02.01.10 on AM62x platform.

When trying to flash u-boot.img.raw image, then we get error message "DFU state(10) = dfuERROR, status(14) = Something went wrong, but the device does not know what it was" 

Our custom board of eMMC is 4GB size (type: THGBMTG5D1LBAIL).

Please help provide suggestion.

$ sudo dfu-util -a tiboot3.bin.raw -D tiboot3-am62x-hs-fs-evm.bin
dfu-util 0.11-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #2 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%       295502 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!


$ sudo dfu-util -a tispl.bin.raw -D tispl.bin
dfu-util 0.11-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #3 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%      1182907 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!


$ sudo dfu-util -a u-boot.img.raw -D u-boot.img 
dfu-util 0.11-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #4 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[                         ]   0%            0 bytes failed!
DFU state(10) = dfuERROR, status(14) = Something went wrong, but the device does not know what it was

  • The error message on UART show as below.

    MMC: block number 0x1428 exceeds max(0x1000)
    MMC operation failed#MMC: block number 0x1428 exceeds max(0x1000)

    => dfu 0 mmc 0
    generic_phy_get_bulk : no phys property
    ###############DOWNLOAD ... OK
    Ctrl+C to exit ...
    ##########################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    MMC: block number 0x1428 exceeds max(0x1000)
    MMC operation failed#MMC: block number 0x1428 exceeds max(0x1000)
    

  • Upload whole UART boot log.

    U-Boot 2023.04-00001-gf5b119738d (Jan 23 2024 - 11:51:46 +0800)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Reading on-board EEPROM at 0x51 failed -121
    DRAM:  2 GiB
    Core:  71 devices, 31 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    EEPROM not available at 80, trying to read at 81
    Reading on-board EEPROM at 0x51 failed -121
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    MMC: no card present
    SD/MMC found on device 1
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:2
    Can't set block device
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:2
    Can't set block device
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device
    ** No partition table - mmc 0 **
    Couldn't find partition mmc 0:1
    MMC: no card present
    starting USB...
    Bus usb@31100000: generic_phy_get_bulk : no phys property
    Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31100000 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    
    Device 0: unknown device
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-88-0c-e0-75-23-ec
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/000000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/000
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/00
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/0
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm-k3-am62x
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm-k3
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default-arm
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Retrieving file: pxelinux.cfg/default
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    Config file not found
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@8000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@8000000port@1: am65_cpsw_start end error
    => setenv uuid_gpt_disk b8577803-d581-48c8-a7d2-d88cfd7cca1c
    => setenv uuid_gpt_rootfs 8eba550e-29bb-4951-986f-98b7f4dce0eb
    => gpt write mmc 0 ${partitions}
    Writing GPT: success!
    => setenv dfu_alt_info ${dfu_alt_info_emmc}
    => dfu 0 mmc 0
    generic_phy_get_bulk : no phys property
    ###############DOWNLOAD ... OK
    Ctrl+C to exit ...
    ##########################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    MMC: block number 0x1428 exceeds max(0x1000)
    MMC operation failed#
    

  • I do an experiment to set different dfu_alt_info_emmc in u-boot, to release space to u-boot.img.raw from tiboot3.bin.raw and tispl.bin.raw, then I can see the u-boot.img.raw able to have 40% of download procedure.  Therefore, seems this issue related to eMMC or total size of bootloader images.  But, our bootloader images able to download to AM62X SKEVM PROC142A board, so the bootloader images size should be also suit for our custom board.

    This is original dfu_alt_info_emmc:

    rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.raw raw 0x3400 0x100 mmcpart 1; sysfw.itb.raw raw 0x3600 0x800 mmcpart 1

    Then I modify dfu_alt_info_emmc:

    rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x300 mmcpart 1; tispl.bin.raw raw 0x300 0x0a00 mmcpart 1; u-boot.img.raw raw 0x0d00 0x0800 mmcpart 1; u-env.raw raw 0x1500 0x100 mmcpart 1; sysfw.itb.raw raw 0x1600 0x800 mmcpart 1

    And do dfu-util to download u-boot.img, I can see the 40% of download procedure.

    $ sudo dfu-util -a u-boot.img.raw -D u-boot.img 
    dfu-util 0.11-dev
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
    
    dfu-util: Warning: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release
    Opening DFU capable USB device...
    Device ID 0451:6165
    Device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Interface #4 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0110
    Device returned transfer size 4096
    Copying data from PC to DFU device
    Download	[==========               ]  40%       397312 bytes failed!
    DFU state(10) = dfuERROR, status(14) = Something went wrong, but the device does not know what it was
    

  • Below is mmcinfo on our custom board, the Boot Capacity is 2 MiB ENH.

    Do you know this is total size of Boot area 0 and 1? or single boot area?

    If it's single boot area, could I put tiboot3.bin and tispl.bin in boot area 0 and u-boot.img in another boot area?

    => mmcinfo
    Device: mmc@fa10000
    Manufacturer ID: 11
    OEM: 0
    Name: 004GA1
    Bus Speed: 200000000
    Mode: HS200 (200MHz)
    Rd Block Len: 512
    MMC version 5.0
    High Capacity: Yes
    Capacity: 3.7 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 4 MiB
    User Capacity: 3.7 GiB WRREL
    Boot Capacity: 2 MiB ENH
    RPMB Capacity: 512 KiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected