* [PATCH 1/4] regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
@ 2026-01-22 9:43 ` Guodong Xu
2026-01-22 9:43 ` [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Guodong Xu @ 2026-01-22 9:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Yixun Lan, Alex Elder, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: linux-kernel, linux-riscv, spacemit, devicetree, Guodong Xu
Higher voltage settings were unusable due to incorrect n_voltages values
causing registration failures. For example, setting aldo4 to 3.3V failed
with -EINVAL because the required selector (123) exceeded the allowed
range (n_voltages=117).
Fix by aligning n_voltages with the hardware register widths per the P1
datasheet [1]:
- BUCK: 255 (was 254), allows selectors 0-254, selector 255 is reserved
- LDO: 128 (was 117), allows selectors 0-127, selectors 0-10 are for
suspend mode, valid operational range is 11-127
This enables the full voltage range supported by the hardware.
Fixes: 8b84d712ad84 ("regulator: spacemit: support SpacemiT P1 regulators")
Link: https://developer.spacemit.com/documentation [1]
Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
drivers/regulator/spacemit-p1.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/spacemit-p1.c b/drivers/regulator/spacemit-p1.c
index 2bf9137e12b1d0bc7a857213d77f05387536fe17..2b585ba01a93d0ce163c33e14c8022a506bdce11 100644
--- a/drivers/regulator/spacemit-p1.c
+++ b/drivers/regulator/spacemit-p1.c
@@ -87,13 +87,13 @@ static const struct linear_range p1_ldo_ranges[] = {
}
#define P1_BUCK_DESC(_n) \
- P1_REG_DESC(BUCK, buck, _n, "vin", 0x47, BUCK_MASK, 254, p1_buck_ranges)
+ P1_REG_DESC(BUCK, buck, _n, "vin", 0x47, BUCK_MASK, 255, p1_buck_ranges)
#define P1_ALDO_DESC(_n) \
- P1_REG_DESC(ALDO, aldo, _n, "vin", 0x5b, LDO_MASK, 117, p1_ldo_ranges)
+ P1_REG_DESC(ALDO, aldo, _n, "vin", 0x5b, LDO_MASK, 128, p1_ldo_ranges)
#define P1_DLDO_DESC(_n) \
- P1_REG_DESC(DLDO, dldo, _n, "buck5", 0x67, LDO_MASK, 117, p1_ldo_ranges)
+ P1_REG_DESC(DLDO, dldo, _n, "buck5", 0x67, LDO_MASK, 128, p1_ldo_ranges)
static const struct regulator_desc p1_regulator_desc[] = {
P1_BUCK_DESC(1),
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
2026-01-22 9:43 ` [PATCH 1/4] regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators Guodong Xu
@ 2026-01-22 9:43 ` Guodong Xu
2026-01-22 10:20 ` Rob Herring (Arm)
` (2 more replies)
2026-01-22 9:43 ` [PATCH 3/4] regulator: spacemit-p1: Update supply names Guodong Xu
` (3 subsequent siblings)
5 siblings, 3 replies; 17+ messages in thread
From: Guodong Xu @ 2026-01-22 9:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Yixun Lan, Alex Elder, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: linux-kernel, linux-riscv, spacemit, devicetree, Guodong Xu
Add supply properties that match the P1 PMIC's actual hardware topology
where each buck converter has its own VIN pin and LDO groups share
common input pins. Supply names are defined according to the pinout
names in the P1 datasheet.
This allows different boards to describe their actual
power tree connections in devicetree rather than hardcoding supply
relationships in the driver.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
.../devicetree/bindings/mfd/spacemit,p1.yaml | 58 +++++++++++++++++++++-
1 file changed, 56 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
index c6593ac6ef6adb72fc48af570dc13fc9edf77ccb..abdc93b9a67b1872c8fe6955abd950622a0b69e8 100644
--- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
+++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
@@ -27,8 +27,41 @@ properties:
interrupts:
maxItems: 1
- vin-supply:
- description: Input supply phandle.
+ vin1-supply:
+ description:
+ Power supply for BUCK1. Required if BUCK1 is defined.
+
+ vin2-supply:
+ description:
+ Power supply for BUCK2. Required if BUCK2 is defined.
+
+ vin3-supply:
+ description:
+ Power supply for BUCK3. Required if BUCK3 is defined.
+
+ vin4-supply:
+ description:
+ Power supply for BUCK4. Required if BUCK4 is defined.
+
+ vin5-supply:
+ description:
+ Power supply for BUCK5. Required if BUCK5 is defined.
+
+ vin6-supply:
+ description:
+ Power supply for BUCK6. Required if BUCK6 is defined.
+
+ aldoin-supply:
+ description:
+ Power supply for ALDO1-4. Required if any are defined.
+
+ dldoin1-supply:
+ description:
+ Power supply for DLDO1-4. Required if any are defined.
+
+ dldoin2-supply:
+ description:
+ Power supply for DLDO5-7. Required if any are defined.
regulators:
type: object
@@ -50,6 +83,15 @@ unevaluatedProperties: false
examples:
- |
+ / {
+ reg_vcc_5v: regulator-vcc-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+ };
+
i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -58,6 +100,10 @@ examples:
compatible = "spacemit,p1";
reg = <0x41>;
interrupts = <64>;
+ vin1-supply = <®_vcc_5v>;
+ vin5-supply = <®_vcc_5v>;
+ aldoin-supply = <®_vcc_5v>;
+ dldoin1-supply = <&buck5>;
regulators {
buck1 {
@@ -68,6 +114,14 @@ examples:
regulator-always-on;
};
+ buck5: buck5 {
+ regulator-name = "buck5";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3450000>;
+ regulator-ramp-delay = <5000>;
+ regulator-always-on;
+ };
+
aldo1 {
regulator-name = "aldo1";
regulator-min-microvolt = <500000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
2026-01-22 9:43 ` [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
@ 2026-01-22 10:20 ` Rob Herring (Arm)
2026-01-22 12:23 ` Yixun Lan
2026-01-22 16:11 ` Rob Herring
2 siblings, 0 replies; 17+ messages in thread
From: Rob Herring (Arm) @ 2026-01-22 10:20 UTC (permalink / raw)
To: Guodong Xu
Cc: linux-kernel, spacemit, Liam Girdwood, Conor Dooley,
Palmer Dabbelt, Troy Mitchell, Paul Walmsley, Alexandre Ghiti,
Lee Jones, Alex Elder, devicetree, linux-riscv, Yixun Lan,
Albert Ou, Mark Brown, Krzysztof Kozlowski
On Thu, 22 Jan 2026 17:43:43 +0800, Guodong Xu wrote:
> Add supply properties that match the P1 PMIC's actual hardware topology
> where each buck converter has its own VIN pin and LDO groups share
> common input pins. Supply names are defined according to the pinout
> names in the P1 datasheet.
>
> This allows different boards to describe their actual
> power tree connections in devicetree rather than hardcoding supply
> relationships in the driver.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> .../devicetree/bindings/mfd/spacemit,p1.yaml | 58 +++++++++++++++++++++-
> 1 file changed, 56 insertions(+), 2 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/mfd/spacemit,p1.example.dts:13.1-4 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.dtbs:141: Documentation/devicetree/bindings/mfd/spacemit,p1.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1559: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260122-spacemit-p1-v1-2-309be27fbff9@riscstar.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
2026-01-22 9:43 ` [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
2026-01-22 10:20 ` Rob Herring (Arm)
@ 2026-01-22 12:23 ` Yixun Lan
2026-01-22 16:11 ` Rob Herring
2 siblings, 0 replies; 17+ messages in thread
From: Yixun Lan @ 2026-01-22 12:23 UTC (permalink / raw)
To: Guodong Xu
Cc: Liam Girdwood, Mark Brown, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Hi Guodong,
On 17:43 Thu 22 Jan , Guodong Xu wrote:
> Add supply properties that match the P1 PMIC's actual hardware topology
> where each buck converter has its own VIN pin and LDO groups share
> common input pins. Supply names are defined according to the pinout
> names in the P1 datasheet.
>
While checking schematics/docs, I found the SWIN/SWOUT are not
described in the dt-binding? is this intentional? I have no problem
if you plan to implement it separately later, just curious to ask..
In Bananapi F3/Jupiter board, it's used as LCD_VCC5V0 out
> This allows different boards to describe their actual
> power tree connections in devicetree rather than hardcoding supply
> relationships in the driver.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> .../devicetree/bindings/mfd/spacemit,p1.yaml | 58 +++++++++++++++++++++-
> 1 file changed, 56 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> index c6593ac6ef6adb72fc48af570dc13fc9edf77ccb..abdc93b9a67b1872c8fe6955abd950622a0b69e8 100644
> --- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> @@ -27,8 +27,41 @@ properties:
> interrupts:
> maxItems: 1
>
> - vin-supply:
> - description: Input supply phandle.
> + vin1-supply:
> + description:
> + Power supply for BUCK1. Required if BUCK1 is defined.
> +
> + vin2-supply:
> + description:
> + Power supply for BUCK2. Required if BUCK2 is defined.
> +
> + vin3-supply:
> + description:
> + Power supply for BUCK3. Required if BUCK3 is defined.
> +
> + vin4-supply:
> + description:
> + Power supply for BUCK4. Required if BUCK4 is defined.
> +
> + vin5-supply:
> + description:
> + Power supply for BUCK5. Required if BUCK5 is defined.
> +
> + vin6-supply:
> + description:
> + Power supply for BUCK6. Required if BUCK6 is defined.
> +
> + aldoin-supply:
> + description:
> + Power supply for ALDO1-4. Required if any are defined.
> +
> + dldoin1-supply:
> + description:
> + Power supply for DLDO1-4. Required if any are defined.
> +
> + dldoin2-supply:
> + description:
> + Power supply for DLDO5-7. Required if any are defined.
>
> regulators:
> type: object
> @@ -50,6 +83,15 @@ unevaluatedProperties: false
>
> examples:
> - |
> + / {
> + reg_vcc_5v: regulator-vcc-5v {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_5v";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> + };
> +
> i2c {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -58,6 +100,10 @@ examples:
> compatible = "spacemit,p1";
> reg = <0x41>;
> interrupts = <64>;
> + vin1-supply = <®_vcc_5v>;
> + vin5-supply = <®_vcc_5v>;
> + aldoin-supply = <®_vcc_5v>;
> + dldoin1-supply = <&buck5>;
>
> regulators {
> buck1 {
> @@ -68,6 +114,14 @@ examples:
> regulator-always-on;
> };
>
> + buck5: buck5 {
> + regulator-name = "buck5";
> + regulator-min-microvolt = <500000>;
> + regulator-max-microvolt = <3450000>;
> + regulator-ramp-delay = <5000>;
> + regulator-always-on;
> + };
> +
> aldo1 {
> regulator-name = "aldo1";
> regulator-min-microvolt = <500000>;
>
> --
> 2.43.0
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
2026-01-22 9:43 ` [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
2026-01-22 10:20 ` Rob Herring (Arm)
2026-01-22 12:23 ` Yixun Lan
@ 2026-01-22 16:11 ` Rob Herring
2 siblings, 0 replies; 17+ messages in thread
From: Rob Herring @ 2026-01-22 16:11 UTC (permalink / raw)
To: Guodong Xu
Cc: Liam Girdwood, Mark Brown, Yixun Lan, Alex Elder, Lee Jones,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
On Thu, Jan 22, 2026 at 05:43:43PM +0800, Guodong Xu wrote:
> Add supply properties that match the P1 PMIC's actual hardware topology
> where each buck converter has its own VIN pin and LDO groups share
> common input pins. Supply names are defined according to the pinout
> names in the P1 datasheet.
>
> This allows different boards to describe their actual
> power tree connections in devicetree rather than hardcoding supply
> relationships in the driver.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> .../devicetree/bindings/mfd/spacemit,p1.yaml | 58 +++++++++++++++++++++-
> 1 file changed, 56 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> index c6593ac6ef6adb72fc48af570dc13fc9edf77ccb..abdc93b9a67b1872c8fe6955abd950622a0b69e8 100644
> --- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> @@ -27,8 +27,41 @@ properties:
> interrupts:
> maxItems: 1
>
> - vin-supply:
> - description: Input supply phandle.
> + vin1-supply:
> + description:
> + Power supply for BUCK1. Required if BUCK1 is defined.
> +
> + vin2-supply:
> + description:
> + Power supply for BUCK2. Required if BUCK2 is defined.
> +
> + vin3-supply:
> + description:
> + Power supply for BUCK3. Required if BUCK3 is defined.
> +
> + vin4-supply:
> + description:
> + Power supply for BUCK4. Required if BUCK4 is defined.
> +
> + vin5-supply:
> + description:
> + Power supply for BUCK5. Required if BUCK5 is defined.
> +
> + vin6-supply:
> + description:
> + Power supply for BUCK6. Required if BUCK6 is defined.
> +
> + aldoin-supply:
> + description:
> + Power supply for ALDO1-4. Required if any are defined.
> +
> + dldoin1-supply:
> + description:
> + Power supply for DLDO1-4. Required if any are defined.
> +
> + dldoin2-supply:
> + description:
> + Power supply for DLDO5-7. Required if any are defined.
>
> regulators:
> type: object
> @@ -50,6 +83,15 @@ unevaluatedProperties: false
>
> examples:
> - |
> + / {
> + reg_vcc_5v: regulator-vcc-5v {
> + compatible = "regulator-fixed";
> + regulator-name = "vcc_5v";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> + };
Don't put providers into the examples of consumers.
Rob
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/4] regulator: spacemit-p1: Update supply names
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
2026-01-22 9:43 ` [PATCH 1/4] regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators Guodong Xu
2026-01-22 9:43 ` [PATCH 2/4] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
@ 2026-01-22 9:43 ` Guodong Xu
2026-01-22 9:43 ` [PATCH 4/4] riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties Guodong Xu
` (2 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Guodong Xu @ 2026-01-22 9:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Yixun Lan, Alex Elder, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: linux-kernel, linux-riscv, spacemit, devicetree, Guodong Xu
Update supply names to match the P1 PMIC's actual hardware pinout where
each buck has an individual VIN pin (vin1-vin6) and LDO groups have
dedicated input pins (aldoin, dldoin1, dldoin2).
The supply is a board design decision and should not be hardcoded to any
existing power source. This allows boards to specify their actual power
tree topology in devicetree.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
drivers/regulator/spacemit-p1.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/regulator/spacemit-p1.c b/drivers/regulator/spacemit-p1.c
index 2b585ba01a93d0ce163c33e14c8022a506bdce11..57e6e00a73fa416fd6e557eb5bcada7dc69df444 100644
--- a/drivers/regulator/spacemit-p1.c
+++ b/drivers/regulator/spacemit-p1.c
@@ -87,13 +87,16 @@ static const struct linear_range p1_ldo_ranges[] = {
}
#define P1_BUCK_DESC(_n) \
- P1_REG_DESC(BUCK, buck, _n, "vin", 0x47, BUCK_MASK, 255, p1_buck_ranges)
+ P1_REG_DESC(BUCK, buck, _n, "vin" #_n, 0x47, BUCK_MASK, 255, p1_buck_ranges)
#define P1_ALDO_DESC(_n) \
- P1_REG_DESC(ALDO, aldo, _n, "vin", 0x5b, LDO_MASK, 128, p1_ldo_ranges)
+ P1_REG_DESC(ALDO, aldo, _n, "aldoin", 0x5b, LDO_MASK, 128, p1_ldo_ranges)
-#define P1_DLDO_DESC(_n) \
- P1_REG_DESC(DLDO, dldo, _n, "buck5", 0x67, LDO_MASK, 128, p1_ldo_ranges)
+#define P1_DLDO1_DESC(_n) \
+ P1_REG_DESC(DLDO, dldo, _n, "dldoin1", 0x67, LDO_MASK, 128, p1_ldo_ranges)
+
+#define P1_DLDO2_DESC(_n) \
+ P1_REG_DESC(DLDO, dldo, _n, "dldoin2", 0x67, LDO_MASK, 128, p1_ldo_ranges)
static const struct regulator_desc p1_regulator_desc[] = {
P1_BUCK_DESC(1),
@@ -108,13 +111,13 @@ static const struct regulator_desc p1_regulator_desc[] = {
P1_ALDO_DESC(3),
P1_ALDO_DESC(4),
- P1_DLDO_DESC(1),
- P1_DLDO_DESC(2),
- P1_DLDO_DESC(3),
- P1_DLDO_DESC(4),
- P1_DLDO_DESC(5),
- P1_DLDO_DESC(6),
- P1_DLDO_DESC(7),
+ P1_DLDO1_DESC(1),
+ P1_DLDO1_DESC(2),
+ P1_DLDO1_DESC(3),
+ P1_DLDO1_DESC(4),
+ P1_DLDO2_DESC(5),
+ P1_DLDO2_DESC(6),
+ P1_DLDO2_DESC(7),
};
static int p1_regulator_probe(struct platform_device *pdev)
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH 4/4] riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
` (2 preceding siblings ...)
2026-01-22 9:43 ` [PATCH 3/4] regulator: spacemit-p1: Update supply names Guodong Xu
@ 2026-01-22 9:43 ` Guodong Xu
2026-01-22 10:11 ` [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Yixun Lan
2026-01-26 22:10 ` (subset) " Mark Brown
5 siblings, 0 replies; 17+ messages in thread
From: Guodong Xu @ 2026-01-22 9:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Yixun Lan, Alex Elder, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: linux-kernel, linux-riscv, spacemit, devicetree, Guodong Xu
Update individual supply properties in pmic node to accurately specify
the board's power tree topology.
Previously these relationships were hardcoded in the driver; now they
are explicitly defined in the devicetree per the updated binding
document spacemit,p1.yaml.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 02f218a16318e5b6f512bcc37035fac37c25ee84..c30697732b627d764bdae9bc8ba44d7b503f0897 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -157,7 +157,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 {
@@ -188,7 +196,7 @@ buck4 {
regulator-always-on;
};
- buck5 {
+ buck5: buck5 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3450000>;
regulator-ramp-delay = <5000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
` (3 preceding siblings ...)
2026-01-22 9:43 ` [PATCH 4/4] riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties Guodong Xu
@ 2026-01-22 10:11 ` Yixun Lan
2026-01-22 11:27 ` Mark Brown
2026-01-23 8:23 ` Javier Martinez Canillas
2026-01-26 22:10 ` (subset) " Mark Brown
5 siblings, 2 replies; 17+ messages in thread
From: Yixun Lan @ 2026-01-22 10:11 UTC (permalink / raw)
To: Guodong Xu
Cc: Liam Girdwood, Mark Brown, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Hi Guodong,
On 17:43 Thu 22 Jan , Guodong Xu wrote:
> This series fixes hardware voltage constraints and enables flexible power
> tree configurations for the SpacemiT P1 PMIC.
>
> Patch 1, n_voltages is corrected to match hardware register widths, as the
> previous values prevented regulators from reaching higher operational
> voltages (e.g., 3.3V on LDOs).
>
> Patch 2-4, hardcoded supply assumptions are replaced with explicit
> devicetree properties. PMIC supply connections are board-design decisions.
> Moving this to DT allows supporting varied topologies without driver
> modifications.
>
> Note: Patch 3 introduces a bisect breakage by transitioning to
> pin-specific supply names. Probe failures will occur on existing board
> (K1 Bananapi F3) until Patch 4 updates the corresponding DTS file.
This patch bring system-wide change that not only affect Bananapi F3..
Please also provide fix for other boards, I think you may not be able
to test all boards, but make sure the patches are available, so people
who interested can test, P.S I can help on milkv jupiter board
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> Guodong Xu (4):
> regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
> dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
> regulator: spacemit-p1: Update supply names
> riscv: dts: spacemit: k1-bananapi-f3: Update PMIC supply properties
>
> .../devicetree/bindings/mfd/spacemit,p1.yaml | 58 +++++++++++++++++++++-
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 12 ++++-
> drivers/regulator/spacemit-p1.c | 25 ++++++----
> 3 files changed, 80 insertions(+), 15 deletions(-)
> ---
> base-commit: c8a4a774a9b0d2c86593492625874e27e9cbc9a9
> change-id: 20260122-spacemit-p1-ae596efe885f
>
> Best regards,
> --
> Guodong Xu <guodong@riscstar.com>
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 10:11 ` [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Yixun Lan
@ 2026-01-22 11:27 ` Mark Brown
2026-01-22 12:12 ` Yixun Lan
2026-01-23 8:23 ` Javier Martinez Canillas
1 sibling, 1 reply; 17+ messages in thread
From: Mark Brown @ 2026-01-22 11:27 UTC (permalink / raw)
To: Yixun Lan
Cc: Guodong Xu, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
[-- Attachment #1: Type: text/plain, Size: 622 bytes --]
On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> On 17:43 Thu 22 Jan , Guodong Xu wrote:
> > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > previous values prevented regulators from reaching higher operational
> > voltages (e.g., 3.3V on LDOs).
> This patch bring system-wide change that not only affect Bananapi F3..
> Please also provide fix for other boards, I think you may not be able
> to test all boards, but make sure the patches are available, so people
> who interested can test, P.S I can help on milkv jupiter board
Patch 1 looks like it should be OK as is?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 11:27 ` Mark Brown
@ 2026-01-22 12:12 ` Yixun Lan
2026-01-22 13:28 ` Mark Brown
2026-01-22 14:55 ` Guodong Xu
0 siblings, 2 replies; 17+ messages in thread
From: Yixun Lan @ 2026-01-22 12:12 UTC (permalink / raw)
To: Mark Brown
Cc: Guodong Xu, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Hi Mark,
On 11:27 Thu 22 Jan , Mark Brown wrote:
> On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > On 17:43 Thu 22 Jan , Guodong Xu wrote:
>
> > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > previous values prevented regulators from reaching higher operational
> > > voltages (e.g., 3.3V on LDOs).
>
> > This patch bring system-wide change that not only affect Bananapi F3..
>
> > Please also provide fix for other boards, I think you may not be able
> > to test all boards, but make sure the patches are available, so people
> > who interested can test, P.S I can help on milkv jupiter board
>
> Patch 1 looks like it should be OK as is?
then with patch 3, and for other boards (milkv jupiter), should have similar
DT fix as patch 4..
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 12:12 ` Yixun Lan
@ 2026-01-22 13:28 ` Mark Brown
2026-01-22 13:41 ` Yixun Lan
2026-01-22 14:55 ` Guodong Xu
1 sibling, 1 reply; 17+ messages in thread
From: Mark Brown @ 2026-01-22 13:28 UTC (permalink / raw)
To: Yixun Lan
Cc: Guodong Xu, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Thu, Jan 22, 2026 at 08:12:23PM +0800, Yixun Lan wrote:
> On 11:27 Thu 22 Jan , Mark Brown wrote:
> > Patch 1 looks like it should be OK as is?
> then with patch 3, and for other boards (milkv jupiter), should have similar
> DT fix as patch 4..
Yes, changing the supply names would at a minimum need all the boards
updating (it's an ABI change so shouldn't really happen, but perhaps
there are few enough users for everyone to coordinate and it's what you
all prefer). Patch 1 shouldn't have any effect unless a board already
specifies a wider range than the driver currently supports.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 13:28 ` Mark Brown
@ 2026-01-22 13:41 ` Yixun Lan
0 siblings, 0 replies; 17+ messages in thread
From: Yixun Lan @ 2026-01-22 13:41 UTC (permalink / raw)
To: Mark Brown
Cc: Guodong Xu, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Hi Mark,
On 13:28 Thu 22 Jan , Mark Brown wrote:
> On Thu, Jan 22, 2026 at 08:12:23PM +0800, Yixun Lan wrote:
> > On 11:27 Thu 22 Jan , Mark Brown wrote:
>
> > > Patch 1 looks like it should be OK as is?
>
> > then with patch 3, and for other boards (milkv jupiter), should have similar
> > DT fix as patch 4..
>
> Yes, changing the supply names would at a minimum need all the boards
> updating (it's an ABI change so shouldn't really happen, but perhaps
> there are few enough users for everyone to coordinate and it's what you
yes, that's what I care..
> all prefer). Patch 1 shouldn't have any effect unless a board already
> specifies a wider range than the driver currently supports.
I realized you were talking about patch 1 only, and plan to take it?
then yes, please feel free to do it..
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 12:12 ` Yixun Lan
2026-01-22 13:28 ` Mark Brown
@ 2026-01-22 14:55 ` Guodong Xu
2026-01-22 22:09 ` Yixun Lan
1 sibling, 1 reply; 17+ messages in thread
From: Guodong Xu @ 2026-01-22 14:55 UTC (permalink / raw)
To: Yixun Lan
Cc: Mark Brown, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
On Thu, Jan 22, 2026 at 8:12 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> Hi Mark,
>
> On 11:27 Thu 22 Jan , Mark Brown wrote:
> > On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > > On 17:43 Thu 22 Jan , Guodong Xu wrote:
> >
> > > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > > previous values prevented regulators from reaching higher operational
> > > > voltages (e.g., 3.3V on LDOs).
> >
> > > This patch bring system-wide change that not only affect Bananapi F3..
> >
> > > Please also provide fix for other boards, I think you may not be able
> > > to test all boards, but make sure the patches are available, so people
> > > who interested can test, P.S I can help on milkv jupiter board
> >
> > Patch 1 looks like it should be OK as is?
> then with patch 3, and for other boards (milkv jupiter), should have similar
> DT fix as patch 4..
There is no "spacemit,p1" node in other k1 boards (milkv jupiter).
Best regards,
Guodong Xu
>
> --
> Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 14:55 ` Guodong Xu
@ 2026-01-22 22:09 ` Yixun Lan
0 siblings, 0 replies; 17+ messages in thread
From: Yixun Lan @ 2026-01-22 22:09 UTC (permalink / raw)
To: Guodong Xu
Cc: Mark Brown, Liam Girdwood, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Hi Guodong,
On 22:55 Thu 22 Jan , Guodong Xu wrote:
> On Thu, Jan 22, 2026 at 8:12 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > Hi Mark,
> >
> > On 11:27 Thu 22 Jan , Mark Brown wrote:
> > > On Thu, Jan 22, 2026 at 06:11:22PM +0800, Yixun Lan wrote:
> > > > On 17:43 Thu 22 Jan , Guodong Xu wrote:
> > >
> > > > > Patch 1, n_voltages is corrected to match hardware register widths, as the
> > > > > previous values prevented regulators from reaching higher operational
> > > > > voltages (e.g., 3.3V on LDOs).
> > >
> > > > This patch bring system-wide change that not only affect Bananapi F3..
> > >
> > > > Please also provide fix for other boards, I think you may not be able
> > > > to test all boards, but make sure the patches are available, so people
> > > > who interested can test, P.S I can help on milkv jupiter board
> > >
> > > Patch 1 looks like it should be OK as is?
> > then with patch 3, and for other boards (milkv jupiter), should have similar
> > DT fix as patch 4..
>
> There is no "spacemit,p1" node in other k1 boards (milkv jupiter).
>
yes, there is one which accepted during this merge window, and will show up
in v6.20, please check spacemit tree [1] or [2]
Link: https://github.com/spacemit-com/linux/tree/k1/dt-for-next [1]
Link: https://lore.kernel.org/r/176618016976.76638.11221127377007758575.b4-ty@gentoo.org [2]
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 10:11 ` [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Yixun Lan
2026-01-22 11:27 ` Mark Brown
@ 2026-01-23 8:23 ` Javier Martinez Canillas
1 sibling, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2026-01-23 8:23 UTC (permalink / raw)
To: Yixun Lan, Guodong Xu
Cc: Liam Girdwood, Mark Brown, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-kernel,
linux-riscv, spacemit, devicetree
Yixun Lan <dlan@gentoo.org> writes:
Hello Yixun and Guodong,
> Hi Guodong,
>
> On 17:43 Thu 22 Jan , Guodong Xu wrote:
>> This series fixes hardware voltage constraints and enables flexible power
>> tree configurations for the SpacemiT P1 PMIC.
>>
>> Patch 1, n_voltages is corrected to match hardware register widths, as the
>> previous values prevented regulators from reaching higher operational
>> voltages (e.g., 3.3V on LDOs).
>>
>> Patch 2-4, hardcoded supply assumptions are replaced with explicit
>> devicetree properties. PMIC supply connections are board-design decisions.
>> Moving this to DT allows supporting varied topologies without driver
>> modifications.
>>
>> Note: Patch 3 introduces a bisect breakage by transitioning to
>> pin-specific supply names. Probe failures will occur on existing board
>> (K1 Bananapi F3) until Patch 4 updates the corresponding DTS file.
> This patch bring system-wide change that not only affect Bananapi F3..
>
> Please also provide fix for other boards, I think you may not be able
> to test all boards, but make sure the patches are available, so people
> who interested can test, P.S I can help on milkv jupiter board
>
I can also help testing on the milkv jupiter board.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree
2026-01-22 9:43 [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Guodong Xu
` (4 preceding siblings ...)
2026-01-22 10:11 ` [PATCH 0/4] regulator: spacemit-p1: Fix voltage ranges and support board power tree Yixun Lan
@ 2026-01-26 22:10 ` Mark Brown
5 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2026-01-26 22:10 UTC (permalink / raw)
To: Liam Girdwood, Yixun Lan, Alex Elder, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Troy Mitchell, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Guodong Xu
Cc: linux-kernel, linux-riscv, spacemit, devicetree
On Thu, 22 Jan 2026 17:43:41 +0800, Guodong Xu wrote:
> This series fixes hardware voltage constraints and enables flexible power
> tree configurations for the SpacemiT P1 PMIC.
>
> Patch 1, n_voltages is corrected to match hardware register widths, as the
> previous values prevented regulators from reaching higher operational
> voltages (e.g., 3.3V on LDOs).
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/4] regulator: spacemit-p1: Fix n_voltages for BUCK and LDO regulators
commit: 41399c5d476156635c9a58de870d39318e22fa09
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 17+ messages in thread