Add Spacemit P1 PMIC configuration and board power infrastructure for
voltage regulation support.
- Add board power regulators (12V input, 4V rail)
- Enable I2C8 for PMIC communication
- Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
- Set up regulator constraints for SD card operation
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -19,6 +19,25 @@ aliases {
ethernet1 = ð1;
};
+ 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>;
+ };
+
chosen {
stdout-path = "serial0";
};
@@ -92,3 +111,32 @@ &uart0 {
pinctrl-0 = <&uart0_2_cfg>;
status = "okay";
};
+
+&i2c8 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c8_cfg>;
+ status = "okay";
+
+ pmic@41 {
+ compatible = "spacemit,p1";
+ reg = <0x41>;
+ interrupts = <64>;
+ vin-supply = <®_vcc_4v>;
+
+ regulators {
+ sd_vmmc: buck4 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <5000>;
+ regulator-always-on;
+ };
+
+ sd_vqmmc: aldo1 {
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+};
--
2.53.0
Hi,
On 2026-03-09 07:40, Iker Pedrosa wrote:
> Add Spacemit P1 PMIC configuration and board power infrastructure for
> voltage regulation support.
>
> - Add board power regulators (12V input, 4V rail)
> - Enable I2C8 for PMIC communication
> - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
> - Set up regulator constraints for SD card operation
>
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
> arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> @@ -19,6 +19,25 @@ aliases {
> ethernet1 = ð1;
> };
>
> + 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;
> + };
> +
Is this the correct voltage? I don't see a 12V rail in the RV2's
datasheet, and the board's specifications only indicate a 5V USB-C input.
> + 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>;
> + };
> +
> chosen {
> stdout-path = "serial0";
> };
> @@ -92,3 +111,32 @@ &uart0 {
> pinctrl-0 = <&uart0_2_cfg>;
> status = "okay";
> };
> +
> +&i2c8 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c8_cfg>;
> + status = "okay";
> +
> + pmic@41 {
> + compatible = "spacemit,p1";
> + reg = <0x41>;
> + interrupts = <64>;
> + vin-supply = <®_vcc_4v>;
> +
> + regulators {
> + sd_vmmc: buck4 {
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <5000>;
> + regulator-always-on;
> + };
> +
> + sd_vqmmc: aldo1 {
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3400000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> + };
> +};
>
Hi Trevor, Iker,
On 14:27 Wed 11 Mar , Trevor Gamblin wrote:
> Hi,
>
> On 2026-03-09 07:40, Iker Pedrosa wrote:
> > Add Spacemit P1 PMIC configuration and board power infrastructure for
> > voltage regulation support.
> >
> > - Add board power regulators (12V input, 4V rail)
> > - Enable I2C8 for PMIC communication
> > - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
> > - Set up regulator constraints for SD card operation
> >
> > Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> > ---
> > arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
> > 1 file changed, 48 insertions(+)
> >
> > diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
> > --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > @@ -19,6 +19,25 @@ aliases {
> > ethernet1 = ð1;
> > };
> >
> > + 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;
> > + };
> > +
> Is this the correct voltage? I don't see a 12V rail in the RV2's
> datasheet, and the board's specifications only indicate a 5V USB-C input.
Right, this should be fixed. Please note Han submitted one version of basic DT for rv2
which I think that series will go in first
https://lore.kernel.org/r/20260310161853.3900605-1-gaohan@iscas.ac.cn
> > + 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>;
> > + };
> > +
> > chosen {
> > stdout-path = "serial0";
> > };
> > @@ -92,3 +111,32 @@ &uart0 {
> > pinctrl-0 = <&uart0_2_cfg>;
> > status = "okay";
> > };
> > +
> > +&i2c8 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c8_cfg>;
> > + status = "okay";
> > +
> > + pmic@41 {
> > + compatible = "spacemit,p1";
> > + reg = <0x41>;
> > + interrupts = <64>;
> > + vin-supply = <®_vcc_4v>;
> > +
> > + regulators {
> > + sd_vmmc: buck4 {
I'd suggest name it more generic and add a comment where device reference to it,
since buck4 requested by more than one devices, will make people less confused.
something just like:
buck4: buck4 {
> > + regulator-min-microvolt = <500000>;
> > + regulator-max-microvolt = <3300000>;
> > + regulator-ramp-delay = <5000>;
> > + regulator-always-on;
> > + };
> > +
> > + sd_vqmmc: aldo1 {
> > + regulator-min-microvolt = <500000>;
> > + regulator-max-microvolt = <3400000>;
> > + regulator-boot-on;
> > + regulator-always-on;
> > + };
> > + };
> > + };
> > +};
> >
>
--
Yixun Lan (dlan)
El vie, 13 mar 2026 a las 1:19, Yixun Lan (<dlan@kernel.org>) escribió:
>
> Hi Trevor, Iker,
>
> On 14:27 Wed 11 Mar , Trevor Gamblin wrote:
> > Hi,
> >
> > On 2026-03-09 07:40, Iker Pedrosa wrote:
> > > Add Spacemit P1 PMIC configuration and board power infrastructure for
> > > voltage regulation support.
> > >
> > > - Add board power regulators (12V input, 4V rail)
> > > - Enable I2C8 for PMIC communication
> > > - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
> > > - Set up regulator constraints for SD card operation
> > >
> > > Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> > > ---
> > > arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
> > > 1 file changed, 48 insertions(+)
> > >
> > > diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
> > > --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > @@ -19,6 +19,25 @@ aliases {
> > > ethernet1 = ð1;
> > > };
> > >
> > > + 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;
> > > + };
> > > +
> > Is this the correct voltage? I don't see a 12V rail in the RV2's
> > datasheet, and the board's specifications only indicate a 5V USB-C input.
>
> Right, this should be fixed. Please note Han submitted one version of basic DT for rv2
> which I think that series will go in first
>
> https://lore.kernel.org/r/20260310161853.3900605-1-gaohan@iscas.ac.cn
>
I'm fine with that. Do we have an estimate of when these changes will
land? I'm fine with rebasing once those are merged, but I'd like to
continue with the review for the remaining changes in this patch
series and I'm unsure on how to proceed.
> > > + 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>;
> > > + };
> > > +
> > > chosen {
> > > stdout-path = "serial0";
> > > };
> > > @@ -92,3 +111,32 @@ &uart0 {
> > > pinctrl-0 = <&uart0_2_cfg>;
> > > status = "okay";
> > > };
> > > +
> > > +&i2c8 {
> > > + pinctrl-names = "default";
> > > + pinctrl-0 = <&i2c8_cfg>;
> > > + status = "okay";
> > > +
> > > + pmic@41 {
> > > + compatible = "spacemit,p1";
> > > + reg = <0x41>;
> > > + interrupts = <64>;
> > > + vin-supply = <®_vcc_4v>;
> > > +
> > > + regulators {
> > > + sd_vmmc: buck4 {
> I'd suggest name it more generic and add a comment where device reference to it,
> since buck4 requested by more than one devices, will make people less confused.
> something just like:
> buck4: buck4 {
>
> > > + regulator-min-microvolt = <500000>;
> > > + regulator-max-microvolt = <3300000>;
> > > + regulator-ramp-delay = <5000>;
> > > + regulator-always-on;
> > > + };
> > > +
> > > + sd_vqmmc: aldo1 {
> > > + regulator-min-microvolt = <500000>;
> > > + regulator-max-microvolt = <3400000>;
> > > + regulator-boot-on;
> > > + regulator-always-on;
> > > + };
> > > + };
> > > + };
> > > +};
> > >
> >
>
> --
> Yixun Lan (dlan)
Hi Iker,
On 10:42 Fri 13 Mar , Iker Pedrosa wrote:
> El vie, 13 mar 2026 a las 1:19, Yixun Lan (<dlan@kernel.org>) escribió:
> >
> > Hi Trevor, Iker,
> >
> > On 14:27 Wed 11 Mar , Trevor Gamblin wrote:
> > > Hi,
> > >
> > > On 2026-03-09 07:40, Iker Pedrosa wrote:
> > > > Add Spacemit P1 PMIC configuration and board power infrastructure for
> > > > voltage regulation support.
> > > >
> > > > - Add board power regulators (12V input, 4V rail)
> > > > - Enable I2C8 for PMIC communication
> > > > - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
> > > > - Set up regulator constraints for SD card operation
> > > >
> > > > Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> > > > ---
> > > > arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
> > > > 1 file changed, 48 insertions(+)
> > > >
> > > > diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
> > > > --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > @@ -19,6 +19,25 @@ aliases {
> > > > ethernet1 = ð1;
> > > > };
> > > >
> > > > + 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;
> > > > + };
> > > > +
> > > Is this the correct voltage? I don't see a 12V rail in the RV2's
> > > datasheet, and the board's specifications only indicate a 5V USB-C input.
> >
> > Right, this should be fixed. Please note Han submitted one version of basic DT for rv2
> > which I think that series will go in first
> >
> > https://lore.kernel.org/r/20260310161853.3900605-1-gaohan@iscas.ac.cn
> >
>
> I'm fine with that. Do we have an estimate of when these changes will
> land? I'm fine with rebasing once those are merged, but I'd like to
> continue with the review for the remaining changes in this patch
> series and I'm unsure on how to proceed.
>
For that changes, likely will target v7.1 merge window
You can continue with current version, once that happen, you can rebase ..
--
Yixun Lan (dlan)
El vie, 13 mar 2026 a las 12:11, Yixun Lan (<dlan@kernel.org>) escribió:
>
> Hi Iker,
>
> On 10:42 Fri 13 Mar , Iker Pedrosa wrote:
> > El vie, 13 mar 2026 a las 1:19, Yixun Lan (<dlan@kernel.org>) escribió:
> > >
> > > Hi Trevor, Iker,
> > >
> > > On 14:27 Wed 11 Mar , Trevor Gamblin wrote:
> > > > Hi,
> > > >
> > > > On 2026-03-09 07:40, Iker Pedrosa wrote:
> > > > > Add Spacemit P1 PMIC configuration and board power infrastructure for
> > > > > voltage regulation support.
> > > > >
> > > > > - Add board power regulators (12V input, 4V rail)
> > > > > - Enable I2C8 for PMIC communication
> > > > > - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators
> > > > > - Set up regulator constraints for SD card operation
> > > > >
> > > > > Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> > > > > ---
> > > > > arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 48 ++++++++++++++++++++++++
> > > > > 1 file changed, 48 insertions(+)
> > > > >
> > > > > diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > > index 7b7331cb3c726f11d597f81917f3a3f5fc21e1b9..414b03f5e6480f05f5d7eeaaa0afb4e86425ae36 100644
> > > > > --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > > +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
> > > > > @@ -19,6 +19,25 @@ aliases {
> > > > > ethernet1 = ð1;
> > > > > };
> > > > >
> > > > > + 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;
> > > > > + };
> > > > > +
> > > > Is this the correct voltage? I don't see a 12V rail in the RV2's
> > > > datasheet, and the board's specifications only indicate a 5V USB-C input.
> > >
> > > Right, this should be fixed. Please note Han submitted one version of basic DT for rv2
> > > which I think that series will go in first
> > >
> > > https://lore.kernel.org/r/20260310161853.3900605-1-gaohan@iscas.ac.cn
> > >
> >
> > I'm fine with that. Do we have an estimate of when these changes will
> > land? I'm fine with rebasing once those are merged, but I'd like to
> > continue with the review for the remaining changes in this patch
> > series and I'm unsure on how to proceed.
> >
> For that changes, likely will target v7.1 merge window
>
> You can continue with current version, once that happen, you can rebase ..
Ok, that sounds good to me
>
> --
> Yixun Lan (dlan)
© 2016 - 2026 Red Hat, Inc.