USB flash drives not found at U-Boot boot

Hi!

I try to boot the VisionFive 2 from a USB flash drive mounted in one of the 4 USB-A-ports.

Problem: The USB flash drive is not found in U-Boot because the power to the port is not activated means the LED on the flash drive is off.

starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Working FDT set to ff72da10
Hit any key to stop autoboot:  0 
StarFive # usb tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller 
  |
  +-2  Hub (480 Mb/s, 100mA)
        USB2.0 Hub 

I have to abort the auto boot every time and reset the USB on the U-Boot command line to get the USB flash drive working - now there is power and the flash drive LED is on:

StarFive # usb reset
resetting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
StarFive # usb tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller 
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB2.0 Hub 
    |
    +-3  Mass Storage (480 Mb/s, 100mA)
         Generic Mass Storage Device 121220160204

  • I tried different USB flash drives.
  • I tried all 4 ports.
  • I updated U-Boot to 2025.01-3.

But it does not help, the board needs every boot a “usb reset” to power the ports and recognize the USB flash drive.

Is my board faulty or do I miss something?

Thanks for your help.

Tom

Hi!

It took a while until my previous post was approved. During this time I found this workaround:

# I changed preboot from:
preboot=nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};
# to:
setenv preboot ‘nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr}; usb reset’
env save

The usb start won’t find the flash drive. The following usb reset will.

Not the best solution because usb start should find all devices. But it works for me.

Tom

hi, Mr.T
I successfully started the system from USB flash drives using this article. InstallingDebianOn/StarFive/VisionFiveV2 - Debian Wiki

Note: There are two errors in the article,

The command I am using is:

usb reset
run bootcmd usbX

X is your USB flash drive device number

There articles are the results of VF2 booting and installing from USB flash drives.

1 Like

workaround, done a long time ago now,

pci enum; usb start ….

root@DietPi:~# fw_setenv bootcmd “run sdk_boot_env; run distro_bootcmd”

root@DietPi:~# fw_setenv boot_targets “mmc0 nvme0 usb0 dhcp”

root@DietPi:~# fw_setenv bootcmd_usb0 “setenv devnum 0; run usb_boot”
root@DietPi:~# fw_setenv usb_boot “pci enum; usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi”

reboot

1 Like