mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] regulator: spacemit-p1: Support board power tree via DT properties
@ 2026-02-04 13:23 Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Guodong Xu @ 2026-02-04 13:23 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

The patch (Patch 1 in v1 and v2) fixing hardware voltage constraints was
applied to regulator.git for-next, so it is dropped from this series.

Patch 1, 2 and 3 (previously 2-4) enables flexible power tree
configurations for the SpacemiT P1 PMIC. 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.

The supply binding change is an ABI change. The breakage is acceptable:
Yixun Lan checked the DTS tree queued for v6.20 and found no consumers
of the P1/PMIC regulator yet [1]. For the two K1 boards in-tree
(BPI-F3 and Jupiter), initial power settings come from boot firmware and
a probe failure of pmic node "spacemit,p1" has minimal impact.

Link: https://lore.kernel.org/lkml/20260125110333-GYD71302@gentoo.org/ [1]

Changes in v3:
- Drop Patch 1 of previous series, already applied to regulator.git
    for-next (commit 41399c5d4761).
- Patch 1 (previous 2): Mark "vin-supply" as deprecated to avoid
    cross-tree warnings.
- Patch 2 (previous 3): Describe the ABI change explicitly. Add
    justification.
- Link to v2: https://lore.kernel.org/r/20260124-spacemit-p1-v2-0-2c86b06694ba@riscstar.com

Changes in v2:
- Patch 2: dt-bindings, remove providers from the example dts.
- Patch 4: Added the pmic supply properties for K1 Milkv Jupiter.
           Updated the commit message accordingly.
- Link to v1: https://lore.kernel.org/r/20260122-spacemit-p1-v1-0-309be27fbff9@riscstar.com

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
Guodong Xu (3):
      dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
      regulator: spacemit-p1: Update supply names
      riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter

 .../devicetree/bindings/mfd/spacemit,p1.yaml       | 53 +++++++++++++++++++++-
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    | 12 ++++-
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts  | 12 ++++-
 drivers/regulator/spacemit-p1.c                    | 25 +++++-----
 4 files changed, 86 insertions(+), 16 deletions(-)
---
base-commit: 5164e95565d3fd508ca8a95351323f5716dfb695
change-id: 20260122-spacemit-p1-ae596efe885f
prerequisite-patch-id: 154bd4f720ce5065d58b988de8f273207b44572e

Best regards,
-- 
Guodong Xu <guodong@riscstar.com>


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

* [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
  2026-02-04 13:23 [PATCH v3 0/3] regulator: spacemit-p1: Support board power tree via DT properties Guodong Xu
@ 2026-02-04 13:23 ` Guodong Xu
  2026-02-04 18:07   ` Conor Dooley
  2026-02-04 13:23 ` [PATCH v3 2/3] regulator: spacemit-p1: Update supply names Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 3/3] riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter Guodong Xu
  2 siblings, 1 reply; 8+ messages in thread
From: Guodong Xu @ 2026-02-04 13:23 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.

The existing "vin-supply" is marked as deprecated to avoid warnings
as dts and dt-bindings go via different trees.

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
v3: Mark vin-supply as deprecated.
v2: Remove providers from the dts example.
    Pass the 'make dt_binding_check' test.
---
 .../devicetree/bindings/mfd/spacemit,p1.yaml       | 53 +++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
index c6593ac6ef6a..41f784408e29 100644
--- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
+++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
@@ -28,7 +28,46 @@ properties:
     maxItems: 1
 
   vin-supply:
-    description: Input supply phandle.
+    deprecated: true
+    description:
+      Main power input (deprecated). Use individual vin1-6, aldoin,
+      dldoin1, and dldoin2 supply properties instead.
+
+  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
@@ -58,6 +97,10 @@ examples:
             compatible = "spacemit,p1";
             reg = <0x41>;
             interrupts = <64>;
+            vin1-supply = <&reg_vcc_5v>;
+            vin5-supply = <&reg_vcc_5v>;
+            aldoin-supply = <&reg_vcc_5v>;
+            dldoin1-supply = <&buck5>;
 
             regulators {
                 buck1 {
@@ -68,6 +111,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	[flat|nested] 8+ messages in thread

* [PATCH v3 2/3] regulator: spacemit-p1: Update supply names
  2026-02-04 13:23 [PATCH v3 0/3] regulator: spacemit-p1: Support board power tree via DT properties Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
@ 2026-02-04 13:23 ` Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 3/3] riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter Guodong Xu
  2 siblings, 0 replies; 8+ messages in thread
