3.6.3. USB Host Boot#

3.6.3.1. Overview#

Similar to MMCSD boot mode, AM62x USB Host boot mode boots U-Boot and Linux from a USB Mass Storage device (e.g., a thumb driver attached to the USB host port).

This section demonstrates how to boot the AM62x EVM to the Linux prompt from a USB thumb drive.

3.6.3.2. Setup#

Hardware

  • Refer to EVM Boot Mode Switches to set the AM62x GPEVM boot mode switches to USB Host boot.

  • Add headers onto Jumper J23 on the AM62x GPEVM to let the USB port work in host mode.

Software

  • The layout of U-Boot and Linux binaries on the thumb drive is the same as the layout of binaries on the SDCard for MMCSD boot mode. Refer to Create a Linux Bootable SD Card to flash the Processor SDK U-Boot and Linux images to a thumb drive.

  • The prebuilt kernel image and kernel defconfig provided in AM62x Processor SDK have all USB drivers built as modules. These drivers should be built in the kernel image for USB Host boot mode. Building the USB drivers into the kernel image allows the USB module to be initialized prior to mounting the root filesystem from the USB thumb drive. Follow the next section Rebuild Kernel Image to build the required USB drivers into the kernel image and update the kernel image in the bootable thumb drive.

3.6.3.3. Rebuild Kernel Image#

Section Build Kernel explains how to configure and build the kernel image. Follow the instruction below to re-configure the following USB drivers to build in kernel image.

Device Drivers --->
    [*] USB support --->
        <*>   Support for Host-side USB --->
        <*>   xHCI HCD (USB 3.0) support
        {*}     Generic xHCI driver for a platform device
              ...
        <*>   USB Mass Storage support
              ...
        <*>   Cadence USB3 Dual-Role Controller
        [*]     Cadence USB3 device controller
        [*]     Cadence USB3 host controller
        <*>     Cadence USB3 support on TI platforms
        <*>   USB Gadget Support  --->

Note

The config option “Cadence USB3 device controller” is hidden in kernel menuconfig until the option “USB Gadget Support” is set to <*>.

To check if all these config options are set properly in kernel menuconfig, please ensure the options below are set to ‘y’ in kernel .config:

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

The following USB PHY drivers should be already built in kernel image by default.

Device Drivers --->
    PHY Subsystem  --->
        <*> Cadence Torrent PHY driver
        <*> TI J721E WIZ (SERDES Wrapper) support

After changing these kernel config options, follow Build Kernel to rebuild the kernel image. Next, copy the new kernel image arch/arm64/boot/Image to the boot/ folder on the second partition of the bootable thumb drive.

3.6.3.4. USB Host Boot Procedure#

The AM62x GPEVM use a USB2.0 microAB receptacle. A microA-to-typeA adapter, which is similar to the picture below, is required to connect the thumb drive to the GPEVM USB port.

../_images/Usb_af_to_micro_usb_male_adapter.jpg

Use this type of adapter to connect the bootable thumb drive to the AM62x GPEVM usb port. Power on the EVM. The U-Boot console will print U-Boot boot messages. Once the following messages appear on the U-Boot console, press any key on the console keyboard to stop autoboot and enter the U-Boot prompt:

U-Boot 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:19 +0000)

SoC:   AM64X SR1.0
Model: Texas Instruments AM642 EVM
Board: AM64-GPEVM rev E2
DRAM:  2 GiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000
Hit any key to stop autoboot:  2

Type the following commands on the U-Boot prompt to boot into Linux from the thumb drive:

=> run usbboot