Hi Yixun, On Mon, Oct 12, 2026 at 12:27 UTC, Yixun Lan wrote: > https://github.com/torvalds/linux/commit/764c2e6e60bf17910d84e7179fee14129e053b96 > "usb: dwc3: Add optional VBUS regulator support to SpacemiT K1" > > Can you check above (for board OrangePi R2S), see if need to implement > similar support in U-Boot? I'd accept this patch if the regulator is > enabled by default, can leave us to improve later..
On the R2S the USB 3 port's VBUS is switched. The DT describes it as vcc5v0_usb, a fixed regulator enabled by GPIO 126 (active high), with no regulator-always-on or regulator-boot-on, and &usb_dwc3 has vbus-supply = <&vcc5v0_usb>. U-Boot's dts/upstream copy of k1-orangepi-r2s.dts has the same. So as far as the DT is concerned it is not on by default. I don't have a schematic, so I can't say what the pin does out of reset. U-Boot doesn't need an equivalent of 764c2e6e, though. dwc3_generic_host_probe() already gets "vbus-supply" and calls regulator_set_enable_if_allowed() before xhci_register(), and dwc3_generic_host_remove() turns it off again. With rk_ops the host child is bound to the usb@c0a00000 node itself, so it finds the property. A board without vbus-supply is unaffected, as with Linux's optional regulator. The board needs CONFIG_DM_REGULATOR_FIXED, which v3 enables in spacemit_k1_defconfig along with the USB host options; DM_REGULATOR and SPACEMIT_GPIO are already there. My v2 tests on the R2S ran that way: the firmware had CONFIG_DM_REGULATOR_FIXED=y and the upstream R2S DT, and USB storage enumerated and read at 5 Gb/s. I didn't log the regulator enable itself. Under FreeBSD on the same board, the port only saw a device once GPIO 126 was driven high, so I'd expect U-Boot to depend on it as well. So 2/2 doesn't need a change for VBUS. v3 will carry Marek's tag, your 1/2 comments, and a new patch enabling USB host in spacemit_k1_defconfig. Thanks, Dave
