* [PATCH v2 0/3] riscv: dts: spacemit: enable USB3 on OrangePi
@ 2026-04-02 10:00 Chukun Pan
2026-04-02 10:00 ` [PATCH v2 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi Chukun Pan
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Chukun Pan @ 2026-04-02 10:00 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski, linux-riscv,
linux-kernel, devicetree, spacemit, Chukun Pan
Changes in v2:
- Drop common board dtsi and PCIe regulator
- Enable USB3 on OrangePi R2S and RV2 boards
- Link to v1: https://lore.kernel.org/lkml/20260116100001.208334-2-amadeus@jmu.edu.cn/
There is no publicly available schematic for the OrangePi R2S.
The schematic of OrangePi RV2 is available at:
https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNbohnONSR
Chukun Pan (3):
riscv: dts: spacemit: add fixed regulators for OrangePi
riscv: dts: spacemit: enable USB3 on OrangePi R2S
riscv: dts: spacemit: enable USB3 on OrangePi RV2
.../boot/dts/spacemit/k1-orangepi-r2s.dts | 43 +++++++++++++++++++
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 43 +++++++++++++++++++
2 files changed, 86 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi
2026-04-02 10:00 [PATCH v2 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
@ 2026-04-02 10:00 ` Chukun Pan
2026-04-02 10:00 ` [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S Chukun Pan
2026-04-02 10:00 ` [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2 Chukun Pan
2 siblings, 0 replies; 9+ messages in thread
From: Chukun Pan @ 2026-04-02 10:00 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski, linux-riscv,
linux-kernel, devicetree, spacemit, Chukun Pan
Define the power input and the 4V power as fixed regulator
supplies for the PMIC and USB Hub.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
.../boot/dts/spacemit/k1-orangepi-r2s.dts | 19 +++++++++++++++++++
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 19 +++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
index de75f6aac740..409a6db269ae 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
@@ -21,6 +21,25 @@ aliases {
chosen {
stdout-path = "serial0";
};
+
+ vcc_5v0: regulator-vcc-5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc4v0: regulator-vcc4v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc4v0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4000000>;
+ regulator-max-microvolt = <4000000>;
+ vin-supply = <&vcc_5v0>;
+ };
};
&emmc {
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 7b7331cb3c72..929b70d384b5 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -33,6 +33,25 @@ led1 {
default-state = "on";
};
};
+
+ vcc_5v0: regulator-vcc-5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc4v0: regulator-vcc4v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc4v0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4000000>;
+ regulator-max-microvolt = <4000000>;
+ vin-supply = <&vcc_5v0>;
+ };
};
ð0 {
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S
2026-04-02 10:00 [PATCH v2 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
2026-04-02 10:00 ` [PATCH v2 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi Chukun Pan
@ 2026-04-02 10:00 ` Chukun Pan
2026-04-02 14:24 ` Michael Opdenacker
2026-04-02 10:00 ` [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2 Chukun Pan
2 siblings, 1 reply; 9+ messages in thread
From: Chukun Pan @ 2026-04-02 10:00 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski, linux-riscv,
linux-kernel, devicetree, spacemit, Chukun Pan
Enable the DWC3 USB3.0 controller and its associated PHY on the
OrangePi R2S. The USB regulator provides VBUS for USB2 and USB3
ports, but the USB2 ports are handled by a separate controller.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
.../boot/dts/spacemit/k1-orangepi-r2s.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
index 409a6db269ae..bc68721e6263 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
@@ -40,6 +40,20 @@ vcc4v0: regulator-vcc4v0 {
regulator-max-microvolt = <4000000>;
vin-supply = <&vcc_5v0>;
};
+
+ vcc5v0_usb: regulator-vcc5v0-usb {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio K1_GPIO(126) GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc5v0_usb";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc_5v0>;
+ };
+};
+
+&combo_phy {
+ status = "okay";
};
&emmc {
@@ -109,3 +123,13 @@ &uart0 {
pinctrl-0 = <&uart0_2_cfg>;
status = "okay";
};
+
+&usbphy2 {
+ status = "okay";
+};
+
+&usb_dwc3 {
+ dr_mode = "host";
+ vbus-supply = <&vcc5v0_usb>;
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2
2026-04-02 10:00 [PATCH v2 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
2026-04-02 10:00 ` [PATCH v2 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi Chukun Pan
2026-04-02 10:00 ` [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S Chukun Pan
@ 2026-04-02 10:00 ` Chukun Pan
2026-04-02 12:20 ` Yixun Lan
2 siblings, 1 reply; 9+ messages in thread
From: Chukun Pan @ 2026-04-02 10:00 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski, linux-riscv,
linux-kernel, devicetree, spacemit, Chukun Pan
Enable the DWC3 USB3.0 controller and its associated PHY on
the OrangePi RV2. The onboard GENESYS GL3523 Hub provides 3
USB3 Type-A ports. Enable the corresponding VBUS regulator.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 929b70d384b5..ab835c30dd86 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -52,6 +52,20 @@ vcc4v0: regulator-vcc4v0 {
regulator-max-microvolt = <4000000>;
vin-supply = <&vcc_5v0>;
};
+
+ vcc5v0_usb30: regulator-vcc5v0-usb30 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb30";
+ enable-active-high;
+ gpios = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc_5v0>;
+ };
+};
+
+&combo_phy {
+ status = "okay";
};
ð0 {
@@ -111,3 +125,13 @@ &uart0 {
pinctrl-0 = <&uart0_2_cfg>;
status = "okay";
};
+
+&usbphy2 {
+ status = "okay";
+};
+
+&usb_dwc3 {
+ dr_mode = "host";
+ vbus-supply = <&vcc5v0_usb30>;
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2
2026-04-02 10:00 ` [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2 Chukun Pan
@ 2026-04-02 12:20 ` Yixun Lan
2026-04-02 13:06 ` Chukun Pan
0 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2026-04-02 12:20 UTC (permalink / raw)
To: Chukun Pan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski, linux-riscv,
linux-kernel, devicetree, spacemit
Hi Chukun,
On 18:00 Thu 02 Apr , Chukun Pan wrote:
> Enable the DWC3 USB3.0 controller and its associated PHY on
> the OrangePi RV2. The onboard GENESYS GL3523 Hub provides 3
> USB3 Type-A ports. Enable the corresponding VBUS regulator.
Can you work with Han for adding USB support[1]? this will simply
distribute our effort, and make the review process even harder
https://lore.kernel.org/all/0ec229e2fb138092672773f134d0739e70740ce0.1774974017.git.gaohan@iscas.ac.cn/ [1]
>
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
> .../boot/dts/spacemit/k1-orangepi-rv2.dts | 24 +++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index 929b70d384b5..ab835c30dd86 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -52,6 +52,20 @@ vcc4v0: regulator-vcc4v0 {
> regulator-max-microvolt = <4000000>;
> vin-supply = <&vcc_5v0>;
> };
> +
> + vcc5v0_usb30: regulator-vcc5v0-usb30 {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc5v0_usb30";
> + enable-active-high;
> + gpios = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&vcc_5v0>;
> + };
> +};
> +
> +&combo_phy {
> + status = "okay";
> };
>
> ð0 {
> @@ -111,3 +125,13 @@ &uart0 {
> pinctrl-0 = <&uart0_2_cfg>;
> status = "okay";
> };
> +
> +&usbphy2 {
> + status = "okay";
> +};
> +
> +&usb_dwc3 {
> + dr_mode = "host";
> + vbus-supply = <&vcc5v0_usb30>;
IMO, the vbus doesn't directly tie to dwc3 host, but to HUB's port
so I think this is still wrong, although it may work on the board..
> + status = "okay";
> +};
> --
> 2.34.1
>
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2
2026-04-02 12:20 ` Yixun Lan
@ 2026-04-02 13:06 ` Chukun Pan
2026-04-03 0:16 ` Yixun Lan
0 siblings, 1 reply; 9+ messages in thread
From: Chukun Pan @ 2026-04-02 13:06 UTC (permalink / raw)
To: dlan
Cc: alex, amadeus, aou, conor+dt, devicetree, krzk+dt, linux-kernel,
linux-riscv, palmer, pjw, robh, spacemit
Hi,
> Can you work with Han for adding USB support[1]? this will simply
> distribute our effort, and make the review process even harder
Sorry, I didn't consider this.
Could you drop this patch ([PATCH v2 3/3]...)?
The first two patches should not cause conflicts.
> > + vbus-supply = <&vcc5v0_usb30>;
> IMO, the vbus doesn't directly tie to dwc3 host, but to HUB's port
> so I think this is still wrong, although it may work on the board..
We can switch to the onboard_usb_dev driver after it's merged.
Keeping vbus always-on may cause unnecessary waste.
I won't insist if you think this is wrong.
Thanks,
Chukun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S
2026-04-02 10:00 ` [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S Chukun Pan
@ 2026-04-02 14:24 ` Michael Opdenacker
2026-04-03 7:00 ` Chukun Pan
0 siblings, 1 reply; 9+ messages in thread
From: Michael Opdenacker @ 2026-04-02 14:24 UTC (permalink / raw)
To: Chukun Pan, Yixun Lan
Cc: michael.opdenacker, Rob Herring, Paul Walmsley, Alexandre Ghiti,
Albert Ou, Conor Dooley, Palmer Dabbelt, Krzysztof Kozlowski,
linux-riscv, linux-kernel, devicetree, spacemit
Hi Chukun
On 4/2/26 12:00 PM, Chukun Pan wrote:
> Enable the DWC3 USB3.0 controller and its associated PHY on the
> OrangePi R2S. The USB regulator provides VBUS for USB2 and USB3
> ports, but the USB2 ports are handled by a separate controller.
>
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
> .../boot/dts/spacemit/k1-orangepi-r2s.dts | 24 +++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
> index 409a6db269ae..bc68721e6263 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
> @@ -40,6 +40,20 @@ vcc4v0: regulator-vcc4v0 {
> regulator-max-microvolt = <4000000>;
> vin-supply = <&vcc_5v0>;
> };
> +
> + vcc5v0_usb: regulator-vcc5v0-usb {
> + compatible = "regulator-fixed";
> + enable-active-high;
> + gpios = <&gpio K1_GPIO(126) GPIO_ACTIVE_HIGH>;
> + regulator-name = "vcc5v0_usb";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&vcc_5v0>;
> + };
> +};
> +
> +&combo_phy {
> + status = "okay";
> };
>
> &emmc {
> @@ -109,3 +123,13 @@ &uart0 {
> pinctrl-0 = <&uart0_2_cfg>;
> status = "okay";
> };
> +
> +&usbphy2 {
> + status = "okay";
> +};
> +
> +&usb_dwc3 {
> + dr_mode = "host";
> + vbus-supply = <&vcc5v0_usb>;
> + status = "okay";
> +};
Thanks a lot for the patch!
Would you mind sharing your configuration with me (in PM?).
I can list the USB 3 hub, but I can't see the USB mass storage device
plugged in the USB3 port.
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Thanks in advance
Cheers
Michael.
--
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2
2026-04-02 13:06 ` Chukun Pan
@ 2026-04-03 0:16 ` Yixun Lan
0 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2026-04-03 0:16 UTC (permalink / raw)
To: Chukun Pan
Cc: alex, aou, conor+dt, devicetree, krzk+dt, linux-kernel,
linux-riscv, palmer, pjw, robh, spacemit
Hi Chukun,
On 21:06 Thu 02 Apr , Chukun Pan wrote:
> Hi,
>
> > Can you work with Han for adding USB support[1]? this will simply
> > distribute our effort, and make the review process even harder
>
> Sorry, I didn't consider this.
> Could you drop this patch ([PATCH v2 3/3]...)?
> The first two patches should not cause conflicts.
>
> > > + vbus-supply = <&vcc5v0_usb30>;
> > IMO, the vbus doesn't directly tie to dwc3 host, but to HUB's port
> > so I think this is still wrong, although it may work on the board..
>
> We can switch to the onboard_usb_dev driver after it's merged.
Sure, I think that's a more elegant solution
> Keeping vbus always-on may cause unnecessary waste.
> I won't insist if you think this is wrong.
Currently either way isn't ideal.. but binding vbus to the host is kind
of acceptable to me, if no ojection, I can take this, then we can adjust
later once the USB HUB vbus support[1] landing in tree
https://lore.kernel.org/all/20260223-v6-16-topic-usb-onboard-dev-v5-0-28d3018a8026@pengutronix.de/ [1]
btw, Could you take a look at Han's patch? if you have final say?
https://lore.kernel.org/spacemit/20260403000539-GKB1016296@kernel.org/ [2]
I'd like to push this series to v7.1, it's almost running out of time..
>
> Thanks,
> Chukun
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S
2026-04-02 14:24 ` Michael Opdenacker
@ 2026-04-03 7:00 ` Chukun Pan
0 siblings, 0 replies; 9+ messages in thread
From: Chukun Pan @ 2026-04-03 7:00 UTC (permalink / raw)
To: michael.opdenacker
Cc: alex, amadeus, aou, conor+dt, devicetree, dlan, krzk+dt,
linux-kernel, linux-riscv, palmer, pjw, robh, spacemit
Hi,
> Thanks a lot for the patch!
> Would you mind sharing your configuration with me (in PM?).
>
> I can list the USB 3 hub, but I can't see the USB mass storage device
> plugged in the USB3 port.
Are you running the latest linux-next? Otherwise, a patch is needed:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=764c2e6e60bf17910d84e7179fee14129e053b96
Thanks,
Chukun
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-04-03 7:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 10:00 [PATCH v2 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
2026-04-02 10:00 ` [PATCH v2 1/3] riscv: dts: spacemit: add fixed regulators for OrangePi Chukun Pan
2026-04-02 10:00 ` [PATCH v2 2/3] riscv: dts: spacemit: enable USB3 on OrangePi R2S Chukun Pan
2026-04-02 14:24 ` Michael Opdenacker
2026-04-03 7:00 ` Chukun Pan
2026-04-02 10:00 ` [PATCH v2 3/3] riscv: dts: spacemit: enable USB3 on OrangePi RV2 Chukun Pan
2026-04-02 12:20 ` Yixun Lan
2026-04-02 13:06 ` Chukun Pan
2026-04-03 0:16 ` Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox