Skip to contentSkip to conversation

ARM: st: use a correct pwr compatible for stm32mp15

PATCH Superseded Patrick Delaunay 3 participants 12 messages Apr 25, 2024 – Apr 26, 2024

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#4 lore raw

PATCH 2/3 regulator: stm32-pwr: add support of correct compatible

In reply to Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg", and support the new compatible "st,stm32mp1-pwr-reg".
The old compatible is keept for compatibility with old device trees.

---

 drivers/regulator/stm32-pwr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/regulator/stm32-pwr.c +1 -0
index 85b0102fb9b1..f6a761167726 100644
@@ -165,6 +165,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id __maybe_unused stm32_pwr_of_match[] = {
+	{ .compatible = "st,stm32mp1-pwr-reg", },
 	{ .compatible = "st,stm32mp1,pwr-reg", },
 	{},
 };
Signature · 1 line
2.25.1
#0 lore raw

cover ARM: st: use a correct pwr compatible for stm32mp15

This patchset removes the unexpected comma in the PWR compatible "st,stm32mp1,pwr-reg" and uses a new compatible "st,stm32mp1-pwr-reg" in STM3MP15 device trees.

The support of old compatible is keep to avoid ABI break.

Patrick Delaunay (3):
dt-bindings: regulator: st,stm32mp1-pwr-reg: add correct compatible
regulator: stm32-pwr: add support of correct compatible
ARM: dts: st: update the pwr compatible for stm32mp15

 .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml  | 6 ++++--
 arch/arm/boot/dts/st/stm32mp151.dtsi                        | 2 +-
 drivers/regulator/stm32-pwr.c                               | 1 +
 3 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/3 dt-bindings: regulator: st,stm32mp1-pwr-reg: add correct compatible

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg" and define the new compatible "st,stm32mp1-pwr-reg".
The old compatible is only keep for compatibility with old device trees.

---

 .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +4 -2
index c9586d277f41..2a52f9e769c2 100644
@@ -11,7 +11,9 @@ maintainers:
 
 properties:
   compatible:
-    const: st,stm32mp1,pwr-reg
+    enum:
+      - st,stm32mp1-pwr-reg
+      - st,stm32mp1,pwr-reg
 
   reg:
     maxItems: 1
@@ -37,7 +39,7 @@ additionalProperties: false
 examples:
   - |
     pwr@50001000 {
-      compatible = "st,stm32mp1,pwr-reg";
+      compatible = "st,stm32mp1-pwr-reg";
       reg = <0x50001000 0x10>;
       vdd-supply = <&vdd>;
       vdd_3v3_usbfs-supply = <&vdd_usb>;
Signature · 1 line
2.25.1
#5 lore raw

PATCH 3/3 ARM: dts: st: update the pwr compatible for stm32mp15

In reply to Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg", and use the new supported compatible "st,stm32mp1-pwr-reg" in STM3MP15 SoC dtsi.

---

 arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/st/stm32mp151.dtsi +1 -1
index 16bd6eee32b4..702cdaa1343a 100644
@@ -144,7 +144,7 @@ rcc: rcc@50000000 {
 		};
 
 		pwr_regulators: pwr@50001000 {
-			compatible = "st,stm32mp1,pwr-reg";
+			compatible = "st,stm32mp1-pwr-reg";
 			reg = <0x50001000 0x10>;
 
 			reg11: reg11 {
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 1/3] dt-bindings: regulator: st,stm32mp1-pwr-reg: add correct compatible

In reply to Patrick Delaunay
Quoted 15 lines · Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg" and define the new compatible "st,stm32mp1-pwr-reg".
The old compatible is only keep for compatibility with old device trees.

---

 .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +0 -0
index c9586d277f41..2a52f9e769c2 100644

Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml maintainers: · line 16

Quoted 7 lines
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +3 -1
@@ -11,7 +11,9 @@ maintainers:
 
 properties:
   compatible:
-    const: st,stm32mp1,pwr-reg
+    enum:
+      - st,stm32mp1-pwr-reg
+      - st,stm32mp1,pwr-reg

Please make it oneOf:
- const: new one
- const: old one
deprecated: true

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH 3/3] ARM: dts: st: update the pwr compatible for stm32mp15

In reply to Patrick Delaunay
Quoted 9 lines · Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg", and use the new supported compatible "st,stm32mp1-pwr-reg" in STM3MP15 SoC dtsi.

---

 arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This will break the users and is not bisectable, so patch should wait at least one cycle. This will preserve bisectability, although users will be affected anyway.

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH 3/3] ARM: dts: st: update the pwr compatible for stm32mp15

