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.

SK-AM64B: USB DFU boot

Part Number: SK-AM64B

Hello,

I'm attempting to boot from USB DFU while using the ti-sdk version AM64XX 09_00_00_03.

I'm doing it by clicking the link below.

https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/09_00_00_03/exports/docs/linux/Foundational_Components/U-Boot/UG-DFU.html

Error while loading tiboot3.bin is as follows.

U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Sep 25 2023 - 19:50:10 +0530)
EEPROM not available at 0x50, trying to read at 0x51
Resetting on cold boot to workaround ErrataID:i2331
Please resend tiboot3.bin in case of UART/DFU boot
resetting ...

U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Sep 25 2023 - 19:50:10 +0530)
EEPROM not available at 0x50, trying to read at 0x51
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 13376 bytes
Trying to boot from DFU
No USB device found
usb_gadget_initialize failed
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
 

Please let me know if any details are required!

Regards,

Dharmik

  • Hi Dharmik,

    The SK-AM64B USB port is configured as host-only mode, it doesn't support DFU boot mode.

  • Thanks for your response.

    we have done rework on USB section of SK-AM64B board to make it like AM64x GPEVM as it supports DFU. 

    Reworks as mentioned below,

    1 ) Removed R267

    2) Removed U48

    We have removed R267 and U48 from EVM to configure SoC USB port as device.

    Let me know if anything missing from hardware as well in software side.

    Regards,

    Dharmik

  • With the following modifications, we can use the dfu-util utility to load tiboot3.bin and tispl.bin.

    diff --git a/arch/arm/dts/k3-am64-main.dtsi b/arch/arm/dts/k3-am64-main.dtsi
    index 5e8036f32d..e767709de9 100644
    --- a/arch/arm/dts/k3-am64-main.dtsi
    +++ b/arch/arm/dts/k3-am64-main.dtsi
    @@ -616,7 +616,7 @@
                                              "peripheral",
                                              "otg";
                            maximum-speed = "super-speed";
    -                       dr_mode = "otg";
    +                       dr_mode = "peripheral";
                    };
            };
    
    diff --git a/arch/arm/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
    index f9393e098a..484592772c 100644
    --- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi
    +++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
    @@ -245,7 +245,7 @@
     };
    
     &usb0 {
    -       dr_mode = "host";
    +       dr_mode = "peripheral";
            bootph-pre-ram;
     };
    

  • After loading tispl.bin with the mentioned patch, it seems that the DFU connection with the host machine was lost and u-boot was unable to be loaded.


    We've included the logs from the sudo dfu-util -a u-boot.img -D u-boot.img command that we use to try to load u-boot.img.

    1) Host machine,

    dfu-util 0.11
    
    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
    dfu-util: No DFU capable USB device available

    2) SK-AM64B board,

    U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Sep 26 2023 - 16:48:23 +0530)
    EEPROM not available at 0x50, trying to read at 0x51
    Resetting on cold boot to workaround ErrataID:i2331
    Please resend tiboot3.bin in case of UART/DFU boot
    resetting ...
    
    U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Sep 26 2023 - 16:48:23 +0530)
    EEPROM not available at 0x50, trying to read at 0x51
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from DFU
    ##########################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from MMC... MMC Device 0 not found
    *** Warning - No MMC card found, using default environment
    
    init_env from device 10 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb
    NOTICE:  BL31: Built : 11:57:41, Sep 13 2023
    I/TC:
    I/TC: OP-TEE version: 3.20.0 (gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)) #1 Mon Sep 25 13:35:06 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-00001-g4446269d4e-dirty (Sep 26 2023 - 17:49:53 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    Trying to boot from DFU

    Reworks appears to be functioning properly; are we missing any SDK-related information? 

    Regards,

    Dharmik

  • Hi Dharmik,

    Can you please test with Processor SDK v8.4?

    The last SDK release with which I tested DFU was v8.4, I haven't tested DFU with SDK9.0 yet.

  • I also tested with SDK version 8.6, but the outcome was the same, tries to build and test with SDK version 8.4.

    What are the changes i need to make to boot from the DFU USB. 

    would you kindly share those patches or steps with me?

    Regards,

    Dharmik

  • Hi Dharmik,

    DFU is known broken in SDK8.6. Please see the following FAQ:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1206531/faq-am625-linux-sdk-v08-06-u-boot-usb-dfu-boot-is-broken-with-dfu_alt_info_ram-env-variable-not-defined-error

    Though this FAQ mentions AM62x, the issue and solution apply to AM64x too.