Re: [PATCH v2] ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board
On Tue, Dec 05, 2017 at 11:03:58PM +0100, Krzysztof Adamski wrote: > Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with > an ID pin but with unpowered VBUS. This patch enables this port in > forced peripheral mode. > > ohci/ehci nodes are still enabled since the host mode may work if > external power source is used. In that case, the mode can be switched > for example via sysfs. The same strategy is used for Orange Pi Zero > board DTS. > > Signed-off-by: Krzysztof AdamskiApplied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com signature.asc Description: PGP signature
Re: [PATCH v2] ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board
On Tue, Dec 05, 2017 at 11:03:58PM +0100, Krzysztof Adamski wrote: > Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with > an ID pin but with unpowered VBUS. This patch enables this port in > forced peripheral mode. > > ohci/ehci nodes are still enabled since the host mode may work if > external power source is used. In that case, the mode can be switched > for example via sysfs. The same strategy is used for Orange Pi Zero > board DTS. > > Signed-off-by: Krzysztof Adamski Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com signature.asc Description: PGP signature
[PATCH v2] ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board
Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with an ID pin but with unpowered VBUS. This patch enables this port in forced peripheral mode. ohci/ehci nodes are still enabled since the host mode may work if external power source is used. In that case, the mode can be switched for example via sysfs. The same strategy is used for Orange Pi Zero board DTS. Signed-off-by: Krzysztof Adamski--- Changes since version 1: - nodes sorted alphabetically - added explanation why enabling ohci/ehci still makes sense arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts index 78f6c24952dd..9f33f6fae595 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts @@ -47,9 +47,26 @@ compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; }; + { + status = "okay"; +}; + { phy-handle = <_mii_phy>; phy-mode = "mii"; allwinner,leds-active-low; status = "okay"; }; + + { + status = "okay"; +}; + +_otg { + status = "okay"; + dr_mode = "peripheral"; +}; + + { + usb0_id_det-gpios = < 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +}; -- 2.13.6
[PATCH v2] ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board
Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with an ID pin but with unpowered VBUS. This patch enables this port in forced peripheral mode. ohci/ehci nodes are still enabled since the host mode may work if external power source is used. In that case, the mode can be switched for example via sysfs. The same strategy is used for Orange Pi Zero board DTS. Signed-off-by: Krzysztof Adamski --- Changes since version 1: - nodes sorted alphabetically - added explanation why enabling ohci/ehci still makes sense arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts index 78f6c24952dd..9f33f6fae595 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts @@ -47,9 +47,26 @@ compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; }; + { + status = "okay"; +}; + { phy-handle = <_mii_phy>; phy-mode = "mii"; allwinner,leds-active-low; status = "okay"; }; + + { + status = "okay"; +}; + +_otg { + status = "okay"; + dr_mode = "peripheral"; +}; + + { + usb0_id_det-gpios = < 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +}; -- 2.13.6