From: Guodong Xu @ 2026-02-04 13:23 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).

This is an ABI change from the original "vin" and "buck5" supplies.
The P1/PMIC regulator has no consumers in the DTS tree yet. For the two
K1 boards in-tree (BPI-F3 and Jupiter), power settings come from
boot firmware, so a probe failure has minimal impact.

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
v3: No code change.
    Update the commit message to state ABI change explicitly.
v2: No change.
---
 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 2b585ba01a93..57e6e00a73fa 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	[flat|nested] 8+ messages in thread

* [PATCH v3 3/3] riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter
  2026-02-04 13:23 [PATCH v3 0/3] regulator: spacemit-p1: Support board power tree via DT properties Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
  2026-02-04 13:23 ` [PATCH v3 2/3] regulator: spacemit-p1: Update supply names Guodong Xu
@ 2026-02-04 13:23 ` Guodong Xu
  2 siblings, 0 replies; 8+ messages in thread
From: Guodong Xu @ 2026-02-04 13:23 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

Use per-regulator supply names in pmic "spacemit,p1" node to specify
each board's power tree topology and match the updated dt-binding.

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
v3: No code change. Updated commit message to be more precise.
v2: Added the pmic supply properties for K1 Milkv Jupiter.
    Updated the commit message accordingly.
