Message ID | 20200528204712.552964-1-diego.rondini@kynetics.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port | expand |
Hi Diego, On Thu, May 28, 2020 at 10:47:11PM +0200, Diego Rondini wrote: > Enable support for USB OTG port on Orange Pi Zero Plus 2 (both H3 and H5 > variants). As, according to the board schematics, the USB OTG port cannot > provide power to external devices, we set dr_mode to peripheral. > > Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Sorry for the time it took to review it. I initially thought it was ok and wanted to wait until -rc1 was out to apply it, but... > --- > .../boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ > .../sun50i-h5-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ > 2 files changed, 46 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts > index b8f46e2802fd3..4376767699a47 100644 > --- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts > +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts > @@ -137,3 +137,26 @@ &uart0 { > pinctrl-0 = <&uart0_pa_pins>; > status = "okay"; > }; > + > +&usbphy { > + status = "okay"; > +}; > + > +&usb_otg { > + /* > + * According to schematics CN1 MicroUSB port can be used to take > + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB > + * port cannot provide power externally even if the board is powered > + * via GPIO pins. It thus makes sense to force peripheral mode. > + */ > + dr_mode = "peripheral"; > + status = "okay"; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; Nodes should be ordered alphabetically here. > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts > index c95a68541309c..d8192a7483e9e 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts > @@ -103,3 +103,26 @@ &uart1 { > pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; > status = "okay"; > }; > + > +&usbphy { > + status = "okay"; > +}; > + > +&usb_otg { > + /* > + * According to schematics CN1 MicroUSB port can be used to take > + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB > + * port cannot provide power externally even if the board is powered > + * via GPIO pins. It thus makes sense to force peripheral mode. > + */ > + dr_mode = "peripheral"; > + status = "okay"; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; And here too. Sorry for not spotting this earlier. Maxime
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts index b8f46e2802fd3..4376767699a47 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -137,3 +137,26 @@ &uart0 { pinctrl-0 = <&uart0_pa_pins>; status = "okay"; }; + +&usbphy { + status = "okay"; +}; + +&usb_otg { + /* + * According to schematics CN1 MicroUSB port can be used to take + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB + * port cannot provide power externally even if the board is powered + * via GPIO pins. It thus makes sense to force peripheral mode. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index c95a68541309c..d8192a7483e9e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -103,3 +103,26 @@ &uart1 { pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; }; + +&usbphy { + status = "okay"; +}; + +&usb_otg { + /* + * According to schematics CN1 MicroUSB port can be used to take + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB + * port cannot provide power externally even if the board is powered + * via GPIO pins. It thus makes sense to force peripheral mode. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +};
Enable support for USB OTG port on Orange Pi Zero Plus 2 (both H3 and H5 variants). As, according to the board schematics, the USB OTG port cannot provide power to external devices, we set dr_mode to peripheral. Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> --- .../boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ .../sun50i-h5-orangepi-zero-plus2.dts | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+)