linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Update RPM ICC bindings
@ 2023-07-24 14:06 Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio, Krzysztof Kozlowski

The recent necessary overhaul [1] of how we represent SMD ICC and RPM
bus clocks changed the way they're connected. The bindings however were
not updated to reflect that. This series tries to address that, while
also making the relevant bindings less convoluted.

Now, instead of referencing RPM SMD bus clocks via clocks=<>, they're
handled internally within the interconnect framework (via direct RPM
calls from there). We still need to allow some "interface" clocks,
which are necessary to access some registers and not managed for us.

[1] https://lore.kernel.org/linux-arm-msm/20230526-topic-smd_icc-v7-0-09c78c175546@linaro.org/

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Keep reg: local to the individual bindings
- Use the rpm-common yaml for child nodes
- Keep msm8916 and qcs404 in the common file
- Keep only meaningful examples
- Fix up some indentation
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230721-topic-icc_bindings-v1-0-93e2bc728fb7@linaro.org

---
Konrad Dybcio (7):
      dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
      dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks
      dt-bindings: interconnect: qcom: Fix and separate out SDM660
      dt-bindings: interconnect: qcom: Fix and separate out MSM8996
      dt-bindings: interconnect: qcom: Fix and separate out MSM8939
      dt-bindings: interconnect: qcom: rpm: Clean up the file
      dt-bindings: interconnect: qcom: rpm: Clean up the example

 .../bindings/interconnect/qcom,msm8939.yaml        |  74 ++++++
 .../bindings/interconnect/qcom,msm8996.yaml        | 126 +++++++++++
 .../bindings/interconnect/qcom,qcm2290.yaml        |  60 +----
 .../bindings/interconnect/qcom,rpm-common.yaml     |  28 +++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml | 250 +--------------------
 .../bindings/interconnect/qcom,sdm660.yaml         | 108 +++++++++
 6 files changed, 352 insertions(+), 294 deletions(-)
---
base-commit: ae867bc97b713121b2a7f5fcac68378a0774739b
change-id: 20230721-topic-icc_bindings-72917016f595

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


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

* [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-08-11 16:48   ` Rob Herring
  2023-07-24 14:06 ` [PATCH v2 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

The current RPM interconnect bindings are messy. Start cleaning them
up with a common include.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/interconnect/qcom,qcm2290.yaml        | 18 +++++++-------
 .../bindings/interconnect/qcom,rpm-common.yaml     | 28 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
index f65a2fe846de..df89f390a9b0 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
@@ -13,6 +13,9 @@ description: |
   The Qualcomm QCM2290 interconnect providers support adjusting the
   bandwidth requirements between the various NoC fabrics.
 
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+
 properties:
   reg:
     maxItems: 1
@@ -23,9 +26,6 @@ properties:
       - qcom,qcm2290-cnoc
       - qcom,qcm2290-snoc
 
-  '#interconnect-cells':
-    const: 1
-
   clock-names:
     items:
       - const: bus
@@ -44,6 +44,9 @@ patternProperties:
       The interconnect providers do not have a separate QoS register space,
       but share parent's space.
 
+    allOf:
+      - $ref: qcom,rpm-common.yaml#
+
     properties:
       compatible:
         enum:
@@ -51,9 +54,6 @@ patternProperties:
           - qcom,qcm2290-mmrt-virt
           - qcom,qcm2290-mmnrt-virt
 
-      '#interconnect-cells':
-        const: 1
-
       clock-names:
         items:
           - const: bus
@@ -66,20 +66,18 @@ patternProperties:
 
     required:
       - compatible
-      - '#interconnect-cells'
       - clock-names
       - clocks
 
-    additionalProperties: false
+    unevaluatedProperties: false
 
 required:
   - compatible
   - reg
-  - '#interconnect-cells'
   - clock-names
   - clocks
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
new file mode 100644
index 000000000000..1ea52b091609
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,rpm-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description:
+  RPM interconnect providers support for managing system bandwidth requirements
+  through manual requests based on either predefined values or as indicated by
+  the bus monitor hardware. Each provider node represents a NoC bus master,
+  driven by a dedicated clock source.
+
+properties:
+  '#interconnect-cells':
+    oneOf:
+      - const: 2
+      - const: 1
+        deprecated: true
+
+required:
+  - '#interconnect-cells'
+
+additionalProperties: true

-- 
2.41.0


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

* [PATCH v2 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 3/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio, Krzysztof Kozlowski

After the recent reshuffling, bus clocks are no longer exposed as RPM
clocks. Remove the old description.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/interconnect/qcom,qcm2290.yaml        | 42 ----------------------
 1 file changed, 42 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
index df89f390a9b0..b6c15314c5c5 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
@@ -26,16 +26,6 @@ properties:
       - qcom,qcm2290-cnoc
       - qcom,qcm2290-snoc
 
-  clock-names:
-    items:
-      - const: bus
-      - const: bus_a
-
-  clocks:
-    items:
-      - description: Bus Clock
-      - description: Bus A Clock
-
 # Child node's properties
 patternProperties:
   '^interconnect-[a-z0-9]+$':
@@ -54,28 +44,14 @@ patternProperties:
           - qcom,qcm2290-mmrt-virt
           - qcom,qcm2290-mmnrt-virt
 
-      clock-names:
-        items:
-          - const: bus
-          - const: bus_a
-
-      clocks:
-        items:
-          - description: Bus Clock
-          - description: Bus A Clock
-
     required:
       - compatible
-      - clock-names
-      - clocks
 
     unevaluatedProperties: false
 
 required:
   - compatible
   - reg
-  - clock-names
-  - clocks
 
 unevaluatedProperties: false
 
@@ -87,32 +63,20 @@ examples:
         compatible = "qcom,qcm2290-snoc";
         reg = <0x01880000 0x60200>;
         #interconnect-cells = <1>;
-        clock-names = "bus", "bus_a";
-        clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
-                 <&rpmcc RPM_SMD_SNOC_A_CLK>;
 
         qup_virt: interconnect-qup {
             compatible = "qcom,qcm2290-qup-virt";
             #interconnect-cells = <1>;
-            clock-names = "bus", "bus_a";
-            clocks = <&rpmcc RPM_SMD_QUP_CLK>,
-                     <&rpmcc RPM_SMD_QUP_A_CLK>;
         };
 
         mmnrt_virt: interconnect-mmnrt {
             compatible = "qcom,qcm2290-mmnrt-virt";
             #interconnect-cells = <1>;
-            clock-names = "bus", "bus_a";
-            clocks = <&rpmcc RPM_SMD_MMNRT_CLK>,
-                     <&rpmcc RPM_SMD_MMNRT_A_CLK>;
         };
 
         mmrt_virt: interconnect-mmrt {
             compatible = "qcom,qcm2290-mmrt-virt";
             #interconnect-cells = <1>;
-            clock-names = "bus", "bus_a";
-            clocks = <&rpmcc RPM_SMD_MMRT_CLK>,
-                     <&rpmcc RPM_SMD_MMRT_A_CLK>;
         };
     };
 
@@ -120,16 +84,10 @@ examples:
         compatible = "qcom,qcm2290-cnoc";
         reg = <0x01900000 0x8200>;
         #interconnect-cells = <1>;
-        clock-names = "bus", "bus_a";
-        clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
-                 <&rpmcc RPM_SMD_CNOC_A_CLK>;
     };
 
     bimc: interconnect@4480000 {
         compatible = "qcom,qcm2290-bimc";
         reg = <0x04480000 0x80000>;
         #interconnect-cells = <1>;
-        clock-names = "bus", "bus_a";
-        clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
-                 <&rpmcc RPM_SMD_BIMC_A_CLK>;
     };

-- 
2.41.0


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

* [PATCH v2 3/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 4/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

Separate out SDM660 icc bindings from the common file and fix the
clocks description by removing the wrong internal RPM bus clock
representation that we've been carrying for years.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../devicetree/bindings/interconnect/qcom,rpm.yaml |  40 --------
 .../bindings/interconnect/qcom,sdm660.yaml         | 108 +++++++++++++++++++++
 2 files changed, 108 insertions(+), 40 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 4f95d512012a..59895cca6a8c 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -37,12 +37,6 @@ properties:
       - qcom,qcs404-bimc
       - qcom,qcs404-pcnoc
       - qcom,qcs404-snoc
-      - qcom,sdm660-a2noc
-      - qcom,sdm660-bimc
-      - qcom,sdm660-cnoc
-      - qcom,sdm660-gnoc
-      - qcom,sdm660-mnoc
-      - qcom,sdm660-snoc
 
   '#interconnect-cells':
     description: |
@@ -123,10 +117,6 @@ allOf:
               - qcom,qcs404-bimc
               - qcom,qcs404-pcnoc
               - qcom,qcs404-snoc
-              - qcom,sdm660-bimc
-              - qcom,sdm660-cnoc
-              - qcom,sdm660-gnoc
-              - qcom,sdm660-snoc
 
     then:
       properties:
@@ -146,7 +136,6 @@ allOf:
           contains:
             enum:
               - qcom,msm8996-mnoc
-              - qcom,sdm660-mnoc
 
     then:
       properties:
@@ -209,35 +198,6 @@ allOf:
             - description: Aggregate2 NoC UFS AXI Clock
             - description: UFS AXI Clock
 
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,sdm660-a2noc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: bus
-            - const: bus_a
-            - const: ipa
-            - const: ufs_axi
-            - const: aggre2_ufs_axi
-            - const: aggre2_usb3_axi
-            - const: cfg_noc_usb2_axi
-
-        clocks:
-          items:
-            - description: Bus Clock.
-            - description: Bus A Clock.
-            - description: IPA Clock.
-            - description: UFS AXI Clock.
-            - description: Aggregate2 UFS AXI Clock.
-            - description: Aggregate2 USB3 AXI Clock.
-            - description: Config NoC USB2 AXI Clock.
-
   - if:
       not:
         properties:
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml b/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
new file mode 100644
index 000000000000..8f6bc6399626
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sdm660.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SDM660 Network-On-Chip interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+  The Qualcomm SDM660 interconnect providers support adjusting the
+  bandwidth requirements between the various NoC fabrics.
+
+properties:
+  compatible:
+    enum:
+      - qcom,sdm660-a2noc
+      - qcom,sdm660-bimc
+      - qcom,sdm660-cnoc
+      - qcom,sdm660-gnoc
+      - qcom,sdm660-mnoc
+      - qcom,sdm660-snoc
+
+  reg:
+    maxItems: 1
+
+  clock-names:
+    minItems: 1
+    maxItems: 5
+
+  clocks:
+    minItems: 1
+    maxItems: 5
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+  - if:
+      properties:
+        compatible:
+          const: qcom,sdm660-mnoc
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: CPU-NoC High-performance Bus Clock.
+
+        clock-names:
+          const: iface
+
+  - if:
+      properties:
+        compatible:
+          const: qcom,sdm660-a2noc
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: IPA Clock.
+            - description: UFS AXI Clock.
+            - description: Aggregate2 UFS AXI Clock.
+            - description: Aggregate2 USB3 AXI Clock.
+            - description: Config NoC USB2 AXI Clock.
+
+        clock-names:
+          items:
+            - const: ipa
+            - const: ufs_axi
+            - const: aggre2_ufs_axi
+            - const: aggre2_usb3_axi
+            - const: cfg_noc_usb2_axi
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sdm660.h>
+    #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+
+    bimc: interconnect@1008000 {
+        compatible = "qcom,sdm660-bimc";
+        reg = <0x01008000 0x78000>;
+        #interconnect-cells = <1>;
+    };
+
+    a2noc: interconnect@1704000 {
+        compatible = "qcom,sdm660-a2noc";
+        reg = <0x01704000 0xc100>;
+        #interconnect-cells = <1>;
+        clocks = <&rpmcc RPM_SMD_IPA_CLK>,
+                 <&gcc GCC_UFS_AXI_CLK>,
+                 <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+                 <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
+                 <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
+        clock-names = "ipa",
+                      "ufs_axi",
+                      "aggre2_ufs_axi",
+                      "aggre2_usb3_axi",
+                      "cfg_noc_usb2_axi";
+    };

-- 
2.41.0


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

* [PATCH v2 4/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-07-24 14:06 ` [PATCH v2 3/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 5/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 Konrad Dybcio
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

Separate out MSM8996 icc bindings from the common file and fix the
clocks description by removing the wrong internal RPM bus clock
representation that we've been carrying for years.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/interconnect/qcom,msm8996.yaml        | 126 +++++++++++++++++++++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml |  81 -------------
 2 files changed, 126 insertions(+), 81 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8996.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8996.yaml
new file mode 100644
index 000000000000..e3f964aaad1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8996.yaml
@@ -0,0 +1,126 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,msm8996.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8996 Network-On-Chip interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+  The Qualcomm MSM8996 interconnect providers support adjusting the
+  bandwidth requirements between the various NoC fabrics.
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8996-a0noc
+      - qcom,msm8996-a1noc
+      - qcom,msm8996-a2noc
+      - qcom,msm8996-bimc
+      - qcom,msm8996-cnoc
+      - qcom,msm8996-mnoc
+      - qcom,msm8996-pnoc
+      - qcom,msm8996-snoc
+
+  reg:
+    maxItems: 1
+
+  clock-names:
+    minItems: 1
+    maxItems: 3
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+  - if:
+      properties:
+        compatible:
+          const: qcom,msm8996-a0noc
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: Aggregate0 System NoC AXI Clock.
+            - description: Aggregate0 Config NoC AHB Clock.
+            - description: Aggregate0 NoC MPU Clock.
+
+        clock-names:
+          items:
+            - const: aggre0_snoc_axi
+            - const: aggre0_cnoc_ahb
+            - const: aggre0_noc_mpu_cfg
+
+      required:
+        - power-domains
+
+  - if:
+      properties:
+        compatible:
+          const: qcom,msm8996-mnoc
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: CPU-NoC High-performance Bus Clock.
+
+        clock-names:
+          const: iface
+
+  - if:
+      properties:
+        compatible:
+          const: qcom,msm8996-a2noc
+
+    then:
+      properties:
+        clocks:
+          items:
+            - description: Aggregate2 NoC UFS AXI Clock
+            - description: UFS AXI Clock
+
+        clock-names:
+          items:
+            - const: aggre2_ufs_axi
+            - const: ufs_axi
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
+    #include <dt-bindings/clock/qcom,mmcc-msm8996.h>
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+
+    bimc: interconnect@408000 {
+        compatible = "qcom,msm8996-bimc";
+        reg = <0x00408000 0x5a000>;
+        #interconnect-cells = <1>;
+    };
+
+    a0noc: interconnect@543000 {
+        compatible = "qcom,msm8996-a0noc";
+        reg = <0x00543000 0x6000>;
+        #interconnect-cells = <1>;
+        clocks = <&gcc GCC_AGGRE0_SNOC_AXI_CLK>,
+                 <&gcc GCC_AGGRE0_CNOC_AHB_CLK>,
+                 <&gcc GCC_AGGRE0_NOC_MPU_CFG_AHB_CLK>;
+        clock-names = "aggre0_snoc_axi",
+                      "aggre0_cnoc_ahb",
+                      "aggre0_noc_mpu_cfg";
+        power-domains = <&gcc AGGRE0_NOC_GDSC>;
+    };
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 59895cca6a8c..3e1bcbbdb532 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -26,14 +26,6 @@ properties:
       - qcom,msm8939-bimc
       - qcom,msm8939-pcnoc
       - qcom,msm8939-snoc
-      - qcom,msm8996-a0noc
-      - qcom,msm8996-a1noc
-      - qcom,msm8996-a2noc
-      - qcom,msm8996-bimc
-      - qcom,msm8996-cnoc
-      - qcom,msm8996-mnoc
-      - qcom,msm8996-pnoc
-      - qcom,msm8996-snoc
       - qcom,qcs404-bimc
       - qcom,qcs404-pcnoc
       - qcom,qcs404-snoc
@@ -109,11 +101,6 @@ allOf:
               - qcom,msm8939-bimc
               - qcom,msm8939-pcnoc
               - qcom,msm8939-snoc
-              - qcom,msm8996-a1noc
-              - qcom,msm8996-bimc
-              - qcom,msm8996-cnoc
-              - qcom,msm8996-pnoc
-              - qcom,msm8996-snoc
               - qcom,qcs404-bimc
               - qcom,qcs404-pcnoc
               - qcom,qcs404-snoc
@@ -130,74 +117,6 @@ allOf:
             - description: Bus Clock
             - description: Bus A Clock
 
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-mnoc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: bus
-            - const: bus_a
-            - const: iface
-
-        clocks:
-          items:
-            - description: Bus Clock.
-            - description: Bus A Clock.
-            - description: CPU-NoC High-performance Bus Clock.
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-a0noc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: aggre0_snoc_axi
-            - const: aggre0_cnoc_ahb
-            - const: aggre0_noc_mpu_cfg
-
-        clocks:
-          items:
-            - description: Aggregate0 System NoC AXI Clock.
-            - description: Aggregate0 Config NoC AHB Clock.
-            - description: Aggregate0 NoC MPU Clock.
-
-      required:
-        - power-domains
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8996-a2noc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: bus
-            - const: bus_a
-            - const: aggre2_ufs_axi
-            - const: ufs_axi
-
-        clocks:
-          items:
-            - description: Bus Clock
-            - description: Bus A Clock
-            - description: Aggregate2 NoC UFS AXI Clock
-            - description: UFS AXI Clock
-
   - if:
       not:
         properties:

-- 
2.41.0


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

* [PATCH v2 5/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (3 preceding siblings ...)
  2023-07-24 14:06 ` [PATCH v2 4/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 6/7] dt-bindings: interconnect: qcom: rpm: Clean up the file Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 7/7] dt-bindings: interconnect: qcom: rpm: Clean up the example Konrad Dybcio
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

Separate out MSM8939 icc bindings from the common file and fix the
clocks description by removing the wrong internal RPM bus clock
representation that we've been carrying for years.

This was the final one, so also retire the shared file.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/interconnect/qcom,msm8939.yaml        | 74 ++++++++++++++++++++++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml | 49 --------------
 2 files changed, 74 insertions(+), 49 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8939.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8939.yaml
new file mode 100644
index 000000000000..fd15ab5014fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8939.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,msm8939.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8939 Network-On-Chip interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+  The Qualcomm MSM8939 interconnect providers support adjusting the
+  bandwidth requirements between the various NoC fabrics.
+
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8939-bimc
+      - qcom,msm8939-pcnoc
+      - qcom,msm8939-snoc
+
+  reg:
+    maxItems: 1
+
+patternProperties:
+  '^interconnect-[a-z0-9\-]+$':
+    type: object
+    $ref: qcom,rpm-common.yaml#
+    description:
+      The interconnect providers do not have a separate QoS register space,
+      but share parent's space.
+
+    allOf:
+      - $ref: qcom,rpm-common.yaml#
+
+    properties:
+      compatible:
+        const: qcom,msm8939-snoc-mm
+
+    required:
+      - compatible
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+
+    snoc: interconnect@580000 {
+        compatible = "qcom,msm8939-snoc";
+        reg = <0x00580000 0x14000>;
+        #interconnect-cells = <1>;
+    };
+
+    bimc: interconnect@400000 {
+        compatible = "qcom,msm8939-bimc";
+        reg = <0x00400000 0x62000>;
+        #interconnect-cells = <1>;
+
+          snoc_mm: interconnect-snoc {
+              compatible = "qcom,msm8939-snoc-mm";
+              #interconnect-cells = <1>;
+          };
+    };
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 3e1bcbbdb532..72856b1c4210 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -23,9 +23,6 @@ properties:
       - qcom,msm8916-bimc
       - qcom,msm8916-pcnoc
       - qcom,msm8916-snoc
-      - qcom,msm8939-bimc
-      - qcom,msm8939-pcnoc
-      - qcom,msm8939-snoc
       - qcom,qcs404-bimc
       - qcom,qcs404-pcnoc
       - qcom,qcs404-snoc
@@ -48,38 +45,6 @@ properties:
   power-domains:
     maxItems: 1
 
-# Child node's properties
-patternProperties:
-  '^interconnect-[a-z0-9]+$':
-    type: object
-    additionalProperties: false
-    description:
-      snoc-mm is a child of snoc, sharing snoc's register address space.
-
-    properties:
-      compatible:
-        enum:
-          - qcom,msm8939-snoc-mm
-
-      '#interconnect-cells':
-        const: 1
-
-      clock-names:
-        items:
-          - const: bus
-          - const: bus_a
-
-      clocks:
-        items:
-          - description: Bus Clock
-          - description: Bus A Clock
-
-    required:
-      - compatible
-      - '#interconnect-cells'
-      - clock-names
-      - clocks
-
 required:
   - compatible
   - reg
@@ -98,9 +63,6 @@ allOf:
               - qcom,msm8916-bimc
               - qcom,msm8916-pcnoc
               - qcom,msm8916-snoc
-              - qcom,msm8939-bimc
-              - qcom,msm8939-pcnoc
-              - qcom,msm8939-snoc
               - qcom,qcs404-bimc
               - qcom,qcs404-pcnoc
               - qcom,qcs404-snoc
@@ -117,17 +79,6 @@ allOf:
             - description: Bus Clock
             - description: Bus A Clock
 
-  - if:
-      not:
-        properties:
-          compatible:
-            contains:
-              enum:
-                - qcom,msm8939-snoc
-    then:
-      patternProperties:
-        '^interconnect-[a-z0-9]+$': false
-
 examples:
   - |
       #include <dt-bindings/clock/qcom,rpmcc.h>

-- 
2.41.0


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

* [PATCH v2 6/7] dt-bindings: interconnect: qcom: rpm: Clean up the file
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (4 preceding siblings ...)
  2023-07-24 14:06 ` [PATCH v2 5/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  2023-07-24 14:06 ` [PATCH v2 7/7] dt-bindings: interconnect: qcom: rpm: Clean up the example Konrad Dybcio
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

Following the recent cleanups and untanglements, remove abusive
direct references to RPM bus clocks, include the rpm-common YAML and
update Georgi's email.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../devicetree/bindings/interconnect/qcom,rpm.yaml | 62 ++--------------------
 1 file changed, 5 insertions(+), 57 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 72856b1c4210..157efd47904d 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -7,13 +7,16 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Qualcomm RPM Network-On-Chip Interconnect
 
 maintainers:
-  - Georgi Djakov <georgi.djakov@linaro.org>
+  - Georgi Djakov <djakov@kernel.org>
 
 description: |
   RPM interconnect providers support system bandwidth requirements through
   RPM processor. The provider is able to communicate with the RPM through
   the RPM shared memory device.
 
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+
 properties:
   reg:
     maxItems: 1
@@ -27,57 +30,11 @@ properties:
       - qcom,qcs404-pcnoc
       - qcom,qcs404-snoc
 
-  '#interconnect-cells':
-    description: |
-      Value: <1> is one cell in an interconnect specifier for the
-      interconnect node id, <2> requires the interconnect node id and an
-      extra path tag.
-    enum: [ 1, 2 ]
-
-  clocks:
-    minItems: 2
-    maxItems: 7
-
-  clock-names:
-    minItems: 2
-    maxItems: 7
-
-  power-domains:
-    maxItems: 1
-
 required:
   - compatible
   - reg
-  - '#interconnect-cells'
-  - clock-names
-  - clocks
-
-additionalProperties: false
-
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8916-bimc
-              - qcom,msm8916-pcnoc
-              - qcom,msm8916-snoc
-              - qcom,qcs404-bimc
-              - qcom,qcs404-pcnoc
-              - qcom,qcs404-snoc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: bus
-            - const: bus_a
 
-        clocks:
-          items:
-            - description: Bus Clock
-            - description: Bus A Clock
+unevaluatedProperties: false
 
 examples:
   - |
@@ -87,25 +44,16 @@ examples:
               compatible = "qcom,msm8916-bimc";
               reg = <0x00400000 0x62000>;
               #interconnect-cells = <1>;
-              clock-names = "bus", "bus_a";
-              clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
-                       <&rpmcc RPM_SMD_BIMC_A_CLK>;
       };
 
       pcnoc: interconnect@500000 {
               compatible = "qcom,msm8916-pcnoc";
               reg = <0x00500000 0x11000>;
               #interconnect-cells = <1>;
-              clock-names = "bus", "bus_a";
-              clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
-                       <&rpmcc RPM_SMD_PCNOC_A_CLK>;
       };
 
       snoc: interconnect@580000 {
               compatible = "qcom,msm8916-snoc";
               reg = <0x00580000 0x14000>;
               #interconnect-cells = <1>;
-              clock-names = "bus", "bus_a";
-              clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
-                       <&rpmcc RPM_SMD_SNOC_A_CLK>;
       };

-- 
2.41.0


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

* [PATCH v2 7/7] dt-bindings: interconnect: qcom: rpm: Clean up the example
  2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (5 preceding siblings ...)
  2023-07-24 14:06 ` [PATCH v2 6/7] dt-bindings: interconnect: qcom: rpm: Clean up the file Konrad Dybcio
@ 2023-07-24 14:06 ` Konrad Dybcio
  6 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-07-24 14:06 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo
  Cc: Marijn Suijten, Konrad Dybcio, linux-arm-msm, linux-pm,
	devicetree, linux-kernel, Konrad Dybcio

One example is enough, remove the others and fix up the indentation
while at it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../devicetree/bindings/interconnect/qcom,rpm.yaml     | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 157efd47904d..08c1c6b9d7cf 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -41,19 +41,7 @@ examples:
       #include <dt-bindings/clock/qcom,rpmcc.h>
 
       bimc: interconnect@400000 {
-              compatible = "qcom,msm8916-bimc";
-              reg = <0x00400000 0x62000>;
-              #interconnect-cells = <1>;
-      };
-
-      pcnoc: interconnect@500000 {
-              compatible = "qcom,msm8916-pcnoc";
-              reg = <0x00500000 0x11000>;
-              #interconnect-cells = <1>;
-      };
-
-      snoc: interconnect@580000 {
-              compatible = "qcom,msm8916-snoc";
-              reg = <0x00580000 0x14000>;
-              #interconnect-cells = <1>;
+          compatible = "qcom,msm8916-bimc";
+          reg = <0x00400000 0x62000>;
+          #interconnect-cells = <1>;
       };

-- 
2.41.0


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

* Re: [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
  2023-07-24 14:06 ` [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
@ 2023-08-11 16:48   ` Rob Herring
  2023-09-29 15:23     ` Konrad Dybcio
  0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2023-08-11 16:48 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Georgi Djakov, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Marijn Suijten, Konrad Dybcio,
	linux-arm-msm, linux-pm, devicetree, linux-kernel

On Mon, Jul 24, 2023 at 04:06:27PM +0200, Konrad Dybcio wrote:
> The current RPM interconnect bindings are messy. Start cleaning them
> up with a common include.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/interconnect/qcom,qcm2290.yaml        | 18 +++++++-------
>  .../bindings/interconnect/qcom,rpm-common.yaml     | 28 ++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> index f65a2fe846de..df89f390a9b0 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> @@ -13,6 +13,9 @@ description: |
>    The Qualcomm QCM2290 interconnect providers support adjusting the
>    bandwidth requirements between the various NoC fabrics.
>  
> +allOf:
> +  - $ref: qcom,rpm-common.yaml#
> +
>  properties:
>    reg:
>      maxItems: 1
> @@ -23,9 +26,6 @@ properties:
>        - qcom,qcm2290-cnoc
>        - qcom,qcm2290-snoc
>  
> -  '#interconnect-cells':
> -    const: 1
> -
>    clock-names:
>      items:
>        - const: bus
> @@ -44,6 +44,9 @@ patternProperties:
>        The interconnect providers do not have a separate QoS register space,
>        but share parent's space.
>  
> +    allOf:
> +      - $ref: qcom,rpm-common.yaml#
> +
>      properties:
>        compatible:
>          enum:
> @@ -51,9 +54,6 @@ patternProperties:
>            - qcom,qcm2290-mmrt-virt
>            - qcom,qcm2290-mmnrt-virt
>  
> -      '#interconnect-cells':
> -        const: 1
> -
>        clock-names:
>          items:
>            - const: bus
> @@ -66,20 +66,18 @@ patternProperties:
>  
>      required:
>        - compatible
> -      - '#interconnect-cells'
>        - clock-names
>        - clocks
>  
> -    additionalProperties: false
> +    unevaluatedProperties: false
>  
>  required:
>    - compatible
>    - reg
> -  - '#interconnect-cells'
>    - clock-names
>    - clocks
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
> new file mode 100644
> index 000000000000..1ea52b091609
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interconnect/qcom,rpm-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm RPMh Network-On-Chip Interconnect
> +
> +maintainers:
> +  - Konrad Dybcio <konradybcio@kernel.org>
> +
> +description:
> +  RPM interconnect providers support for managing system bandwidth requirements
> +  through manual requests based on either predefined values or as indicated by
> +  the bus monitor hardware. Each provider node represents a NoC bus master,
> +  driven by a dedicated clock source.
> +
> +properties:
> +  '#interconnect-cells':
> +    oneOf:
> +      - const: 2
> +      - const: 1
> +        deprecated: true

I think this is kind of questionable for a single property. Do you 
plan to add more properties here? Also, if you add a new user of this 
schema, then it's going to allow the deprecated case when it could just 
start with 2 only.

Rob

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

* Re: [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
  2023-08-11 16:48   ` Rob Herring
@ 2023-09-29 15:23     ` Konrad Dybcio
  0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2023-09-29 15:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Andy Gross, Bjorn Andersson, Georgi Djakov, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Marijn Suijten, Konrad Dybcio,
	linux-arm-msm, linux-pm, devicetree, linux-kernel

On 11.08.2023 18:48, Rob Herring wrote:
> On Mon, Jul 24, 2023 at 04:06:27PM +0200, Konrad Dybcio wrote:
>> The current RPM interconnect bindings are messy. Start cleaning them
>> up with a common include.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../bindings/interconnect/qcom,qcm2290.yaml        | 18 +++++++-------
>>  .../bindings/interconnect/qcom,rpm-common.yaml     | 28 ++++++++++++++++++++++
>>  2 files changed, 36 insertions(+), 10 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
>> index f65a2fe846de..df89f390a9b0 100644
>> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
>> @@ -13,6 +13,9 @@ description: |
>>    The Qualcomm QCM2290 interconnect providers support adjusting the
>>    bandwidth requirements between the various NoC fabrics.
>>  
>> +allOf:
>> +  - $ref: qcom,rpm-common.yaml#
>> +
>>  properties:
>>    reg:
>>      maxItems: 1
>> @@ -23,9 +26,6 @@ properties:
>>        - qcom,qcm2290-cnoc
>>        - qcom,qcm2290-snoc
>>  
>> -  '#interconnect-cells':
>> -    const: 1
>> -
>>    clock-names:
>>      items:
>>        - const: bus
>> @@ -44,6 +44,9 @@ patternProperties:
>>        The interconnect providers do not have a separate QoS register space,
>>        but share parent's space.
>>  
>> +    allOf:
>> +      - $ref: qcom,rpm-common.yaml#
>> +
>>      properties:
>>        compatible:
>>          enum:
>> @@ -51,9 +54,6 @@ patternProperties:
>>            - qcom,qcm2290-mmrt-virt
>>            - qcom,qcm2290-mmnrt-virt
>>  
>> -      '#interconnect-cells':
>> -        const: 1
>> -
>>        clock-names:
>>          items:
>>            - const: bus
>> @@ -66,20 +66,18 @@ patternProperties:
>>  
>>      required:
>>        - compatible
>> -      - '#interconnect-cells'
>>        - clock-names
>>        - clocks
>>  
>> -    additionalProperties: false
>> +    unevaluatedProperties: false
>>  
>>  required:
>>    - compatible
>>    - reg
>> -  - '#interconnect-cells'
>>    - clock-names
>>    - clocks
>>  
>> -additionalProperties: false
>> +unevaluatedProperties: false
>>  
>>  examples:
>>    - |
>> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
>> new file mode 100644
>> index 000000000000..1ea52b091609
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
>> @@ -0,0 +1,28 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/interconnect/qcom,rpm-common.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm RPMh Network-On-Chip Interconnect
>> +
>> +maintainers:
>> +  - Konrad Dybcio <konradybcio@kernel.org>
>> +
>> +description:
>> +  RPM interconnect providers support for managing system bandwidth requirements
>> +  through manual requests based on either predefined values or as indicated by
>> +  the bus monitor hardware. Each provider node represents a NoC bus master,
>> +  driven by a dedicated clock source.
>> +
>> +properties:
>> +  '#interconnect-cells':
>> +    oneOf:
>> +      - const: 2
>> +      - const: 1
>> +        deprecated: true
> 
> I think this is kind of questionable for a single property. Do you 
> plan to add more properties here?
My best answer is "we'll see". Not in the forseeable future, but
this hardware has a never-ending queue of surprises..

I like this file for the broader description, but ultimately up to you.

(FWIW Georgi has queued this up for icc-dev (not icc-next) and I'd like
to flush my icc patch queue, but that's just my lazy €0.05)

> Also, if you add a new user of this 
> schema, then it's going to allow the deprecated case when it could just 
> start with 2 only.
I see your point.

Speaking of this keyword, shouldn't the dt checker start spitting out
warnings that would urge dts maintainers to update their trees?

Konrad

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

end of thread, other threads:[~2023-09-29 15:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 14:06 [PATCH v2 0/7] Update RPM ICC bindings Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
2023-08-11 16:48   ` Rob Herring
2023-09-29 15:23     ` Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 3/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 4/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 5/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 6/7] dt-bindings: interconnect: qcom: rpm: Clean up the file Konrad Dybcio
2023-07-24 14:06 ` [PATCH v2 7/7] dt-bindings: interconnect: qcom: rpm: Clean up the example Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).