I am building the latest MTK U-boot from GitHub - mtk-openwrt/u-boot: "Das U-Boot" Source Tree and have customised the configuration to enable USB storage devices.
However after plugging in a USB 2.0 stick into the blue USB 3.0 port on the front edge of the BPI R3 board, U-boot isn’t able to find the USB stick. If I boot into OpenWRT then lsusb finds the USB stick.
U-boot doesn’t find the USB 2.0 hub chip on the board that is connected to the MT7986 USB 2.0 port and provides the 4G card slot and USB 2.0 header connections.
It seems that the U-boot MTK driver doesn’t try scanning the USB 3.0 port.
On @frank-w page en:bpi-r3:uboot [FW-WEB Wiki] there is a USB log that looks the same as my USB log, but they were testing using the USB 2.0 headers. I also don’t see any related commits in Commits · frank-w/u-boot · GitHub that might fix the issue.
Has anyone tried a booting off a USB stick in the USB 3.0 port? If you have and it worked, please let me know what you did.
Here are the U-boot USB config options:
│ │ --- USB support │ │
│ │ [ ] Enable driver model for USB Gadget │ │
│ │ *** USB Host Controller Drivers *** │ │
│ │ [*] xHCI HCD (USB 3.0) support │ │
│ │ [ ] DesignWare USB3 DRD Core Support │ │
│ │ [ ] DesignWare USB3 DRD Generic OF Simple Glue Layer │ │
│ │ [*] Support for MediaTek on-chip xHCI USB controller │ │
│ │ [ ] Support for PCI-based xHCI USB controller │ │
│ │ [ ] Support for NXP Layerscape on-chip xHCI USB controller │ │
│ │ [ ] Broadcom USB3 Host XHCI controller │ │
│ │ [ ] EHCI HCD (USB 2.0) support │ │
│ │ [ ] OHCI HCD (USB 1.1) support │ │
│ │ [ ] UHCI HCD (most Intel and VIA) support │ │
│ │ [ ] DesignWare USB2 Core support │ │
│ │ [ ] Renesas R8A66597 USB Core support │ │
│ │ [ ] NXP ISP 1760/1761/1763 support │ │
│ │ [ ] Cadence USB3 Dual-Role Controller │ │
│ │ [ ] DesignWare USB3 DRD Core Support │ │
│ │ [*] MediaTek USB3 Dual Role controller │ │
│ │ MTU3 Mode Selection (Host only mode) ---> │ │
│ │ [ ] Enable Debugging Messages │ │
│ │ *** Legacy MUSB Support *** │ │
│ │ [ ] Legacy MUSB Host Controller │ │
│ │ [ ] Legacy USB Device Controller │ │
│ │ *** MUSB Controller Driver *** │ │
│ │ [ ] MUSB host mode support │ │
│ │ [ ] Disable DMA (always use PIO) │ │
│ │ *** USB Phy *** │ │
│ │ [ ] TWL4030 PHY │ │
│ │ [ ] Rockchip USB2 PHY │ │
│ │ *** ULPI drivers *** │ │
│ │ [ ] ULPI Viewport type │ │
│ │ *** USB peripherals *** │ │
│ │ [*] USB Mass Storage support │ │
│ │ [ ] USB Keyboard support │ │
│ │ [ ] Onboard USB hub support │ │
│ │ (1000) Timeout in milliseconds for USB HUB connection │ │
│ │ [ ] USB to Ethernet Controller Drivers ---- │ │
│ │ [ ] USB Gadget Support ---- │ │
│ │ [ ] USB Gadget Support in SPL
Here is the U-boot usb info
and usb tree
output:
BPI-R3> usb start
starting USB...
Bus xhci@11200000: xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:2, u3p:1
Register 300010f NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus xhci@11200000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
BPI-R3> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms
BPI-R3> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
U-Boot XHCI Host Controller
Here is the OpenWRT lsusb
output:
root@OpenWrt:/# lsusb
Bus 001 Device 003: ID 18a5:0302 Verbatim STORE N GO
Bus 002 Device 001: ID 1d6b:0003 Linux 5.4.188 xhci-hcd xHCI Host Controller
Bus 001 Device 002: ID 1a40:0101 USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.188 xhci-hcd xHCI Host Controller