Hi,

Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg", and use the new supported compatible "st,stm32mp1-pwr-reg" in STM3MP15 SoC dtsi.

Quoted 8 lines
Quoted 5 lines

---

  arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

This will break the users and is not bisectable, so patch should wait at least one cycle. This will preserve bisectability, although users will be affected anyway.

Sorry, I didn't know this constraint

But Ok, I remove this patch in serie V2 and push it later.

Quoted 3 lines

Best regards,
Krzysztof

Regards,

Patrick

#3 lore raw

Re: [PATCH 1/3] dt-bindings: regulator: st,stm32mp1-pwr-reg: add correct compatible

In reply to Krzysztof Kozlowski

Hi,

Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Patrick Delaunay

Remove the unexpected comma in the compatible "st,stm32mp1,pwr-reg" and define the new compatible "st,stm32mp1-pwr-reg".
The old compatible is only keep for compatibility with old device trees.

---

  .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml  | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +0 -0
index c9586d277f41..2a52f9e769c2 100644
@@ -11,7 +11,9 @@ maintainers:
 
Quoted 10 lines

Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml maintainers: · line 16

Quoted 6 lines
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml +3 -1
  properties:
    compatible:
-    const: st,stm32mp1,pwr-reg
+    enum:
+      - st,stm32mp1-pwr-reg
+      - st,stm32mp1,pwr-reg

Please make it oneOf:
- const: new one
- const: old one
deprecated: true

ok, I push a V2 soon.

Quoted 3 lines

Best regards,
Krzysztof

Regards

Patrick

maintainer
#8 lore raw
In reply to Patrick Delaunay
Quoted 4 lines · Patrick Delaunay

This patchset removes the unexpected comma in the PWR compatible "st,stm32mp1,pwr-reg" and uses a new compatible "st,stm32mp1-pwr-reg" in STM3MP15 device trees.

Why? I don't see any warnings from this. Yes, we wouldn't new cases following this pattern, but I don't think it is worth maintaining support for both strings. We're stuck with it. And the only way to maintain forward compatibility is:

compatible = "st,stm32mp1-pwr-reg", "st,stm32mp1,pwr-reg";

Rob

#9 lore raw

Hi,

Quoted 8 lines · Rob Herring
Quoted 3 lines · Patrick Delaunay

This patchset removes the unexpected comma in the PWR compatible "st,stm32mp1,pwr-reg" and uses a new compatible "st,stm32mp1-pwr-reg" in STM3MP15 device trees.

Why? I don't see any warnings from this. Yes, we wouldn't new cases following this pattern, but I don't think it is worth maintaining support for both strings. We're stuck with it. And the only way to maintain forward compatibility is:

Yes, no warning because the compatible string are not yet checked by tools.

I propose this patch to avoid the usage of this compatible for other SoC in STM32MP1 family.

I see the invalid compatible string when I reviewed the U-Boot patch to add the PWR node for STM32MP13 family:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

So I prefer change the PWR binding before to have the same patch applied on Linux device tree

Quoted 1 line

compatible = "st,stm32mp1-pwr-reg", "st,stm32mp1,pwr-reg";

Yes, I will update the SoC patch with you proposal.

it is the only way to have compatibility of OLD Linux kernel (with old driver) with NEW device tree.

I miss this compatibility issue.

Quoted 5 lines

Rob

Regards

Patrick

maintainer
#10 lore raw
Quoted 8 lines · Patrick DELAUNAY

Hi,

Quoted 4 lines · Rob Herring
Quoted 3 lines · Patrick Delaunay

This patchset removes the unexpected comma in the PWR compatible "st,stm32mp1,pwr-reg" and uses a new compatible "st,stm32mp1-pwr-reg" in STM3MP15 device trees.

Quoted 7 lines
Quoted 4 lines

Why? I don't see any warnings from this. Yes, we wouldn't new cases following this pattern, but I don't think it is worth maintaining support for both strings. We're stuck with it. And the only way to maintain forward compatibility is:

Yes, no warning because the compatible string are not yet checked by tools.

What do you mean? There's a schema for it, so it is checked. I ran the tools and there's no warning. If there was a warning, I'd fix the tools in this case.

Quoted 9 lines

I propose this patch to avoid the usage of this compatible for other SoC in STM32MP1 family.

I see the invalid compatible string when I reviewed the U-Boot patch to add the PWR node for STM32MP13 family:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Perhaps you should add SoC specific compatible string instead.

Quoted 7 lines

So I prefer change the PWR binding before to have the same patch applied on Linux device tree

Quoted 1 line

compatible = "st,stm32mp1-pwr-reg", "st,stm32mp1,pwr-reg";

Yes, I will update the SoC patch with you proposal.

NO! We don't want to support that.

We have *tons* of examples in DT which don't follow recommended patterns and we're stuck with them. This is no different. We can get away with changing node names, but that's about it.

Rob

#11 lore raw

Hi,

Quoted 14 lines · Rob Herring
Quoted 12 lines · Patrick DELAUNAY

Hi,

Quoted 8 lines · Rob Herring
Quoted 3 lines · Patrick Delaunay

This patchset removes the unexpected comma in the PWR compatible "st,stm32mp1,pwr-reg" and uses a new compatible "st,stm32mp1-pwr-reg" in STM3MP15 device trees.

Why? I don't see any warnings from this. Yes, we wouldn't new cases following this pattern, but I don't think it is worth maintaining support for both strings. We're stuck with it. And the only way to maintain forward compatibility is:

Quoted 4 lines
Quoted 1 line

Yes, no warning because the compatible string are not yet checked by tools.

What do you mean? There's a schema for it, so it is checked. I ran the tools and there's no warning. If there was a warning, I'd fix the tools in this case.

Sorry, I am  no clear

the tools (dts check or check patch) don't check the recommendation for compatible name:

    vendor specific string in the form|<vendor>,[<device>-]<usage>|

|   => for me: compatible should have only one comma,
              used as separator between vendor prefix end the device identifier.|

But it is normal because existing device tree have a already lot a strange compatible

Quoted 10 lines
Quoted 9 lines

I propose this patch to avoid the usage of this compatible for other SoC in STM32MP1 family.

I see the invalid compatible string when I reviewed the U-Boot patch to add the PWR node for STM32MP13 family:

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Perhaps you should add SoC specific compatible string instead.

yes it is a solution.

Quoted 8 lines
Quoted 7 lines

So I prefer change the PWR binding before to have the same patch applied on Linux device tree

Quoted 1 line

compatible = "st,stm32mp1-pwr-reg", "st,stm32mp1,pwr-reg";

Yes, I will update the SoC patch with you proposal.

NO! We don't want to support that.

Even mark the old binding deprecated is not acceptable:

 properties:
   compatible:
-    const: st,stm32mp1,pwr-reg
+    oneOf:
+    - const: st,stm32mp1-pwr-reg
+    - items:
+      - const: st,stm32mp1-pwr-reg
+      - const: st,stm32mp1,pwr-reg
+      deprecated: true

I understood.

Quoted 4 lines

We have *tons* of examples in DT which don't follow recommended patterns and we're stuck with them. This is no different. We can get away with changing node names, but that's about it.

Ok,  I am stucked with this compatible for STM32MP15 = "st,stm32mp1,pwr-reg"

and I have no elegant solution to solved it.

So I will change my serie to add a new compatible for STM32MP13

"st,stm32mp13-pwr-reg"

Quoted 2 lines

Rob

Regards

Patrick