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.
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”