Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi
@ 2026-04-10 10:00 Chukun Pan
  2026-04-10 10:00 ` [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Chukun Pan
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chukun Pan @ 2026-04-10 10:00 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
	Palmer Dabbelt, Conor Dooley, Krzysztof Kozlowski, linux-riscv,
	linux-kernel, devicetree, spacemit, Chukun Pan

Changes in v3:
- Drop OrangePi RV2 part to avoid conflicts
- Link to v2: https://lore.kernel.org/lkml/20260402100007.110201-1-amadeus@jmu.edu.cn/

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/

The schematic of OrangePi RV2 is available at:
https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNbohnONSR

Chukun Pan (2):
  riscv: dts: spacemit: add fixed regulators for OrangePi R2S
  riscv: dts: spacemit: enable USB3 on OrangePi R2S

 .../boot/dts/spacemit/k1-orangepi-r2s.dts     | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)

-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S
  2026-04-10 10:00 [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
@ 2026-04-10 10:00 ` Chukun Pan
  2026-05-11  7:07   ` Yixun Lan
  2026-04-10 10:00 ` [PATCH v3 2/2] riscv: dts: spacemit: enable USB3 on " Chukun Pan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Chukun Pan @ 2026-04-10 10:00 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
	Palmer Dabbelt, Conor Dooley, Krzysztof Kozlowski, linux-riscv,
	linux-kernel, devicetree, spacemit, Chukun Pan

Define the power input and the 4V power as fixed regulator supplies.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 .../boot/dts/spacemit/k1-orangepi-r2s.dts     | 19 +++++++++++++++++++
 1 file changed, 19 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 {
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/2] riscv: dts: spacemit: enable USB3 on OrangePi R2S
  2026-04-10 10:00 [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
  2026-04-10 10:00 ` [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Chukun Pan
@ 2026-04-10 10:00 ` Chukun Pan
  2026-04-30 10:18 ` [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
  2026-05-11  6:01 ` Chukun Pan
  3 siblings, 0 replies; 7+ messages in thread
From: Chukun Pan @ 2026-04-10 10:00 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
	Palmer Dabbelt, Conor Dooley, 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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi
  2026-04-10 10:00 [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
  2026-04-10 10:00 ` [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Chukun Pan
  2026-04-10 10:00 ` [PATCH v3 2/2] riscv: dts: spacemit: enable USB3 on " Chukun Pan
@ 2026-04-30 10:18 ` Chukun Pan
  2026-05-11  6:01 ` Chukun Pan
  3 siblings, 0 replies; 7+ messages in thread
From: Chukun Pan @ 2026-04-30 10:18 UTC (permalink / raw)
  To: amadeus
  Cc: alex, aou, conor+dt, devicetree, dlan, krzk+dt, linux-kernel,
	linux-riscv, palmer, pjw, robh, spacemit

Hi,

>   riscv: dts: spacemit: add fixed regulators for OrangePi R2S
>   riscv: dts: spacemit: enable USB3 on OrangePi R2S

Friendly ping

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi
  2026-04-10 10:00 [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
                   ` (2 preceding siblings ...)
  2026-04-30 10:18 ` [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
@ 2026-05-11  6:01 ` Chukun Pan
  2026-05-11  7:05   ` Yixun Lan
  3 siblings, 1 reply; 7+ messages in thread
From: Chukun Pan @ 2026-05-11  6:01 UTC (permalink / raw)
  To: amadeus
  Cc: alex, aou, conor+dt, devicetree, dlan, krzk+dt, linux-kernel,
	linux-riscv, palmer, pjw, robh, spacemit

Hi,

>   riscv: dts: spacemit: add fixed regulators for OrangePi R2S
>   riscv: dts: spacemit: enable USB3 on OrangePi R2S

Ping... This patch seems to have been forgotten.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi
  2026-05-11  6:01 ` Chukun Pan
@ 2026-05-11  7:05   ` Yixun Lan
  0 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2026-05-11  7:05 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 14:01 Mon 11 May     , Chukun Pan wrote:
> Hi,
> 
> >   riscv: dts: spacemit: add fixed regulators for OrangePi R2S
> >   riscv: dts: spacemit: enable USB3 on OrangePi R2S
> 
> Ping... This patch seems to have been forgotten.

Thanks for the ping..

Don't hesitate to ask if you think I've forgotten, or the patch
has been ignored for too long..

Yixun Lan (dlan)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S
  2026-04-10 10:00 ` [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Chukun Pan
@ 2026-05-11  7:07   ` Yixun Lan
  0 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2026-05-11  7:07 UTC (permalink / raw)
  To: Chukun Pan
  Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
	Palmer Dabbelt, Conor Dooley, Krzysztof Kozlowski, linux-riscv,
	linux-kernel, devicetree, spacemit

Hi Chukun,

On 18:00 Fri 10 Apr     , Chukun Pan wrote:
> Define the power input and the 4V power as fixed regulator supplies.
> 
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> ---
>  .../boot/dts/spacemit/k1-orangepi-r2s.dts     | 19 +++++++++++++++++++
>  1 file changed, 19 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>;
> +	};
>  };
please check my comment below, I think this patch has similar issue

https://lore.kernel.org/all/20260511065338-GKA3624147@kernel.org/
-- 
Yixun Lan (dlan)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-11  7:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 10:00 [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
2026-04-10 10:00 ` [PATCH v3 1/2] riscv: dts: spacemit: add fixed regulators for OrangePi R2S Chukun Pan
2026-05-11  7:07   ` Yixun Lan
2026-04-10 10:00 ` [PATCH v3 2/2] riscv: dts: spacemit: enable USB3 on " Chukun Pan
2026-04-30 10:18 ` [PATCH v3 0/3] riscv: dts: spacemit: enable USB3 on OrangePi Chukun Pan
2026-05-11  6:01 ` Chukun Pan
2026-05-11  7:05   ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox