* [PATCH v2 1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port
@ 2020-06-15 13:02 Diego Rondini
2020-06-15 13:02 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration Diego Rondini
0 siblings, 1 reply; 3+ messages in thread
From: Diego Rondini @ 2020-06-15 13:02 UTC (permalink / raw)
To: Maxime Ripard
Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
linux-kernel, linux-sunxi, Diego Rondini
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>
---
v2:
- reordered nodes alphabetically
---
.../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..cbe32b975c5fe 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
@@ -88,6 +88,10 @@ &de {
status = "okay";
};
+&ehci0 {
+ status = "okay";
+};
+
&hdmi {
status = "okay";
};
@@ -132,8 +136,27 @@ &mmc2 {
status = "okay";
};
+&ohci0 {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
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";
+};
+
+&usbphy {
+ 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..e67733d133bb4 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
@@ -48,6 +48,10 @@ &de {
status = "okay";
};
+&ehci0 {
+ status = "okay";
+};
+
&hdmi {
status = "okay";
};
@@ -92,6 +96,10 @@ &mmc2 {
status = "okay";
};
+&ohci0 {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
@@ -103,3 +111,18 @@ &uart1 {
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
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";
+};
+
+&usbphy {
+ status = "okay";
+};
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration
2020-06-15 13:02 [PATCH v2 1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port Diego Rondini
@ 2020-06-15 13:02 ` Diego Rondini
2020-06-16 10:36 ` Maxime Ripard
0 siblings, 1 reply; 3+ messages in thread
From: Diego Rondini @ 2020-06-15 13:02 UTC (permalink / raw)
To: Maxime Ripard
Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
linux-kernel, linux-sunxi, Diego Rondini
Add pwr and status leds configuration and turn on pwr led by default for Orange
Pi Zero Plus 2 (both H3 and H5 variants).
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
---
v2:
- sorted node alphabetically
- fixed underscore in led names
- removed extra empty line
---
.../arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts | 15 +++++++++++++++
.../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 15 +++++++++++++++
2 files changed, 30 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 cbe32b975c5fe..251bbab7d7073 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
@@ -70,6 +70,21 @@ hdmi_con_in: endpoint {
};
};
+ leds {
+ compatible = "gpio-leds";
+
+ pwr {
+ label = "orangepi:green:pwr";
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ status {
+ label = "orangepi:red:status";
+ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
reg_vcc3v3: vcc3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
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 e67733d133bb4..de19e68eb84e0 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
@@ -30,6 +30,21 @@ hdmi_con_in: endpoint {
};
};
+ leds {
+ compatible = "gpio-leds";
+
+ pwr {
+ label = "orangepi:green:pwr";
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ status {
+ label = "orangepi:red:status";
+ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
reg_vcc3v3: vcc3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration
2020-06-15 13:02 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration Diego Rondini
@ 2020-06-16 10:36 ` Maxime Ripard
0 siblings, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2020-06-16 10:36 UTC (permalink / raw)
To: Diego Rondini
Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel,
linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
On Mon, Jun 15, 2020 at 03:02:25PM +0200, Diego Rondini wrote:
> Add pwr and status leds configuration and turn on pwr led by default for Orange
> Pi Zero Plus 2 (both H3 and H5 variants).
>
> Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Applied both ,thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-16 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 13:02 [PATCH v2 1/2] ARM: dts: orange-pi-zero-plus2: enable USB OTG port Diego Rondini
2020-06-15 13:02 ` [PATCH v2 2/2] ARM: dts: orange-pi-zero-plus2: add leds configuration Diego Rondini
2020-06-16 10:36 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).