* [PATCH 1/7] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-01-31 21:38 ` [PATCH 2/7] riscv: dts: spacemit: Define fixed regulators " Han Gao
` (7 subsequent siblings)
8 siblings, 0 replies; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
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] 19+ messages in thread* [PATCH 2/7] riscv: dts: spacemit: Define fixed regulators for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
2026-01-31 21:38 ` [PATCH 1/7] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-02-01 11:31 ` Yixun Lan
2026-01-31 21:38 ` [PATCH 3/7] riscv: dts: spacemit: Define the P1 PMIC " Han Gao
` (6 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
Define the DC power input and the 4v power as fixed regulator supplies.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 19 +++++++++++++++++++
1 file changed, 19 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..bd1e45e95e38 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";
};
+ reg_dc_in: dc-in-12v {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_in_12v";
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ reg_vcc_4v: vcc-4v {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_4v";
+ regulator-min-microvolt = <4000000>;
+ regulator-max-microvolt = <4000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ vin-supply = <®_dc_in>;
+ };
+
leds {
compatible = "gpio-leds";
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 2/7] riscv: dts: spacemit: Define fixed regulators for OrangePi RV2
2026-01-31 21:38 ` [PATCH 2/7] riscv: dts: spacemit: Define fixed regulators " Han Gao
@ 2026-02-01 11:31 ` Yixun Lan
0 siblings, 0 replies; 19+ messages in thread
From: Yixun Lan @ 2026-02-01 11:31 UTC (permalink / raw)
To: Han Gao
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, devicetree,
linux-riscv, spacemit, linux-kernel, Han Gao
Hi Han,
On 05:38 Sun 01 Feb , Han Gao wrote:
> Define the DC power input and the 4v power as fixed regulator supplies.
>
> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
> ---
> .../boot/dts/spacemit/k1-orangepi-rv2.dts | 19 +++++++++++++++++++
> 1 file changed, 19 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..bd1e45e95e38 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";
> };
>
> + reg_dc_in: dc-in-12v {
this is copy & paste.. per discussion with Chukun, I'd suggest to add
'regulator-' prefix, see
https://lore.kernel.org/r/20260123145015.1926865-1-amadeus@jmu.edu.cn
> + compatible = "regulator-fixed";
> + regulator-name = "dc_in_12v";
> + regulator-min-microvolt = <12000000>;
> + regulator-max-microvolt = <12000000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + reg_vcc_4v: vcc-4v {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_4v";
> + regulator-min-microvolt = <4000000>;
> + regulator-max-microvolt = <4000000>;
> + regulator-boot-on;
> + regulator-always-on;
> + vin-supply = <®_dc_in>;
> + };
> +
> leds {
> compatible = "gpio-leds";
>
> --
> 2.47.3
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 3/7] riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
2026-01-31 21:38 ` [PATCH 1/7] riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2 Han Gao
2026-01-31 21:38 ` [PATCH 2/7] riscv: dts: spacemit: Define fixed regulators " Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-02-01 5:18 ` Konstantin Ryabitsev
2026-01-31 21:38 ` [PATCH 4/7] riscv: dts: spacemit: Enable USB3.0 on " Han Gao
` (5 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
Define the SpacemiT P1 PMIC voltage regulators and their constraints.
The power management hardware design on the OrangePi RV2 is identical to
the Banana Pi BPI-F3, so the DT Nodes were taken from k1-bananapi-f3.dts.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 110 ++++++++++++++++++
1 file changed, 110 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index bd1e45e95e38..f87c6ab417c4 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -110,6 +110,116 @@ &i2c8 {
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
+
+ pmic@41 {
+ compatible = "spacemit,p1";
+ reg = <0x41>;
+ interrupts = <64>;
+ vin-supply = <®_vcc_4v>;
+
+ 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 {
+ 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 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+
+ aldo3 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+
+ aldo4 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+
+ dldo1 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ };
+
+ dldo2 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+
+ dldo3 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+
+ 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 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ };
+ };
+ };
};
&uart0 {
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 3/7] riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
2026-01-31 21:38 ` [PATCH 3/7] riscv: dts: spacemit: Define the P1 PMIC " Han Gao
@ 2026-02-01 5:18 ` Konstantin Ryabitsev
0 siblings, 0 replies; 19+ messages in thread
From: Konstantin Ryabitsev @ 2026-02-01 5:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
On Sun, 01 Feb 2026 05:38:10 +0800, Han Gao <gaohan@iscas.ac.cn> wrote:
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index bd1e45e95e38..f87c6ab417c4 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -110,6 +110,116 @@ &i2c8 {
> pinctrl-0 = <&i2c8_cfg>;
> pinctrl-names = "default";
> status = "okay";
> +
> + pmic@41 {
> + compatible = "spacemit,p1";
> + reg = <0x41>;
> + interrupts = <64>;
> + vin-supply = <®_vcc_4v>;
> +
This vin-supply is replaced by per-rail supplies (vin1-supply through
vin6-supply, aldoin-supply, dldoin1-supply, dldoin2-supply) in patch
5/7. Consider using the final supply properties here directly to avoid
an intermediate state that is immediately superseded.
--
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 4/7] riscv: dts: spacemit: Enable USB3.0 on OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (2 preceding siblings ...)
2026-01-31 21:38 ` [PATCH 3/7] riscv: dts: spacemit: Define the P1 PMIC " Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-01-31 21:38 ` [PATCH 5/7] riscv: dts: spacemit: Update PMIC supply properties for " Han Gao
` (4 subsequent siblings)
8 siblings, 0 replies; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
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 hub, which requires two
separate power supplies: one VBUS and one for hub itself.
Add two GPIO-controlled fixed-regulators to manage this.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index f87c6ab417c4..d8d0baaec731 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -42,6 +42,25 @@ reg_vcc_4v: vcc-4v {
vin-supply = <®_dc_in>;
};
+ usb3-vbus-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "USB30_VBUS";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ gpio = <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ usb3_hub_5v: usb3-hub-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "USB30_HUB";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
leds {
compatible = "gpio-leds";
@@ -227,3 +246,30 @@ &uart0 {
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>;
+ vdd-supply = <&usb3_hub_5v>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb5e3,620";
+ reg = <0x2>;
+ vdd-supply = <&usb3_hub_5v>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
+ };
+};
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH 5/7] riscv: dts: spacemit: Update PMIC supply properties for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (3 preceding siblings ...)
2026-01-31 21:38 ` [PATCH 4/7] riscv: dts: spacemit: Enable USB3.0 on " Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-02-01 5:18 ` Konstantin Ryabitsev
2026-01-31 21:38 ` [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator " Han Gao
` (3 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
Update individual supply properties in pmic "spacemit,p1" node to specify
the board's power tree topology for OrangePi RV2.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index d8d0baaec731..c0a0c96f2ac4 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -134,7 +134,15 @@ pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
interrupts = <64>;
- vin-supply = <®_vcc_4v>;
+ vin1-supply = <®_vcc_4v>;
+ vin2-supply = <®_vcc_4v>;
+ vin3-supply = <®_vcc_4v>;
+ vin4-supply = <®_vcc_4v>;
+ vin5-supply = <®_vcc_4v>;
+ vin6-supply = <®_vcc_4v>;
+ aldoin-supply = <®_vcc_4v>;
+ dldoin1-supply = <&buck5>;
+ dldoin2-supply = <&buck5>;
regulators {
buck1 {
@@ -165,7 +173,7 @@ buck4 {
regulator-always-on;
};
- buck5 {
+ buck5: buck5 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3450000>;
regulator-ramp-delay = <5000>;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 5/7] riscv: dts: spacemit: Update PMIC supply properties for OrangePi RV2
2026-01-31 21:38 ` [PATCH 5/7] riscv: dts: spacemit: Update PMIC supply properties for " Han Gao
@ 2026-02-01 5:18 ` Konstantin Ryabitsev
0 siblings, 0 replies; 19+ messages in thread
From: Konstantin Ryabitsev @ 2026-02-01 5:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
On Sun, 01 Feb 2026 05:38:12 +0800, Han Gao <gaohan@iscas.ac.cn> wrote:
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index d8d0baaec731..c0a0c96f2ac4 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -134,7 +134,15 @@ pmic@41 {
> compatible = "spacemit,p1";
> reg = <0x41>;
> interrupts = <64>;
> - vin-supply = <®_vcc_4v>;
> + vin1-supply = <®_vcc_4v>;
> + vin2-supply = <®_vcc_4v>;
These per-rail supply properties (vin1-supply through dldoin2-supply)
are not declared in the spacemit,p1.yaml binding, which only has
vin-supply. With unevaluatedProperties: false on the PMIC node, these
will cause dtbs_check failures. The binding needs to be updated to
match, or these should remain as the single vin-supply.
--
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (4 preceding siblings ...)
2026-01-31 21:38 ` [PATCH 5/7] riscv: dts: spacemit: Update PMIC supply properties for " Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-02-04 13:50 ` Chukun Pan
2026-01-31 21:38 ` [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates " Han Gao
` (2 subsequent siblings)
8 siblings, 1 reply; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
Define a 3.3v fixed voltage regulator to be used by PCIe on the
OrangePi RV2. On this platform, this regulator is always on.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index c0a0c96f2ac4..a370dd35e9bc 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -23,6 +23,16 @@ chosen {
stdout-path = "serial0";
};
+ pcie_vcc_3v3: pcie-vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "PCIE_VCC3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
reg_dc_in: dc-in-12v {
compatible = "regulator-fixed";
regulator-name = "dc_in_12v";
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2
2026-01-31 21:38 ` [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator " Han Gao
@ 2026-02-04 13:50 ` Chukun Pan
0 siblings, 0 replies; 19+ messages in thread
From: Chukun Pan @ 2026-02-04 13:50 UTC (permalink / raw)
To: gaohan
Cc: alex, aou, conor+dt, devicetree, dlan, krzk+dt, linux-kernel,
linux-riscv, palmer, pjw, rabenda.cn, robh, spacemit, Chukun Pan
Hi,
> Define a 3.3v fixed voltage regulator to be used by PCIe on the
> OrangePi RV2. On this platform, this regulator is always on.
(...)
> + regulator-always-on;
> + gpio = <&gpio K1_GPIO(116) GPIO_ACTIVE_HIGH>;
Why is this regulator always on?
It is clearly controlled by gpio.
Thanks,
Chukun
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates for OrangePi RV2
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (5 preceding siblings ...)
2026-01-31 21:38 ` [PATCH 6/7] riscv: dts: spacemit: Add a PCIe regulator " Han Gao
@ 2026-01-31 21:38 ` Han Gao
2026-02-04 14:06 ` Chukun Pan
2026-02-01 5:18 ` [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Konstantin Ryabitsev
2026-02-01 11:26 ` Yixun Lan
8 siblings, 1 reply; 19+ messages in thread
From: Han Gao @ 2026-01-31 21:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
Define PCIe and PHY-related Device Tree nodes for the OrangePi RV2.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index a370dd35e9bc..ffcbe3e2b4e2 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -83,6 +83,12 @@ led1 {
};
};
+&combo_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie0_3_cfg>;
+ status = "okay";
+};
+
ð0 {
phy-handle = <&rgmii0>;
phy-mode = "rgmii-id";
@@ -259,6 +265,36 @@ dldo7 {
};
};
+&pcie1_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_3_cfg>;
+ status = "okay";
+};
+
+&pcie1_port {
+ phys = <&pcie1_phy>;
+};
+
+&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>;
+};
+
+&pcie2 {
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_2_cfg>;
--
2.47.3
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates for OrangePi RV2
2026-01-31 21:38 ` [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates " Han Gao
@ 2026-02-04 14:06 ` Chukun Pan
2026-03-10 9:03 ` Yixun Lan
0 siblings, 1 reply; 19+ messages in thread
From: Chukun Pan @ 2026-02-04 14:06 UTC (permalink / raw)
To: gaohan
Cc: alex, aou, conor+dt, devicetree, dlan, krzk+dt, linux-kernel,
linux-riscv, palmer, pjw, rabenda.cn, robh, spacemit, Chukun Pan
Hi,
> +&combo_phy {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie0_3_cfg>;
> +};
This pinctrl is clearly incorrect (including BPI-F3).
Checking the schematic reveals that these pins are for CAM_I2C.
By the way, combo_phy connects to USB3, so it should be enabled
in the USB3 patch.
Thanks,
Chukun
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates for OrangePi RV2
2026-02-04 14:06 ` Chukun Pan
@ 2026-03-10 9:03 ` Yixun Lan
2026-03-14 7:50 ` Chukun Pan
0 siblings, 1 reply; 19+ messages in thread
From: Yixun Lan @ 2026-03-10 9:03 UTC (permalink / raw)
To: Chukun Pan
Cc: gaohan, alex, aou, conor+dt, devicetree, dlan, krzk+dt,
linux-kernel, linux-riscv, palmer, pjw, rabenda.cn, robh,
spacemit
Hi Chukun,
On 22:06 Wed 04 Feb , Chukun Pan wrote:
> Hi,
>
> > +&combo_phy {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pcie0_3_cfg>;
> > +};
>
> This pinctrl is clearly incorrect (including BPI-F3).
> Checking the schematic reveals that these pins are for CAM_I2C.
I agree, if the phy is used for USB, the pinctrl info can be dropped
Do you want to submit a patch for this?
> By the way, combo_phy connects to USB3, so it should be enabled
> in the USB3 patch.
>
I think this is already done, check usb_dwc3 node in k1.dtsi?
https://github.com/torvalds/linux/blob/v7.0-rc3/arch/riscv/boot/dts/spacemit/k1.dtsi#L1180
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates for OrangePi RV2
2026-03-10 9:03 ` Yixun Lan
@ 2026-03-14 7:50 ` Chukun Pan
0 siblings, 0 replies; 19+ messages in thread
From: Chukun Pan @ 2026-03-14 7:50 UTC (permalink / raw)
To: dlan
Cc: alex, amadeus, aou, conor+dt, devicetree, dlan, gaohan, krzk+dt,
linux-kernel, linux-riscv, palmer, pjw, rabenda.cn, robh,
spacemit
Hi,
> I agree, if the phy is used for USB, the pinctrl info can be dropped
> Do you want to submit a patch for this?
I will submit a patch to drop the pinctrl.
Thanks,
Chukun
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (6 preceding siblings ...)
2026-01-31 21:38 ` [PATCH 7/7] riscv: dts: spacemit: PCIe and PHY-related updates " Han Gao
@ 2026-02-01 5:18 ` Konstantin Ryabitsev
2026-02-01 7:54 ` Vivian Wang
2026-02-01 11:26 ` Yixun Lan
8 siblings, 1 reply; 19+ messages in thread
From: Konstantin Ryabitsev @ 2026-02-01 5:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
On Sun, 01 Feb 2026 05:38:07 +0800, Han Gao <gaohan@iscas.ac.cn> wrote:
> This patch series enables the PMIC, voltage regulators, usb and pcie
> for the OrangePi rv2 board.
Hi:
Thank you for sending this in. I am working on "b4 review" functionality
and I am using arbitrary series to perform agent-assisted reviews to
find bugs in the process.
This review was done by Claude Opus 4.5. I do not know enough about the
subsystem to make any judgment about the quality of these reviews, but
they look valid enough.
Hopefully, these were useful. If not, I am sorry for wasting your time.
--
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie
2026-02-01 5:18 ` [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Konstantin Ryabitsev
@ 2026-02-01 7:54 ` Vivian Wang
2026-02-01 15:10 ` Konstantin Ryabitsev
0 siblings, 1 reply; 19+ messages in thread
From: Vivian Wang @ 2026-02-01 7:54 UTC (permalink / raw)
To: Konstantin Ryabitsev, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
On 2/1/26 13:18, Konstantin Ryabitsev wrote:
> On Sun, 01 Feb 2026 05:38:07 +0800, Han Gao <gaohan@iscas.ac.cn> wrote:
>> This patch series enables the PMIC, voltage regulators, usb and pcie
>> for the OrangePi rv2 board.
> Hi:
>
> Thank you for sending this in. I am working on "b4 review" functionality
> and I am using arbitrary series to perform agent-assisted reviews to
> find bugs in the process.
>
> This review was done by Claude Opus 4.5. I do not know enough about the
> subsystem to make any judgment about the quality of these reviews, but
> they look valid enough.
I'm not sure if you see this, but your bot gave two contradictory
recommendations.
On patch 3 it says:
> This vin-supply is replaced by per-rail supplies (vin1-supply through
> vin6-supply, aldoin-supply, dldoin1-supply, dldoin2-supply) in patch
> 5/7. Consider using the final supply properties here directly to avoid
> an intermediate state that is immediately superseded.
Whereas on patch 5 it says
> These per-rail supply properties (vin1-supply through dldoin2-supply)
> are not declared in the spacemit,p1.yaml binding, which only has
> vin-supply. With unevaluatedProperties: false on the PMIC node, these
> will cause dtbs_check failures. The binding needs to be updated to
> match, or these should remain as the single vin-supply.
"Use vin1-supply through dldoin2-supply, not vin-supply" and "use
vin-supply only, not vin1-supply etc" can't both be correct, so
obviously something weird is going on.
So what on earth is going on? Granted, Han could have described it
better in his cover letter, but there's a proposed update to the
spacemit,p1 bindings [1] that would have deprecated vin-supply and
allowed vin1-supply etc. So there's a dependency in this series of
something like:
patch 1,2 -> patch 3 -> bindings update [1] -> patch 5
If/when the bindings update is accepted, patch 5 can be accepted into
the DTS tree. Until then, patch 5 should be withheld.
This isn't obvious from the patch itself, but still, the two
recommendations are contradictory on their own, and make dtbs_check
(mentioned in the patch 5 comment!) would have caught the problem with
the patch 3 comment.
> Hopefully, these were useful. If not, I am sorry for wasting your time.
I acknowledge that this is a sample size of 1, but this is not making me
feel inclined to trust the future of whatever "agent-assisted review" is
going to be happening. What good is an "agent" if it knows about make
dtbs_check but doesn't even run it to see what would happen to its
suggested fixes?
I don't know what you have in mind for "b4 review", but I think at the
very least, "b4 review" should not encourage "I do not know much about
the subsystem but the LLM comments look valid" replies.
Regards,
Vivian "dramforever" Wang
[1]: https://lore.kernel.org/spacemit/20260124-spacemit-p1-v2-0-2c86b06694ba@riscstar.com/
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie
2026-02-01 7:54 ` Vivian Wang
@ 2026-02-01 15:10 ` Konstantin Ryabitsev
0 siblings, 0 replies; 19+ messages in thread
From: Konstantin Ryabitsev @ 2026-02-01 15:10 UTC (permalink / raw)
To: Vivian Wang
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
devicetree, linux-riscv, spacemit, linux-kernel, Han Gao, Han Gao
On Sun, Feb 01, 2026 at 03:54:45PM +0800, Vivian Wang wrote:
> > This review was done by Claude Opus 4.5. I do not know enough about the
> > subsystem to make any judgment about the quality of these reviews, but
> > they look valid enough.
>
> I'm not sure if you see this, but your bot gave two contradictory
> recommendations.
Criticism accepted. For the record, it's not a bot -- I'm writing a review
tool that *may*, should the reviewer wish it, incorporate an LLM agent as a
manual step.
My goal was to test end-to-end review functionality, but from now on I will
focus on subsystems where I can actually discern actual useful reviews from
"looks reasonable" reviews.
Thanks and my apologies,
-K
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie
2026-01-31 21:38 [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Han Gao
` (7 preceding siblings ...)
2026-02-01 5:18 ` [PATCH 0/7] riscv: dts: spacemit: Add PMIC regulators usb pcie Konstantin Ryabitsev
@ 2026-02-01 11:26 ` Yixun Lan
8 siblings, 0 replies; 19+ messages in thread
From: Yixun Lan @ 2026-02-01 11:26 UTC (permalink / raw)
To: Han Gao
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, devicetree,
linux-riscv, spacemit, linux-kernel, Han Gao
Hi Han,
On 05:38 Sun 01 Feb , Han Gao wrote:
> This patch series enables the PMIC, voltage regulators, usb and pcie
> for the OrangePi rv2 board.
>
It's obvious too late for v6.20, besides this series depend on P1 PMIC
patch which haven't settled down.. Guodong is working on v3, see
https://lore.kernel.org/all/CAH1PCMYmK=cenJAvhGdZuh68fwNu-c_JJFpyztZUXvcOTv0YSg@mail.gmail.com/
> Han Gao (7):
> riscv: dts: spacemit: Enable i2c8 adapter for OrangePi RV2
> riscv: dts: spacemit: Define fixed regulators for OrangePi RV2
> riscv: dts: spacemit: Define the P1 PMIC regulators for OrangePi RV2
> riscv: dts: spacemit: Enable USB3.0 on OrangePi RV2
> riscv: dts: spacemit: Update PMIC supply properties for OrangePi RV2
> riscv: dts: spacemit: Add a PCIe regulator for OrangePi RV2
> riscv: dts: spacemit: PCIe and PHY-related updates for OrangePi RV2
>
> .../boot/dts/spacemit/k1-orangepi-rv2.dts | 235 ++++++++++++++++++
> 1 file changed, 235 insertions(+)
>
>
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> prerequisite-patch-id: 32d6acfcb4801407e38510b391407943e9a8ec82
> prerequisite-patch-id: ae644485e1a8ead3fa7a087c8db9062c7acc14ff
> prerequisite-patch-id: 605d537aa0f8387b3523786a875c76b9edfbcbb4
> prerequisite-patch-id: faab9c820ac67de42c40f2c4578bb5b8753fcb71
> prerequisite-patch-id: f9c4643cc99e5b9f1acc9daf1e679b95f81cee73
> prerequisite-patch-id: 50138c8918218ea3b8650999bd558ed6350ed2f2
> prerequisite-patch-id: f8f91e32361cc99c531170c39ed54cd1b3c5997d
> prerequisite-patch-id: 475d1968c0c41895578809410c9bd8fe24997de4
> prerequisite-patch-id: c40f1562f712f04578ef58472840d257a19919fe
> prerequisite-patch-id: e9ef3af6c80187e6f05444704d13212d3beaf40a
> prerequisite-patch-id: 7076909bb4103588b4761d175eca40bce470230f
> prerequisite-patch-id: 0c859b4d131b3360875c795c6148c6176b55fb91
> prerequisite-patch-id: 2ed98dc1ab0f5ed923cc252415c345dc8caf6f17
> prerequisite-patch-id: 1be1a031763fac029076a768f012af31e455be66
> prerequisite-patch-id: 21bb8387c946e050910440e7a7622305d46d946d
> prerequisite-patch-id: f3bdc2c74b230663710086bd770a755d56cb8b9c
> prerequisite-patch-id: ba6a7df5c7a2fa9ce0b8a72a9177e42a4dcdab01
> prerequisite-patch-id: 33fd23112b55b5e6b1e276594826ee454afc1c7e
> prerequisite-patch-id: 009a5aaff0768d90d148eb9d5d999c5098fd6d93
> prerequisite-patch-id: 7e41df07cbce163a689f5dca246b98a0122d1610
> --
> 2.47.3
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 19+ messages in thread