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
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
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)
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.
© 2016 - 2026 Red Hat, Inc.