public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] riscv: dts: spacemit: Add PMIC regulators usb pcie
@ 2026-04-02 16:54 Han Gao
  2026-04-02 16:54 ` [PATCH v5 1/3] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Han Gao @ 2026-04-02 16:54 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Chukun Pan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao

Changes in v5:
 - Add Chukun Pan as co-author
 - patch 2:
   Rename regulator using Chukun version
   Restore vcc_5v0
   Restore vin-supply in vcc4v0
 - patch 3:
   Restore usb3_hub_5v and use the Chukun version, now called vcc5v0_usb30
   Restore vdd-supply from USB hub nodes
 - Link to v4: https://lore.kernel.org/linux-riscv/cover.1774974017.git.gaohan@iscas.ac.cn/

Han Gao (3):
  riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2
  riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
  riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2

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


base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
prerequisite-patch-id: ef6e9c7b5854d0c08066b72f9a7868db8c2140eb
prerequisite-patch-id: cfe3800f8c791ec4c63e070af9628e88e0fc31b9
prerequisite-patch-id: b76493e625ae257c8adcd67874178458420e4d47
prerequisite-patch-id: 88e01dc92c83bd88ddeb78891d3088209fed8d6b
prerequisite-patch-id: 60336d10ab8322c70596d0f046b6b5c54bb24b54
prerequisite-patch-id: 68c4d869548687dc115dd91e2ffb8f4c11482d86
prerequisite-patch-id: fdadcf964c2cb3406160edb579d99a8d5695f8e6
prerequisite-patch-id: 73b9e745338b0499b849fa4f7f9508987ab39a59
prerequisite-patch-id: cd26770c2160c3c31a406bd8a6b01ab666180ae0
prerequisite-patch-id: e5dfddc32cefae195692da8b80e19adf086e4ad7
prerequisite-patch-id: 7fd53cbe4977598f26148a4bb1cf692bbdb79a09
prerequisite-patch-id: 96ebac57bb29619b97fe95422206a685825618e9
prerequisite-patch-id: 00fac16b52f60383db3140e2885f3f7f8d14dd1a
prerequisite-patch-id: 3b7a60047b922c48e93599f621cb738856f42354
prerequisite-patch-id: 275c030b963be05dd1041451f539a130ce614277
prerequisite-patch-id: 93963424b0871e64276af0e0b2199b52e29b4603
prerequisite-patch-id: 8383188b1c01ed6280629faaa29c37d699ade241
prerequisite-patch-id: 5f8126b912b924d63d4a1e0c5eb42d212eb0d369
prerequisite-patch-id: e80af628a2e0b5f2eeb3cb1b5e7133d08bdd2c4e
prerequisite-patch-id: 0234a6dca15eb91f98a45a46604ce5b4935048a5
-- 
2.47.3


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

* [PATCH v5 1/3] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2
  2026-04-02 16:54 [PATCH v5 0/3] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
@ 2026-04-02 16:54 ` Han Gao
  2026-04-02 16:54 ` [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators " Han Gao
  2026-04-02 16:54 ` [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on " Han Gao
  2 siblings, 0 replies; 8+ messages in thread
From: Han Gao @ 2026-04-02 16:54 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Chukun Pan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao

The adapter is used to access the SpacemiT P1 PMIC present in this board.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
 arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 7b7331cb3c72..93880ba7bdfe 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -87,6 +87,12 @@ &pdma {
 	status = "okay";
 };
 
+&i2c8 {
+	pinctrl-0 = <&i2c8_cfg>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_2_cfg>;
-- 
2.47.3


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

* [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
  2026-04-02 16:54 [PATCH v5 0/3] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
  2026-04-02 16:54 ` [PATCH v5 1/3] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
@ 2026-04-02 16:54 ` Han Gao
  2026-04-03  9:40   ` Chukun Pan
  2026-04-02 16:54 ` [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on " Han Gao
  2 siblings, 1 reply; 8+ messages in thread
From: Han Gao @ 2026-04-02 16:54 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Chukun Pan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao

Define the DC power input and the 4v power as fixed regulator supplies.

Define the SpacemiT P1 PMIC voltage regulators and their constraints.

Co-developed-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
 .../boot/dts/spacemit/k1-orangepi-rv2.dts     | 107 ++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 93880ba7bdfe..a6de3753b876 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -23,6 +23,25 @@ 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>;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -91,6 +110,94 @@ &i2c8 {
 	pinctrl-0 = <&i2c8_cfg>;
 	pinctrl-names = "default";
 	status = "okay";
+
+	pmic@41 {
+		compatible = "spacemit,p1";
+		reg = <0x41>;
+		interrupts = <64>;
+		vin1-supply = <&vcc4v0>;
+		vin2-supply = <&vcc4v0>;
+		vin3-supply = <&vcc4v0>;
+		vin4-supply = <&vcc4v0>;
+		vin5-supply = <&vcc4v0>;
+		vin6-supply = <&vcc4v0>;
+		aldoin-supply = <&vcc4v0>;
+		dldoin1-supply = <&buck5>;
+		dldoin2-supply = <&buck5>;
+
+		regulators {
+			buck1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck2 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck3_1v8: buck3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck4 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck5: buck5 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			aldo1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-boot-on;
+			};
+
+			dldo1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-boot-on;
+			};
+
+			dldo4 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-always-on;
+			};
+
+			dldo5 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			dldo6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-always-on;
+			};
+		};
+	};
 };
 
 &uart0 {
-- 
2.47.3


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

* [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2
  2026-04-02 16:54 [PATCH v5 0/3] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
  2026-04-02 16:54 ` [PATCH v5 1/3] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
  2026-04-02 16:54 ` [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators " Han Gao
@ 2026-04-02 16:54 ` Han Gao
  2026-04-03  0:05   ` Yixun Lan
  2026-04-03  9:50   ` Chukun Pan
  2 siblings, 2 replies; 8+ messages in thread
From: Han Gao @ 2026-04-02 16:54 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Chukun Pan
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao

Enable the DWC3 USB 3.0 controller and its associated usbphy2 on the
OrangePi RV2 board.

The board utilizes a Genesys Logic GL3523 USB3.0 hub.

Define a 3.3v fixed voltage regulator for PCIe and enable PCIe and
PHY-related Device Tree nodes for the OrangePi RV2.

Co-developed-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
 .../boot/dts/spacemit/k1-orangepi-rv2.dts     | 80 +++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index a6de3753b876..c19952e70c31 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -23,6 +23,15 @@ chosen {
 		stdout-path = "serial0";
 	};
 
+	pcie_vcc_3v3: regulator-pcie-vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "pcie_vcc3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	vcc_5v0: regulator-vcc-5v0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_5v0";
@@ -42,6 +51,16 @@ vcc4v0: regulator-vcc4v0 {
 		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>;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -54,6 +73,10 @@ led1 {
 	};
 };
 
+&combo_phy {
+	status = "okay";
+};
+
 &eth0 {
 	phy-handle = <&rgmii0>;
 	phy-mode = "rgmii-id";
@@ -200,8 +223,65 @@ dldo6 {
 	};
 };
 
+&pcie1_phy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie1_3_cfg>;
+	status = "okay";
+};
+
+&pcie1_port {
+	phys = <&pcie1_phy>;
+	vpcie3v3-supply = <&pcie_vcc_3v3>;
+};
+
+&pcie1 {
+	vpcie3v3-supply = <&pcie_vcc_3v3>;
+	status = "okay";
+};
+
+&pcie2_phy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie2_4_cfg>;
+	status = "okay";
+};
+
+&pcie2_port {
+	phys = <&pcie2_phy>;
+	vpcie3v3-supply = <&pcie_vcc_3v3>;
+};
+
+&pcie2 {
+	vpcie3v3-supply = <&pcie_vcc_3v3>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_2_cfg>;
 	status = "okay";
 };
+
+&usbphy2 {
+	status = "okay";
+};
+
+&usb_dwc3 {
+	dr_mode = "host";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_2_0: hub@1 {
+		compatible = "usb5e3,610";
+		reg = <0x1>;
+		peer-hub = <&hub_3_0>;
+		vdd-supply = <&vcc5v0_usb30>;
+	};
+
+	hub_3_0: hub@2 {
+		compatible = "usb5e3,620";
+		reg = <0x2>;
+		peer-hub = <&hub_2_0>;
+		vdd-supply = <&vcc5v0_usb30>;
+	};
+};
-- 
2.47.3


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

* Re: [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2
  2026-04-02 16:54 ` [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on " Han Gao
@ 2026-04-03  0:05   ` Yixun Lan
  2026-04-03  9:50   ` Chukun Pan
  1 sibling, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-04-03  0:05 UTC (permalink / raw)
  To: Han Gao
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Chukun Pan,
	devicetree, linux-riscv, spacemit, linux-kernel, Han Gao

Hi Han, 

On 00:54 Fri 03 Apr     , Han Gao wrote:
> Enable the DWC3 USB 3.0 controller and its associated usbphy2 on the
> OrangePi RV2 board.
> 
> The board utilizes a Genesys Logic GL3523 USB3.0 hub.
> 
> Define a 3.3v fixed voltage regulator for PCIe and enable PCIe and
> PHY-related Device Tree nodes for the OrangePi RV2.
> 
> Co-developed-by: Chukun Pan <amadeus@jmu.edu.cn>
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
> ---
>  .../boot/dts/spacemit/k1-orangepi-rv2.dts     | 80 +++++++++++++++++++
>  1 file changed, 80 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index a6de3753b876..c19952e70c31 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -23,6 +23,15 @@ chosen {
>  		stdout-path = "serial0";
>  	};
>  
> +	pcie_vcc_3v3: regulator-pcie-vcc3v3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "pcie_vcc3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
>  	vcc_5v0: regulator-vcc-5v0 {
>  		compatible = "regulator-fixed";
>  		regulator-name = "vcc_5v0";
> @@ -42,6 +51,16 @@ vcc4v0: regulator-vcc4v0 {
>  		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>;
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
>  
> @@ -54,6 +73,10 @@ led1 {
>  	};
>  };
>  
> +&combo_phy {
> +	status = "okay";
> +};
> +
>  &eth0 {
>  	phy-handle = <&rgmii0>;
>  	phy-mode = "rgmii-id";
> @@ -200,8 +223,65 @@ dldo6 {
>  	};
>  };
>  
> +&pcie1_phy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie1_3_cfg>;
> +	status = "okay";
> +};
> +
> +&pcie1_port {
> +	phys = <&pcie1_phy>;
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> +};
> +
> +&pcie1 {
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> +	status = "okay";
> +};
> +
> +&pcie2_phy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie2_4_cfg>;
> +	status = "okay";
> +};
> +
> +&pcie2_port {
> +	phys = <&pcie2_phy>;
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> +};
> +
> +&pcie2 {
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> +	status = "okay";
> +};
> +
>  &uart0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart0_2_cfg>;
>  	status = "okay";
>  };
> +
> +&usbphy2 {
> +	status = "okay";
> +};
> +
> +&usb_dwc3 {
> +	dr_mode = "host";
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	status = "okay";
Can you put vbus-supply here? see Chukun's patch
http://lore.kernel.org/r/20260402100007.110201-4-amadeus@jmu.edu.cn

> +
> +	hub_2_0: hub@1 {
> +		compatible = "usb5e3,610";
> +		reg = <0x1>;
> +		peer-hub = <&hub_3_0>;
..
> +		vdd-supply = <&vcc5v0_usb30>;
I think the vdd is vcc_5v0, while vcc5v0_usb30 is the vbus, if we check
page 16 of RV2 schematics, GL3523-QFN75 (USB HUB)'s pin V5, VDDP directly
connect to VCC_5V0

> +	};
> +
> +	hub_3_0: hub@2 {
> +		compatible = "usb5e3,620";
> +		reg = <0x2>;
> +		peer-hub = <&hub_2_0>;
> +		vdd-supply = <&vcc5v0_usb30>;
> +	};
> +};
> -- 
> 2.47.3
> 
> 

-- 
Yixun Lan (dlan)

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

* Re: [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
  2026-04-02 16:54 ` [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators " Han Gao
@ 2026-04-03  9:40   ` Chukun Pan
  0 siblings, 0 replies; 8+ messages in thread
From: Chukun Pan @ 2026-04-03  9:40 UTC (permalink / raw)
  To: gaohan
  Cc: alex, amadeus, aou, conor+dt, devicetree, dlan, krzk+dt,
	linux-kernel, linux-riscv, palmer, pjw, rabenda.cn, robh,
	spacemit

Hi,

> @@ -91,6 +110,94 @@ &i2c8 {
>  	pinctrl-0 = <&i2c8_cfg>;
>  	pinctrl-names = "default";
>  	status = "okay";

Perhaps the previous i2c8 enabling patch could be merged with this one.
For the floating sections, I suggest marking them as "not connected":

```
		regulators {
			buck1 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3450000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			buck2 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3450000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			buck3_1v8: buck3 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1800000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			buck4_3v3: buck4 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3300000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			buck5: buck5 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3450000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			buck6 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3450000>;
				regulator-ramp-delay = <5000>;
				regulator-always-on;
			};

			aldo1 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3400000>;
				regulator-boot-on;
			};

			aldo2 {
				/* not connected */
			};

			aldo3 {
				/* not connected */
			};

			aldo4 {
				/* not connected */
			};

			dldo1 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3400000>;
				regulator-boot-on;
			};

			dldo2 {
				/* not connected */
			};

			dldo3 {
				/* not connected */
			};

			dldo4 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3400000>;
				regulator-always-on;
			};

			dldo5 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3400000>;
			};

			dldo6 {
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <3400000>;
				regulator-always-on;
			};

			dldo7 {
				/* not connected */
			};
		};
```

Thanks,
Chukun

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

* Re: [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2
  2026-04-02 16:54 ` [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on " Han Gao
  2026-04-03  0:05   ` Yixun Lan
@ 2026-04-03  9:50   ` Chukun Pan
  2026-04-03 14:16     ` Yixun Lan
  1 sibling, 1 reply; 8+ messages in thread
From: Chukun Pan @ 2026-04-03  9:50 UTC (permalink / raw)
  To: gaohan
  Cc: alex, amadeus, aou, conor+dt, devicetree, dlan, krzk+dt,
	linux-kernel, linux-riscv, palmer, pjw, rabenda.cn, robh,
	spacemit

Hi,

> +	pcie_vcc_3v3: regulator-pcie-vcc3v3 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "pcie_vcc3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};

I would like to maintain the same property order as the
regulator below, and add vin-supply:

```
	pcie_vcc3v3: pcie-vcc3v3 {
		compatible = "regulator-fixed";
		enable-active-high;
		gpios = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
		regulator-name = "pcie_vcc3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&vcc_5v0>;
	};
```

> +&pcie1 {
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;

> +&pcie2 {
> +	vpcie3v3-supply = <&pcie_vcc_3v3>;

I think vpcie3v3-supply is not needed here. [1]

> +	hub_2_0: hub@1 {
> +		compatible = "usb5e3,610";
> +		reg = <0x1>;
> +		peer-hub = <&hub_3_0>;
> +		vdd-supply = <&vcc5v0_usb30>;

vdd-supply = <&vcc_5v0>;

Please refer to the schematic. [2]

[1] https://lore.kernel.org/linux-pci/u53qfrubgrcamiz35ox6lcdpp5bbzfwcsic466z5r6yyx6xz3n@c64nw2pegtfe/
[2] https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNbohnONSR

Thanks,
Chukun

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

* Re: [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on OrangePi RV2
  2026-04-03  9:50   ` Chukun Pan
@ 2026-04-03 14:16     ` Yixun Lan
  0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2026-04-03 14:16 UTC (permalink / raw)
  To: Chukun Pan
  Cc: gaohan, alex, aou, conor+dt, devicetree, krzk+dt, linux-kernel,
	linux-riscv, palmer, pjw, rabenda.cn, robh, spacemit

Hi Chukun,

On 17:50 Fri 03 Apr     , Chukun Pan wrote:
> Hi,
> 
> > +	pcie_vcc_3v3: regulator-pcie-vcc3v3 {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "pcie_vcc3v3";
> > +		regulator-min-microvolt = <3300000>;
> > +		regulator-max-microvolt = <3300000>;
> > +		gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
> > +		enable-active-high;
> > +	};
> 
> I would like to maintain the same property order as the
> regulator below,
..
> and add vin-supply:
> 
I think Krzysztof will have objection on this, which isn't used by any
device, so not really useful, see similar comment for "reg_dc_in" here
https://lore.kernel.org/all/6530526f-59ca-4753-a068-46c62a1a1fed@kernel.org/


> ```
> 	pcie_vcc3v3: pcie-vcc3v3 {
please keep "regulator-" prefix, which is
 	pcie_vcc_3v3: regulator-pcie-vcc3v3 {

> 		compatible = "regulator-fixed";
> 		enable-active-high;
> 		gpios = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
> 		regulator-name = "pcie_vcc3v3";
> 		regulator-min-microvolt = <3300000>;
> 		regulator-max-microvolt = <3300000>;
> 		vin-supply = <&vcc_5v0>;
I'm not sure if there is any enforced rules on this? I can understand you
are trying to sort them in alphabet order.. but I would personally
prefer old way - in slightly logical order.. but I do have no strong
preference..

> 	};
> ```
> 
> > +&pcie1 {
> > +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> 
> > +&pcie2 {
> > +	vpcie3v3-supply = <&pcie_vcc_3v3>;
> 
> I think vpcie3v3-supply is not needed here. [1]
You right, can you send a patch to fix the same issue in tree?
I was trying to fix vpcie3v3 warning, but realized not fixed all..

> 
> > +	hub_2_0: hub@1 {
> > +		compatible = "usb5e3,610";
> > +		reg = <0x1>;
> > +		peer-hub = <&hub_3_0>;
> > +		vdd-supply = <&vcc5v0_usb30>;
> 
> vdd-supply = <&vcc_5v0>;
right, I agree
> 
> Please refer to the schematic. [2]
> 
> [1] https://lore.kernel.org/linux-pci/u53qfrubgrcamiz35ox6lcdpp5bbzfwcsic466z5r6yyx6xz3n@c64nw2pegtfe/
> [2] https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNbohnONSR
> 
> Thanks,
> Chukun

-- 
Yixun Lan (dlan)

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

end of thread, other threads:[~2026-04-03 14:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 16:54 [PATCH v5 0/3] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
2026-04-02 16:54 ` [PATCH v5 1/3] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
2026-04-02 16:54 ` [PATCH v5 2/3] riscv: dts: spacemit: Define the P1 PMIC regulators " Han Gao
2026-04-03  9:40   ` Chukun Pan
2026-04-02 16:54 ` [PATCH v5 3/3] riscv: dts: spacemit: Enable USB3.0/PCIe on " Han Gao
2026-04-03  0:05   ` Yixun Lan
2026-04-03  9:50   ` Chukun Pan
2026-04-03 14: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