Message ID | 20180726003532.18751-5-andre.przywara@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: dts: allwinner: A64 boards DT updates | expand |
On Thu, Jul 26, 2018 at 01:35:18AM +0100, Andre Przywara wrote: > From: Samuel Holland <samuel@sholland.org> > > The Orange Pi Win has 5 USB ports: > Four are standard A sockets, connected to an on-board HUB. The hub's and > socket's power regulators are enabled by GPIO PD7. > Also it features a microB socket, connected to the SoC's USB-OTG port. > It's power is supplied by the AXP PMIC, and the ID pin is connected to > GPIO PH9. It can serve both as a host or a client port. Again, "Fix USB" is way too dramatic for something that enables the on-board hub and the USB OTG controller. Also, two separate patches for this please. Maxime
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts index 667016815cf3..c9cabe987c19 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts @@ -57,6 +57,17 @@ chosen { stdout-path = "serial0:115200n8"; }; + + reg_usb1_vbus: usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + enable-active-high; + gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */ + status = "okay"; + }; }; &ehci1 { @@ -203,7 +214,13 @@ status = "okay"; }; -&usbphy { +&usb_otg { + dr_mode = "otg"; status = "okay"; }; +&usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +};