Skip to contentSkip to conversation

dt-bindings: soc: qcom: YAML-ify SSBI bindings

PATCH Applied Dmitry Baryshkov 4 participants 14 messages Sep 30, 2022 – Nov 8, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: soc: qcom: YAML-ify SSBI bindings

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

---
 .../devicetree/bindings/arm/msm/ssbi.txt      | 18 ------
 .../bindings/soc/qcom/qcom,ssbi.yaml          | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/ssbi.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml
Documentation/devicetree/bindings/arm/msm/ssbi.txt deleted +0 -18
deleted file mode 100644
index 54fd5ced3401..000000000000
@@ -1,18 +0,0 @@
-* Qualcomm SSBI
-
-Some Qualcomm MSM devices contain a point-to-point serial bus used to
-communicate with a limited range of devices (mostly power management
-chips).
-
-These require the following properties:
-
-- compatible: "qcom,ssbi"
-
-- qcom,controller-type
-  indicates the SSBI bus variant the controller should use to talk
-  with the slave device.  This should be one of "ssbi", "ssbi2", or
-  "pmic-arbiter".  The type chosen is determined by the attached
-  slave.
-
-The slave device should be the single child node of the ssbi device
-with a compatible field.
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
2.35.1
#1 lore raw

PATCH 2/2 ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes

On MDM9615 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes.

---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -1
index b47c86412de2..bb17a57a2b90 100644
@@ -283,7 +283,7 @@ qcom,ssbi@500000 {
 			reg = <0x500000 0x1000>;
 			qcom,controller-type = "pmic-arbiter";
 
-			pmicintc: pmic@0 {
+			pmicintc: pmic {
 				compatible = "qcom,pm8018", "qcom,pm8921";
 				interrupts = <GIC_PPI 226 IRQ_TYPE_LEVEL_HIGH>;
 				#interrupt-cells = <2>;
Signature · 1 line
2.35.1
#2 lore raw

Re: [PATCH 2/2] ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes

Quoted 13 lines · Dmitry Baryshkov

On MDM9615 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes.

---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-mdm9615.dtsi +0 -0
index b47c86412de2..bb17a57a2b90 100644

arch/arm/boot/dts/qcom-mdm9615.dtsi qcom,ssbi@500000 { · line 286

Quoted 5 lines
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -1
@@ -283,7 +283,7 @@ qcom,ssbi@500000 {
 			reg = <0x500000 0x1000>;
 			qcom,controller-type = "pmic-arbiter";
 
-			pmicintc: pmic@0 {
+			pmicintc: pmic {

I think several other platforms, also with PMIC over SSBI, have the same problem. If that's correct, can you fix them in the same patchset?

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 2/2] ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes

Quoted 18 lines · Krzysztof Kozlowski
Quoted 16 lines · Dmitry Baryshkov

On MDM9615 the PMICs are connected using SSBI devices, which do not have any addressing scheme. Drop the unused unit ids from PMIC device nodes.

---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-mdm9615.dtsi +0 -0
index b47c86412de2..bb17a57a2b90 100644
@@ -283,7 +283,7 @@ qcom,ssbi@500000 {
                      reg = <0x500000 0x1000>;
                      qcom,controller-type = "pmic-arbiter";
 
Quoted 5 lines

arch/arm/boot/dts/qcom-mdm9615.dtsi qcom,ssbi@500000 { · line 286

Quoted 2 lines
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -1
-                     pmicintc: pmic@0 {
+                     pmicintc: pmic {

I think several other platforms, also with PMIC over SSBI, have the same problem. If that's correct, can you fix them in the same patchset?

It was a part of my previous patchset, but yeah. Let's get it done in this one.

Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

Re: [PATCH 2/2] ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes

Quoted 8 lines · Dmitry Baryshkov
Quoted 8 lines
Quoted 8 lines
arch/arm/boot/dts/qcom-mdm9615.dtsi +0 -0
index b47c86412de2..bb17a57a2b90 100644
@@ -283,7 +283,7 @@ qcom,ssbi@500000 {
                      reg = <0x500000 0x1000>;
                      qcom,controller-type = "pmic-arbiter";
 
Quoted 8 lines
Quoted 5 lines

arch/arm/boot/dts/qcom-mdm9615.dtsi qcom,ssbi@500000 { · line 286

Quoted 2 lines
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -1
-                     pmicintc: pmic@0 {
+                     pmicintc: pmic {

I think several other platforms, also with PMIC over SSBI, have the same problem. If that's correct, can you fix them in the same patchset?

It was a part of my previous patchset, but yeah. Let's get it done in this one.

Ah, if you fix them in separate patchset, it's also ok.

Best regards,
Krzysztof

#5 lore raw
In reply to Dmitry Baryshkov
Quoted 2 lines · Dmitry Baryshkov

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

I think this should go to "bus" instead. Actually we could put there as well GSBI and few others...

Quoted 39 lines
---
 .../devicetree/bindings/arm/msm/ssbi.txt      | 18 ------
 .../bindings/soc/qcom/qcom,ssbi.yaml          | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/ssbi.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml
Documentation/devicetree/bindings/arm/msm/ssbi.txt deleted +0 -18
deleted file mode 100644
index 54fd5ced3401..000000000000
@@ -1,18 +0,0 @@
-* Qualcomm SSBI
-
-Some Qualcomm MSM devices contain a point-to-point serial bus used to
-communicate with a limited range of devices (mostly power management
-chips).
-
-These require the following properties:
-
-- compatible: "qcom,ssbi"
-
-- qcom,controller-type
-  indicates the SSBI bus variant the controller should use to talk
-  with the slave device.  This should be one of "ssbi", "ssbi2", or
-  "pmic-arbiter".  The type chosen is determined by the attached
-  slave.
-
-The slave device should be the single child node of the ssbi device
-with a compatible field.
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +0 -0
new file mode 100644
index 000000000000..6154f7222899

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 5

Quoted 5 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +5 -0
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/qcom/qcom,ssbi.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes from both above.

Quoted 21 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +21 -0
+
+title: Qualcomm Single-wire Serial Bus Interface (SSBI)
+
+description:
+  Some Qualcomm MSM devices contain a point-to-point serial bus used to
+  communicate with a limited range of devices (mostly power management
+  chips).
+
+maintainers:
+  - Andy Gross <[email protected]>
+  - Bjorn Andersson <[email protected]>
+
+properties:
+  compatible:
+    const: qcom,ssbi
+
+  reg:
+    maxItems: 1
+
+  qcom,controller-type:
+    description:

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 36

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +10 -0
+      Indicates the SSBI bus variant the controller should use to talk
+      with the slave device. The type chosen is determined by the attached
+      slave.
+    enum:
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Quoted 17 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +17 -0
+
+required:
+  - compatible
+  - reg
+  - qcom,controller-type
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    ssbi@c00000 {
+        compatible = "qcom,ssbi";
+        reg = <0x00c00000 0x1000>;
+        qcom,controller-type = "pmic-arbiter";
+
+        pmic {

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 63

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +10 -0
+            compatible = "qcom,pm8821";
+            interrupt-parent = <&msmgpio>;
+            interrupts = <76 IRQ_TYPE_LEVEL_LOW>;
+            #interrupt-cells = <2>;
+            interrupt-controller;
+            #address-cells = <1>;
+            #size-cells = <0>;
+        };
+    };
+...

Best regards,
Krzysztof

#6 lore raw
Quoted 7 lines · Krzysztof Kozlowski
Quoted 2 lines · Dmitry Baryshkov

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

I think this should go to "bus" instead. Actually we could put there as well GSBI and few others...

ack

Quoted 39 lines
Quoted 39 lines
---
 .../devicetree/bindings/arm/msm/ssbi.txt      | 18 ------
 .../bindings/soc/qcom/qcom,ssbi.yaml          | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/ssbi.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml
Documentation/devicetree/bindings/arm/msm/ssbi.txt deleted +0 -18
deleted file mode 100644
index 54fd5ced3401..000000000000
@@ -1,18 +0,0 @@
-* Qualcomm SSBI
-
-Some Qualcomm MSM devices contain a point-to-point serial bus used to
-communicate with a limited range of devices (mostly power management
-chips).
-
-These require the following properties:
-
-- compatible: "qcom,ssbi"
-
-- qcom,controller-type
-  indicates the SSBI bus variant the controller should use to talk
-  with the slave device.  This should be one of "ssbi", "ssbi2", or
-  "pmic-arbiter".  The type chosen is determined by the attached
-  slave.
-
-The slave device should be the single child node of the ssbi device
-with a compatible field.
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +0 -0
new file mode 100644
index 000000000000..6154f7222899
Quoted 8 lines

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 5

Quoted 6 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +5 -0
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/qcom/qcom,ssbi.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes from both above.

ack

Quoted 26 lines
Quoted 26 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +25 -0
+
+title: Qualcomm Single-wire Serial Bus Interface (SSBI)
+
+description:
+  Some Qualcomm MSM devices contain a point-to-point serial bus used to
+  communicate with a limited range of devices (mostly power management
+  chips).
+
+maintainers:
+  - Andy Gross <[email protected]>
+  - Bjorn Andersson <[email protected]>
+
+properties:
+  compatible:
+    const: qcom,ssbi
+
+  reg:
+    maxItems: 1
+
+  qcom,controller-type:
+    description:
+      Indicates the SSBI bus variant the controller should use to talk
+      with the slave device. The type chosen is determined by the attached
+      slave.
+    enum:
Quoted 8 lines

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 36

Quoted 6 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +6 -0
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Yes, I thought about listing all compats, but probably a $ref:
../mfd/qcom-pm8xxx.yaml# makes more sense.

Quoted 32 lines
Quoted 18 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +17 -0
+
+required:
+  - compatible
+  - reg
+  - qcom,controller-type
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    ssbi@c00000 {
+        compatible = "qcom,ssbi";
+        reg = <0x00c00000 0x1000>;
+        qcom,controller-type = "pmic-arbiter";
+
+        pmic {

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 63

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +10 -0
+            compatible = "qcom,pm8821";
+            interrupt-parent = <&msmgpio>;
+            interrupts = <76 IRQ_TYPE_LEVEL_LOW>;
+            #interrupt-cells = <2>;
+            interrupt-controller;
+            #address-cells = <1>;
+            #size-cells = <0>;
+        };
+    };
+...

Best regards,
Krzysztof

Signature · 2 lines
With best wishes
Dmitry
#7 lore raw
Quoted 8 lines · Dmitry Baryshkov
Quoted 8 lines
Quoted 7 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +7 -0
+    enum:
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object
Quoted 4 lines
Quoted 1 line

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Yes, I thought about listing all compats, but probably a $ref:
../mfd/qcom-pm8xxx.yaml# makes more sense.

Then full path - /schemas/mfd/qcom-....

Quoted 2 lines
Quoted 2 lines

Best regards,
Krzysztof

maintainer
#8 lore raw
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Dmitry Baryshkov
Quoted 8 lines
Quoted 7 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +7 -0
+    enum:
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Yes, I thought about listing all compats, but probably a $ref:
../mfd/qcom-pm8xxx.yaml# makes more sense.

Then full path - /schemas/mfd/qcom-....

While effectively it's always a QCom PMIC, this is a bus binding, so shouldn't it just be 'additionalProperties: { type: object }' without any reference to the type of device?

Rob

#9 lore raw
Quoted 12 lines · Rob Herring
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Dmitry Baryshkov
Quoted 9 lines

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 36

Quoted 7 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +7 -0
+    enum:
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Yes, I thought about listing all compats, but probably a $ref:
../mfd/qcom-pm8xxx.yaml# makes more sense.

Then full path - /schemas/mfd/qcom-....

While effectively it's always a QCom PMIC, this is a bus binding, so shouldn't it just be 'additionalProperties: { type: object }' without any reference to the type of device?

If we treat it as generic bus, then maybe also "pmic" is not appropriate. What if other devices are connected?

Bindings were saying it is Qualcomm SoC specific bus, so I don't think we can have here anything else than Qualcomm PMIC.

Best regards,
Krzysztof

#10 lore raw
Quoted 17 lines · Krzysztof Kozlowski
Quoted 15 lines · Rob Herring
Quoted 14 lines · Krzysztof Kozlowski
Quoted 12 lines · Dmitry Baryshkov
Quoted 9 lines

Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml line 36

Quoted 7 lines
Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml new file +7 -0
+    enum:
+      - ssbi
+      - ssbi2
+      - pmic-arbiter
+
+  pmic:
+    type: object

This is quite unspecific... Can we make it a ref to some PMICs schemas?

Yes, I thought about listing all compats, but probably a $ref:
../mfd/qcom-pm8xxx.yaml# makes more sense.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Then full path - /schemas/mfd/qcom-....

While effectively it's always a QCom PMIC, this is a bus binding, so shouldn't it just be 'additionalProperties: { type: object }' without any reference to the type of device?

If we treat it as generic bus, then maybe also "pmic" is not appropriate. What if other devices are connected?

It's a 1:1 bus, so SSBI host can be connected to a single IC. This bus is not used in new designs (it got replaced with SPMI). All existing devices use SSBI to connect to PMIC. So I think it is safe to assume that the only ssbi child is a PMIC.

Quoted 7 lines

Bindings were saying it is Qualcomm SoC specific bus, so I don't think we can have here anything else than Qualcomm PMIC.

Best regards,
Krzysztof

Signature · 2 lines
With best wishes
Dmitry
maintainer
#11 lore raw
In reply to Dmitry Baryshkov
Quoted 11 lines · Dmitry Baryshkov

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

---
 .../devicetree/bindings/arm/msm/ssbi.txt      | 18 ------
 .../bindings/soc/qcom/qcom,ssbi.yaml          | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/msm/ssbi.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,ssbi.yaml

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/

qcom,ssbi@500000: 'pmic@0' does not match any of the regexes: 'pinctrl-[0-9]+'

	arch/arm/boot/dts/qcom-apq8060-dragonboard.dtb
	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-lagan-yuga.dtb
	arch/arm/boot/dts/qcom-mdm9615-wp8548-mangoh-green.dtb
	arch/arm/boot/dts/qcom-msm8660-surf.dtb
	arch/arm/boot/dts/qcom-msm8960-cdp.dtb

ssbi@c00000: 'pmic@1' does not match any of the regexes: 'pinctrl-[0-9]+'

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dtb
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-lagan-yuga.dtb
maintainer
#12 lore raw
In reply to Dmitry Baryshkov
Quoted 2 lines · Dmitry Baryshkov

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

YAML-ify? Can we say 'convert to DT schema' instead like everywhere else. YAML is a file format. It doesn't describe the vocabulary.

Rob

maintainer Applied
#13 lore raw

Re: (subset) [PATCH 1/2] dt-bindings: soc: qcom: YAML-ify SSBI bindings

In reply to Dmitry Baryshkov
Quoted 4 lines · Dmitry Baryshkov

Convert arm/msm/ssbi.txt yo YAML, moving it to the directory with SoC bindings (soc/qcom/).

Applied, thanks!

[2/2] ARM: dts: qcom: mdm9615: drop unit ids from PMIC nodes

      commit: 0d6e44e257ec53b41c2969130e0eb97b0a41b1d6

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>