dt-bindings: mfd: fix up PMIC examples
Subsystems (4)
v3 cover dt-bindings: mfd: fix up PMIC examples
When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.
This series addresses the mfd ones along with some related issues.
[ The PM8008 actually sits on an i2c bus but it is related to the other
Qualcomm SPMI PMICs. ]
Johan
Changes in v3
- rebase pm8008 update on linux-next to avoid a trivial conflict due to a local change in my tree
Changes in v2
- drop the incorrect #address-cells and #size-cells properties also from the hi6421 regulator binding (Rob)
- drop Fixes tag from pm8008 cleanup
Johan Hovold (4):
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix up binding reference
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix regulator binding
dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: clean up example
dt-bindings: mfd: pm8008: clean up example node names
.../mfd/hisilicon,hi6421-spmi-pmic.yaml | 140 +++++++++--------- .../devicetree/bindings/mfd/qcom,pm8008.yaml | 6 +- 2 files changed, 72 insertions(+), 74 deletions(-)
Signature · 1 line
2.41.0
PATCH v3 1/4 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix up binding reference
Fix up the SPMI PMIC binding document free text reference which erroneously referred to itself rather than the parent SPMI controller binding as intended.
--- .../devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +1 -1
@@ -17,7 +17,7 @@ description: | node. The SPMI controller part is provided by - Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml + Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml properties: $nodename:
Signature · 1 line
2.41.0
PATCH v3 2/4 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix regulator binding
In reply to Johan HovoldThe regulator child nodes do not have unit addresses so drop the incorrect '#address-cells' and '#size-cells' properties from the parent 'regulators' node.
--- .../bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml | 10 ---------- 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +0 -10
@@ -42,13 +42,6 @@ properties: additionalProperties: false - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - patternProperties: '^ldo[0-9]+$': type: object
@@ -77,9 +70,6 @@ examples: interrupts = <0 0>; regulators { - #address-cells = <1>; - #size-cells = <0>; - ldo3: ldo3 { regulator-name = "ldo3"; regulator-min-microvolt = <1500000>;
Signature · 1 line
2.41.0
PATCH v3 3/4 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: clean up example
In reply to Johan HovoldThe SPMI PMIC sits on an SPMI bus which and has two address cells with no size.
Clean up the example by adding a parent SPMI bus node with proper '#address-cells' and '#size-cells' properties, using a define for the second register value, dropping the unnecessary label and increasing the indentation to four spaces.
--- .../mfd/hisilicon,hi6421-spmi-pmic.yaml | 134 +++++++++--------- 1 file changed, 70 insertions(+), 64 deletions(-)
Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml +70 -64
@@ -59,69 +59,75 @@ additionalProperties: false examples: - | - - pmic: pmic@0 { - compatible = "hisilicon,hi6421v600-spmi"; - reg = <0 0>; - - #interrupt-cells = <2>; - interrupt-controller; - interrupt-parent = <&gpio28>; - interrupts = <0 0>; - - regulators { - ldo3: ldo3 { - regulator-name = "ldo3"; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <2000000>; - regulator-boot-on; - }; - - ldo4: ldo4 { - regulator-name = "ldo4"; - regulator-min-microvolt = <1725000>; - regulator-max-microvolt = <1900000>; - regulator-boot-on; - }; - - ldo9: ldo9 { - regulator-name = "ldo9"; - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3300000>; - regulator-boot-on; - }; - - ldo15: ldo15 { - regulator-name = "ldo15"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - }; - - ldo16: ldo16 { - regulator-name = "ldo16"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; - regulator-boot-on; - }; - - ldo17: ldo17 { - regulator-name = "ldo17"; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <3300000>; - }; - - ldo33: ldo33 { - regulator-name = "ldo33"; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <3300000>; - regulator-boot-on; - }; - - ldo34: ldo34 { - regulator-name = "ldo34"; - regulator-min-microvolt = <2600000>; - regulator-max-microvolt = <3300000>; + #include <dt-bindings/spmi/spmi.h> + + spmi { + #address-cells = <2>; + #size-cells = <0>; + + pmic@0 { + compatible = "hisilicon,hi6421v600-spmi"; + reg = <0 SPMI_USID>; + + #interrupt-cells = <2>; + interrupt-controller; + interrupt-parent = <&gpio28>; + interrupts = <0 0>; + + regulators { + ldo3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <2000000>; + regulator-boot-on; + }; + + ldo4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <1725000>; + regulator-max-microvolt = <1900000>; + regulator-boot-on; + }; + + ldo9 { + regulator-name = "ldo9"; + regulator-min-microvolt = <1750000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + ldo15 { + regulator-name = "ldo15"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + }; + + ldo16 { + regulator-name = "ldo16"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-boot-on; + }; + + ldo17 { + regulator-name = "ldo17"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <3300000>; + }; + + ldo33 { + regulator-name = "ldo33"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + ldo34 { + regulator-name = "ldo34"; + regulator-min-microvolt = <2600000>; + regulator-max-microvolt = <3300000>; + }; + }; }; - }; };
Signature · 1 line
2.41.0
PATCH v3 4/4 dt-bindings: mfd: pm8008: clean up example node names
In reply to Johan HovoldDevicetree node names should be generic; fix up the pm8008 binding example accordingly.
--- Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml +4 -2
@@ -99,10 +99,12 @@ examples: - | #include <dt-bindings/mfd/qcom-pm8008.h> #include <dt-bindings/interrupt-controller/irq.h> - qupv3_se13_i2c { + + i2c { #address-cells = <1>; #size-cells = <0>; - pm8008i@8 { + + pmic@8 { compatible = "qcom,pm8008"; reg = <0x8>; #address-cells = <1>;
Signature · 1 line
2.41.0
Quoted 9 lines · Johan Hovold
When reviewing the various SPMI PMIC bindings, I noticed that several examples were incorrect and misleading and could also use some cleanup.
This series addresses the mfd ones along with some related issues.
[ The PM8008 actually sits on an i2c bus but it is related to the other
Qualcomm SPMI PMICs. ][...]
Applied, thanks!
[1/4] dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix up binding reference
commit: e23f1530eab97e8d9dfbbdd9af3802c9c1e026a4
[2/4] dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: fix regulator binding
commit: d5c005ff9fe33dc7c2c3e13d1bdca698f441ac86
[3/4] dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: clean up example
commit: 1aa77a7ed020721c6c4a3da16ea3a970f2ce4eea
[4/4] dt-bindings: mfd: pm8008: clean up example node names
commit: 7bb6a356ed6392c5e78e3d668055090970c1f9da--
Lee Jones [李琼斯]