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-AM62: USB Host Mode Questions

Part Number: SK-AM62
Other Parts Discussed in Thread: AM625

Hello,

I am trying to use USB Host Mode to boot Uboot and qnx-ifs from and I had some questions regarding this process.

The only documentation I've found regarding USB Host Mode is here:https://dev.ti.com/tirex/explore/node?a=XaWts8R__8.3.0.0%20v2&node=A__ACFGQ0-wP1o0mUb4pq5srw__linux_academy_am62x__XaWts8R__8.3.0.0%20v1&search=am62x. Do you know of any other resources for this boot method?

I understand this method is not recommended by TI due to USB stick manufacturers may not conform to USB timing specifications. For now my project uses this as the primary boot mode. I have my boot switches configured below:

BOOTMODE[06:03] = 1010

BOOTMODE[09:07] = 010 (0x85V core voltage, Host MSC Boot, and D+/D- lines are not swapped)

I have tried other combinations of pins 7 and 9 too. When I power up the board my serial terminal doesn't show any output from the device. I can confirm that my serial terminal works in USB DFU, SD Card, and eMMC boot modes. Based on the link above, it seems like Uboot must be loaded in order to execute "run usbboot", but should Uboot be loaded from another boot source, perhaps a backup boot source, before trying to boot from USB Host Mode? When booting from eMMC I was able to boot the qnx-ifs by loading the IFS into RAM using "fatload usb 0:1 0x80080000 qnx-ifs".

Thank you for your help!

From,

Dan Fettke

  • Hi Dan,

    Before we get deep into this, are you doing this on the AM62x SK EVM or your custom board?

  • Dear Bin,

    Thanks for your help with this issue. I'm trying to perform this operation on the AM62x SK EVM board.

  • Hi Dan,

    I just tried the USB host boot on my AM62x SK EVM. Here is my boot mode switches setting:


    By the way, the BOOTMODE settings you mentioned in your first post are correct. I just wanted to ensure you get the DIP switches orientation correctly.

    If you still don't see any message on the UART console, we will go to the next step of the diagnosis.

  • Dear Bin,

    Thanks for confirming the boot mode switches, that is my configuration as well. Please let me know what I can do to further diagnose this issue. I have my USB stick plugged into the USB-A port. Does it have to be plugged into the Micro B or Type C connector?

  • Dear Bin,

    Thanks for confirming the boot mode switches, that is my configuration as well. Please let me know what I can do to further diagnose this issue. I have my USB stick plugged into the USB-A port. Does it have to be plugged into the Micro B or Type C connector?

  • Hi Dan,

    Your USB stick should be plugged into the Type C connector J13 (labeled as "TYPE-C DRP") next to the micro B connector for the UART consoles. The USB-A port on the other side of the board (next to the Ethernet ports) is routed to AM62x USB1 module which doesn't support USB host boot by the ROM.

  • Dear Bin,

    Thanks, I was able to find a UBC C to A converter and I tried it again. I was able to get serial output but now I'm getting the following error:

    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    I'm going through the TI Linux Academy USB Host mode looking at the Uboot configuration options to make sure I have the appropriate flags enabled. 

    When the site says that I may have to rebuild the kernel, is that specific to Linux?

  • Hi Dan,

    Great, seeing the console message means your USB thumb drive is not affected by the Errata i2328, you can use it for the USB host boot.

    What is the board revision of your AM62x SKEVM? It is printed in the center of the PCB, something like "PROC114E2".

    You don't need to rebuild anything, unless you want to change something in the default SD card image provided in the SDK, Please follow the instruction below to flash the SDK prebuilt SD card image to your thumb drive.

    https://dev.ti.com/tirex/explore/node?node=A__AIHP670zb9Dp9kHEe87UTQ__linux_academy_am62x__XaWts8R__LATEST

  • Hi Dan,

    Sorry I misspoken.

    You do have to rebuild the Linux kernel with kernel config option changed to build related USB modules to the kernel image. Otherwise, Linux won't be able to initialize the thumb drive to mount the root filesystem.

  • Dear Bin,

    My board's revision is PROC114E3. I don't plan on booting the Linux kernel, rather the QNX IFS.

    I did have a question about the Uboot flags to enable. The Linux Academy site says to enable the CONFIG_USB_CDNS3 flags, but the AM62x uses CONFIG_USB_DWC3. Can you explain the difference and if I should replace DWC3 with CDNS3? Looking at the am64x_a53_defconfig as an example I see it also has the CONFIG_SPL_USB_HOST_SUPPORT flag enabled, is this required too? Thanks and I hope you have a great weekend.

  • Dear Bin,

    I have been able to build the R5 tiboot.bin file when modifying the am62x_evm_r5_usbdfu_defconfig file with the following flags but I still see the same unsupported boot device error above.

    CONFIG_USB=y
    CONFIG_USB_XHCI_HCD=y
    CONFIG_USB_XHCI_PLATFORM=y
    CONFIG_USB_STORAGE=y
    CONFIG_USB_GADGET=y
    CONFIG_USB_CDNS3=y
    CONFIG_USB_CDNS3_GADGET=y
    CONFIG_USB_CDNS3_HOST=y
    CONFIG_USB_CDNS3_TI=y

    Looking at the output files, I see these flags being printed in those output files, as well as _u_boot_list_2_spl_image_loader_2_BOOT_DEVICE_USB0spl_usb_load_image
    in the u-boot-spl.sym file so I would expect the spl_ll_find_loader function to find BOOT_DEVICE_USB in the list.

    I have tried modifying the am62_evm_r5_defconfig as well in case the USB DFU defconfig has a conflicting flag, but trying to build that
    gives compiler errors. Is there a defconfig that is used for USB Host Mode for the AM62x? Thanks.


  • Hi Dan,

    Sorry AM62x uses different USB controllers from AM64x, so AM62x should use DWC3 related configs instead of CDNS3*. You can compare the config options with am62x_evm_a53_defconfig which supports USB1 port in host mode.

    Besides the U-Boot defconfig option, you also have to change dr_mode to "host" in k3-am62x-sk-common-u-boot.dtsi usb0 node, to configure the USB0 port to host mode.

    Since the USB host boot is not officially supported, so the SDK U-Boot source code doesn't have a defconfig for USB host mode for AM62x.

  • Dear Bin,

    Thanks, unfortunately changing the dr_mode to host and using the unmodified am62x_evm_a53_defconfig did not resolve the error I'm seeing. 

    In the temp files I do see the change reflected there:

    &usb0 {
    dr_mode = "host";

    /delete-property/ extcon;
    u-boot,dm-spl;
    };

    Are there any logs or output files I can look at to see if this change took affect in other places? When you say use DWC3 related configs which ones should we use, as there are different ones between DWC3 and CDNS3? Once I build the r5 files I pass u-boot-spl.bin through k3-image-gen and copy the tiboot3-am62x-gp-evm.bin file to my USB stick. Thanks.

  • Hi Dan,

    Let me try this on my EVM and provide you the u-boot patches to enable USB host boot. I will get back to you in a couple days.

  • Hi Dan,

    I spent time today looked at the U-Boot code for USB host boot, it turned out that not only about missing defconfig options and device tree changes, some places in the U-Boot source code also require modification to enable USB host boot for AM62x, mainly in arch/arm/mach-k3/am625_init.c.

    I should have asked in the beginning, any reason you choose to use USB host boot over any of the other boot modes? DFU would be a better choice in the most use cases for development.

  • Thank you for your help!