---
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts   | 12 ++++++++++--
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 5971605754b3..444c3b1e6f44 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -190,7 +190,15 @@ pmic@41 {
 		compatible = "spacemit,p1";
 		reg = <0x41>;
 		interrupts = <64>;
-		vin-supply = <&reg_vcc_4v>;
+		vin1-supply = <&reg_vcc_4v>;
+		vin2-supply = <&reg_vcc_4v>;
+		vin3-supply = <&reg_vcc_4v>;
+		vin4-supply = <&reg_vcc_4v>;
+		vin5-supply = <&reg_vcc_4v>;
+		vin6-supply = <&reg_vcc_4v>;
+		aldoin-supply = <&reg_vcc_4v>;
+		dldoin1-supply = <&buck5>;
+		dldoin2-supply = <&buck5>;
 
 		regulators {
 			buck1 {
@@ -221,7 +229,7 @@ buck4 {
 				regulator-always-on;
 			};
 
-			buck5 {
+			buck5: buck5 {
 				regulator-min-microvolt = <500000>;
 				regulator-max-microvolt = <3450000>;
 				regulator-ramp-delay = <5000>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 800a112d5d70..e2702a781734 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -100,7 +100,15 @@ pmic@41 {
 		compatible = "spacemit,p1";
 		reg = <0x41>;
 		interrupts = <64>;
-		vin-supply = <&reg_vcc_4v>;
+		vin1-supply = <&reg_vcc_4v>;
+		vin2-supply = <&reg_vcc_4v>;
+		vin3-supply = <&reg_vcc_4v>;
+		vin4-supply = <&reg_vcc_4v>;
+		vin5-supply = <&reg_vcc_4v>;
+		vin6-supply = <&reg_vcc_4v>;
+		aldoin-supply = <&reg_vcc_4v>;
+		dldoin1-supply = <&buck5>;
+		dldoin2-supply = <&buck5>;
 
 		regulators {
 			buck1 {
@@ -131,7 +139,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	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
  2026-02-04 13:23 ` [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
@ 2026-02-04 18:07   ` Conor Dooley
  2026-02-05  7:42     ` Guodong Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2026-02-04 18:07 UTC (permalink / raw)
  To: Guodong Xu
  Cc: 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,
	linux-kernel, linux-riscv, spacemit, devicetree

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

On Wed, Feb 04, 2026 at 09:23:01PM +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.
> 
> The existing "vin-supply" is marked as deprecated to avoid warnings
> as dts and dt-bindings go via different trees.
> 
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> v3: Mark vin-supply as deprecated.
> v2: Remove providers from the dts example.
>     Pass the 'make dt_binding_check' test.
> ---
>  .../devicetree/bindings/mfd/spacemit,p1.yaml       | 53 +++++++++++++++++++++-
>  1 file changed, 52 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> index c6593ac6ef6a..41f784408e29 100644
> --- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> +++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> @@ -28,7 +28,46 @@ properties:
>      maxItems: 1
>  
>    vin-supply:
> -    description: Input supply phandle.
> +    deprecated: true
> +    description:
> +      Main power input (deprecated). Use individual vin1-6, aldoin,
> +      dldoin1, and dldoin2 supply properties instead.

What's the point documenting the deprecated version if it doesn't work
anymore?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
  2026-02-04 18:07   ` Conor Dooley
@ 2026-02-05  7:42     ` Guodong Xu
  2026-02-05 19:15       ` Conor Dooley
  0 siblings, 1 reply; 8+ messages in thread
From: Guodong Xu @ 2026-02-05  7:42 UTC (permalink / raw)
  To: Conor Dooley, Rob Herring
  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, Feb 5, 2026 at 2:07 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Feb 04, 2026 at 09:23:01PM +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.
> >
> > The existing "vin-supply" is marked as deprecated to avoid warnings
> > as dts and dt-bindings go via different trees.
> >
> > Signed-off-by: Guodong Xu <guodong@riscstar.com>
> > ---
> > v3: Mark vin-supply as deprecated.
> > v2: Remove providers from the dts example.
> >     Pass the 'make dt_binding_check' test.
> > ---
> >  .../devicetree/bindings/mfd/spacemit,p1.yaml       | 53 +++++++++++++++++++++-
> >  1 file changed, 52 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > index c6593ac6ef6a..41f784408e29 100644
> > --- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > @@ -28,7 +28,46 @@ properties:
> >      maxItems: 1
> >
> >    vin-supply:
> > -    description: Input supply phandle.
> > +    deprecated: true
> > +    description:
> > +      Main power input (deprecated). Use individual vin1-6, aldoin,
> > +      dldoin1, and dldoin2 supply properties instead.
>
> What's the point documenting the deprecated version if it doesn't work
> anymore?

Keeping "vin-supply" in the binding with "deprecated: true" avoids a cross-tree
warning. Since dts and dt-bindings go via different trees, the new binding +
old dts triggers:

pmic@41 (spacemit,p1): Unevaluated properties are not allowed
('vin-supply' was unexpected)

Rob flagged this in [1] as 'intermittent warnings'.

I'm open to dropping the deprecated markup, maybe just accepting the
transient warning is fine?

Link: https://lore.kernel.org/all/20260129181604.GA1398997-robh@kernel.org/ [1]

Best regards,
Guodong Xu

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

* Re: [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
  2026-02-05  7:42     ` Guodong Xu
@ 2026-02-05 19:15       ` Conor Dooley
  2026-02-05 19:25         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2026-02-05 19:15 UTC (permalink / raw)
  To: Guodong Xu
  Cc: Rob Herring, 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

[-- Attachment #1: Type: text/plain, Size: 2849 bytes --]

On Thu, Feb 05, 2026 at 03:42:01PM +0800, Guodong Xu wrote:
> On Thu, Feb 5, 2026 at 2:07 AM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Wed, Feb 04, 2026 at 09:23:01PM +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.
> > >
> > > The existing "vin-supply" is marked as deprecated to avoid warnings
> > > as dts and dt-bindings go via different trees.
> > >
> > > Signed-off-by: Guodong Xu <guodong@riscstar.com>
> > > ---
> > > v3: Mark vin-supply as deprecated.
> > > v2: Remove providers from the dts example.
> > >     Pass the 'make dt_binding_check' test.
> > > ---
> > >  .../devicetree/bindings/mfd/spacemit,p1.yaml       | 53 +++++++++++++++++++++-
> > >  1 file changed, 52 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > > index c6593ac6ef6a..41f784408e29 100644
> > > --- a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > > +++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
> > > @@ -28,7 +28,46 @@ properties:
> > >      maxItems: 1
> > >
> > >    vin-supply:
> > > -    description: Input supply phandle.
> > > +    deprecated: true
> > > +    description:
> > > +      Main power input (deprecated). Use individual vin1-6, aldoin,
> > > +      dldoin1, and dldoin2 supply properties instead.
> >
> > What's the point documenting the deprecated version if it doesn't work
> > anymore?
> 
> Keeping "vin-supply" in the binding with "deprecated: true" avoids a cross-tree
> warning. Since dts and dt-bindings go via different trees, the new binding +
> old dts triggers:
> 
> pmic@41 (spacemit,p1): Unevaluated properties are not allowed
> ('vin-supply' was unexpected)
> 
> Rob flagged this in [1] as 'intermittent warnings'.
> 
> I'm open to dropping the deprecated markup, maybe just accepting the
> transient warning is fine?

I'd rather have the warning in linux-next or for a short period of time
in Linus' tree during the merge window, than have the binding document
something that no longer works. To me, the deprecated tag in a binding
means "this used to be how things were done, and still works, but we
don't want you to use it because of xyz reason". Things that don't work
should produce warnings to stop people using them. You provided a fairly
good justification for breaking the ABI, just commit to that and remove
the old/incorrect way of doing things.

> 
> Link: https://lore.kernel.org/all/20260129181604.GA1398997-robh@kernel.org/ [1]
> 
> Best regards,
> Guodong Xu

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties
  2026-02-05 19:15       ` Conor Dooley
@ 2026-02-05 19:25         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-05 19:25 UTC (permalink / raw)
  To: Conor Dooley, Guodong Xu
  Cc: Rob Herring, 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 05/02/2026 20:15, Conor Dooley wrote:
>>>>
>>>>    vin-supply:
>>>> -    description: Input supply phandle.
>>>> +    deprecated: true
>>>> +    description:
>>>> +      Main power input (deprecated). Use individual vin1-6, aldoin,
>>>> +      dldoin1, and dldoin2 supply properties instead.
>>>
>>> What's the point documenting the deprecated version if it doesn't work
>>> anymore?
>>
>> Keeping "vin-supply" in the binding with "deprecated: true" avoids a cross-tree
>> warning. Since dts and dt-bindings go via different trees, the new binding +
>> old dts triggers:
>>
>> pmic@41 (spacemit,p1): Unevaluated properties are not allowed
>> ('vin-supply' was unexpected)
>>
>> Rob flagged this in [1] as 'intermittent warnings'.
>>
>> I'm open to dropping the deprecated markup, maybe just accepting the
>> transient warning is fine?
> 
> I'd rather have the warning in linux-next or for a short period of time
> in Linus' tree during the merge window, than have the binding document
> something that no longer works. To me, the deprecated tag in a binding
> means "this used to be how things were done, and still works, but we
> don't want you to use it because of xyz reason". Things that don't work

I agree, deprecated still should mean the interface is supported.
Otherwise, after applying the DTS patches, what is the point of keeping
such deprecated property? Very little benefits.

> should produce warnings to stop people using them. You provided a fairly
> good justification for breaking the ABI, just commit to that and remove
> the old/incorrect way of doing things.
> 


Best regards,
Krzysztof

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

end of thread, other threads:[~2026-02-05 19:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04 13:23 [PATCH v3 0/3] regulator: spacemit-p1: Support board power tree via DT properties Guodong Xu
2026-02-04 13:23 ` [PATCH v3 1/3] dt-bindings: mfd: spacemit,p1: Add individual regulator supply properties Guodong Xu
2026-02-04 18:07   ` Conor Dooley
2026-02-05  7:42     ` Guodong Xu
2026-02-05 19:15       ` Conor Dooley
2026-02-05 19:25         ` Krzysztof Kozlowski
2026-02-04 13:23 ` [PATCH v3 2/3] regulator: spacemit-p1: Update supply names Guodong Xu
2026-02-04 13:23 ` [PATCH v3 3/3] riscv: dts: spacemit: Update PMIC supply properties for BPI-F3 and Jupiter Guodong Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome