radxa-pkg / radxa-overlays

Additional device tree overlays to support different hardwares on Radxa products
GNU General Public License v2.0
28 stars 24 forks source link

Add Zero 3 USB Host Mode #320

Closed dfloer closed 1 month ago

dfloer commented 1 month ago

This dts enables the OTG port on the Zero 3 to be used in USB host mode. It was based on rk3568-dwc3-host.dts and rk3588-dwc3-otg.dts. Tested working on a Zero 3W with a variety of "USB OTG adapters" and passthrough hubs.

RadxaYuntian commented 1 month ago

Do you mean rk3568-dwc3-host.dts doesn't work on 3W? It should be provided as an option in rsetup.

dfloer commented 1 month ago

Correct, I needed the usb-mode-switch; line for it to work on my device.

Radxa-Alvin commented 1 month ago

We tested that rk3568-dwc3-host.dts can be used normally. Can you tell me what device you are using?

dfloer commented 1 month ago

I just tried it again on a Zero 3W, and it did work for me. I guess I'll close this PR as it's working. Sorry about that.

Using an "OTG Power Splitter" type device with a flash key:

$ lsusb -t
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M