linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Update RPM ICC bindings
@ 2023-07-21 13:54 Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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 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>
---
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 MSM8916
      dt-bindings: interconnect: qcom: Fix and separate out QCS404
      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

 .../bindings/interconnect/qcom,msm8916.yaml        |  52 ++++
 .../bindings/interconnect/qcom,msm8939.yaml        |  74 ++++++
 .../bindings/interconnect/qcom,msm8996.yaml        | 165 ++++++++++++
 .../bindings/interconnect/qcom,qcm2290.yaml        |  54 +---
 .../bindings/interconnect/qcom,qcs404.yaml         |  52 ++++
 .../bindings/interconnect/qcom,rpm-common.yaml     |  31 +++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml | 281 ---------------------
 .../bindings/interconnect/qcom,sdm660.yaml         | 131 ++++++++++
 8 files changed, 509 insertions(+), 331 deletions(-)
---
base-commit: ae867bc97b713121b2a7f5fcac68378a0774739b
change-id: 20230721-topic-icc_bindings-72917016f595

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


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

* [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-22  9:35   ` Krzysztof Kozlowski
  2023-07-21 13:54 ` [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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        | 12 +++------
 .../bindings/interconnect/qcom,rpm-common.yaml     | 31 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
index f65a2fe846de..edee78c456b7 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
@@ -13,19 +13,16 @@ description: |
   The Qualcomm QCM2290 interconnect providers support adjusting the
   bandwidth requirements between the various NoC fabrics.
 
-properties:
-  reg:
-    maxItems: 1
+allOf:
+  - $ref: qcom,rpm-common.yaml#
 
+properties:
   compatible:
     enum:
       - qcom,qcm2290-bimc
       - qcom,qcm2290-cnoc
       - qcom,qcm2290-snoc
 
-  '#interconnect-cells':
-    const: 1
-
   clock-names:
     items:
       - const: bus
@@ -75,11 +72,10 @@ patternProperties:
 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..87995b40a856
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
@@ -0,0 +1,31 @@
+# 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:
+  reg:
+    maxItems: 1
+
+  '#interconnect-cells':
+    oneOf:
+      - const: 2
+      - const: 1
+        deprecated: true
+
+required:
+  - '#interconnect-cells'
+
+additionalProperties: true

-- 
2.41.0


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

* [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-22  9:36   ` Krzysztof Kozlowski
  2023-07-21 13:54 ` [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916 Konrad Dybcio
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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

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

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 edee78c456b7..d2a36bec97c2 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
@@ -23,16 +23,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]+$':
@@ -51,29 +41,15 @@ patternProperties:
       '#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
 
     additionalProperties: false
 
 required:
   - compatible
   - reg
-  - clock-names
-  - clocks
 
 unevaluatedProperties: false
 
@@ -85,32 +61,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>;
         };
     };
 
@@ -118,16 +82,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] 13+ messages in thread

* [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-22  9:38   ` Krzysztof Kozlowski
  2023-07-21 13:54 ` [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404 Konrad Dybcio
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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 MSM8916 icc bindings and fix the clocks description by
removing the wrong internal RPM bus clock representation that we've
been carrying for years.

Replace the example in qcom,rpm.yaml with MSM8939 to keep it relevant
to the file.

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

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
new file mode 100644
index 000000000000..49baf808c087
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,msm8916.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8916 Network-On-Chip interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+  The Qualcomm MSM8916 interconnect providers support adjusting the
+  bandwidth requirements between the various NoC fabrics.
+
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,msm8916-bimc
+      - qcom,msm8916-pcnoc
+      - qcom,msm8916-snoc
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+
+    snoc: interconnect@580000 {
+        compatible = "qcom,msm8916-snoc";
+        reg = <0x00580000 0x14000>;
+        #interconnect-cells = <1>;
+    };
+
+    pcnoc: interconnect@500000 {
+        compatible = "qcom,msm8916-pcnoc";
+        reg = <0x00500000 0x11000>;
+        #interconnect-cells = <1>;
+    };
+
+    bimc: interconnect@400000 {
+        compatible = "qcom,msm8916-bimc";
+        reg = <0x00400000 0x62000>;
+        #interconnect-cells = <1>;
+    };
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 4f95d512012a..788c5e88445a 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -20,9 +20,6 @@ properties:
 
   compatible:
     enum:
-      - qcom,msm8916-bimc
-      - qcom,msm8916-pcnoc
-      - qcom,msm8916-snoc
       - qcom,msm8939-bimc
       - qcom,msm8939-pcnoc
       - qcom,msm8939-snoc
@@ -109,9 +106,6 @@ allOf:
         compatible:
           contains:
             enum:
-              - qcom,msm8916-bimc
-              - qcom,msm8916-pcnoc
-              - qcom,msm8916-snoc
               - qcom,msm8939-bimc
               - qcom,msm8939-pcnoc
               - qcom,msm8939-snoc
@@ -254,7 +248,7 @@ examples:
       #include <dt-bindings/clock/qcom,rpmcc.h>
 
       bimc: interconnect@400000 {
-              compatible = "qcom,msm8916-bimc";
+              compatible = "qcom,msm8939-bimc";
               reg = <0x00400000 0x62000>;
               #interconnect-cells = <1>;
               clock-names = "bus", "bus_a";
@@ -263,7 +257,7 @@ examples:
       };
 
       pcnoc: interconnect@500000 {
-              compatible = "qcom,msm8916-pcnoc";
+              compatible = "qcom,msm8939-pcnoc";
               reg = <0x00500000 0x11000>;
               #interconnect-cells = <1>;
               clock-names = "bus", "bus_a";
@@ -272,10 +266,18 @@ examples:
       };
 
       snoc: interconnect@580000 {
-              compatible = "qcom,msm8916-snoc";
-              reg = <0x00580000 0x14000>;
-              #interconnect-cells = <1>;
+              compatible = "qcom,msm8939-snoc";
+              reg = <0x00580000 0x14080>;
               clock-names = "bus", "bus_a";
               clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
                        <&rpmcc RPM_SMD_SNOC_A_CLK>;
+              #interconnect-cells = <1>;
+
+              snoc_mm: interconnect-snoc {
+                      compatible = "qcom,msm8939-snoc-mm";
+                      clock-names = "bus", "bus_a";
+                      clocks = <&rpmcc RPM_SMD_SYSMMNOC_CLK>,
+                               <&rpmcc RPM_SMD_SYSMMNOC_A_CLK>;
+                      #interconnect-cells = <1>;
+              };
       };

-- 
2.41.0


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

* [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-07-21 13:54 ` [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916 Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-22  9:40   ` Krzysztof Kozlowski
  2023-07-21 13:54 ` [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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 QCS404 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,qcs404.yaml         | 52 ++++++++++++++++++++++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml |  6 ---
 2 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
new file mode 100644
index 000000000000..aff2daa55802
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,qcs404.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QCS404 Network-On-Chip interconnect
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+description: |
+  The Qualcomm QCS404 interconnect providers support adjusting the
+  bandwidth requirements between the various NoC fabrics.
+
+allOf:
+  - $ref: qcom,rpm-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,qcs404-bimc
+      - qcom,qcs404-pcnoc
+      - qcom,qcs404-snoc
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmcc.h>
+
+    snoc: interconnect@580000 {
+        compatible = "qcom,qcs404-snoc";
+        reg = <0x00580000 0x23080>;
+        #interconnect-cells = <1>;
+    };
+
+    pcnoc: interconnect@500000 {
+        compatible = "qcom,qcs404-pcnoc";
+        reg = <0x00500000 0x15080>;
+        #interconnect-cells = <1>;
+    };
+
+    bimc: interconnect@400000 {
+        compatible = "qcom,qcs404-bimc";
+        reg = <0x00400000 0x80000>;
+        #interconnect-cells = <1>;
+    };
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 788c5e88445a..58075c23f9f9 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -31,9 +31,6 @@ properties:
       - qcom,msm8996-mnoc
       - qcom,msm8996-pnoc
       - qcom,msm8996-snoc
-      - qcom,qcs404-bimc
-      - qcom,qcs404-pcnoc
-      - qcom,qcs404-snoc
       - qcom,sdm660-a2noc
       - qcom,sdm660-bimc
       - qcom,sdm660-cnoc
@@ -114,9 +111,6 @@ allOf:
               - qcom,msm8996-cnoc
               - qcom,msm8996-pnoc
               - qcom,msm8996-snoc
-              - qcom,qcs404-bimc
-              - qcom,qcs404-pcnoc
-              - qcom,qcs404-snoc
               - qcom,sdm660-bimc
               - qcom,sdm660-cnoc
               - qcom,sdm660-gnoc

-- 
2.41.0


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

* [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (3 preceding siblings ...)
  2023-07-21 13:54 ` [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404 Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-22  9:41   ` Krzysztof Kozlowski
  2023-07-21 13:54 ` [PATCH 6/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 7/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 Konrad Dybcio
  6 siblings, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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         | 131 +++++++++++++++++++++
 2 files changed, 131 insertions(+), 40 deletions(-)

diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 58075c23f9f9..00fe355f26de 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -31,12 +31,6 @@ properties:
       - qcom,msm8996-mnoc
       - qcom,msm8996-pnoc
       - qcom,msm8996-snoc
-      - qcom,sdm660-a2noc
-      - qcom,sdm660-bimc
-      - qcom,sdm660-cnoc
-      - qcom,sdm660-gnoc
-      - qcom,sdm660-mnoc
-      - qcom,sdm660-snoc
 
   '#interconnect-cells':
     description: |
@@ -111,10 +105,6 @@ allOf:
               - qcom,msm8996-cnoc
               - qcom,msm8996-pnoc
               - qcom,msm8996-snoc
-              - qcom,sdm660-bimc
-              - qcom,sdm660-cnoc
-              - qcom,sdm660-gnoc
-              - qcom,sdm660-snoc
 
     then:
       properties:
@@ -134,7 +124,6 @@ allOf:
           contains:
             enum:
               - qcom,msm8996-mnoc
-              - qcom,sdm660-mnoc
 
     then:
       properties:
@@ -197,35 +186,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..29b1a1987642
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
@@ -0,0 +1,131 @@
+# 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
+
+  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>;
+    };
+
+    cnoc: interconnect@1500000 {
+        compatible = "qcom,sdm660-cnoc";
+        reg = <0x01500000 0x10000>;
+        #interconnect-cells = <1>;
+    };
+
+    snoc: interconnect@1626000 {
+        compatible = "qcom,sdm660-snoc";
+        reg = <0x01626000 0x7090>;
+        #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";
+    };
+
+    mnoc: interconnect@1745000 {
+        compatible = "qcom,sdm660-mnoc";
+        reg = <0x01745000 0xa010>;
+        #interconnect-cells = <1>;
+        clocks = <&mmcc AHB_CLK_SRC>;
+        clock-names = "iface";
+    };
+
+    gnoc: interconnect@17900000 {
+        compatible = "qcom,sdm660-gnoc";
+        reg = <0x17900000 0xe000>;
+        #interconnect-cells = <1>;
+    };

-- 
2.41.0


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

* [PATCH 6/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (4 preceding siblings ...)
  2023-07-21 13:54 ` [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  2023-07-21 13:54 ` [PATCH 7/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 Konrad Dybcio
  6 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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        | 165 +++++++++++++++++++++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml |  81 ----------
 2 files changed, 165 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..c003ca5ee746
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8996.yaml
@@ -0,0 +1,165 @@
+# 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
+
+  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>;
+    };
+
+    cnoc: interconnect@500000 {
+        compatible = "qcom,msm8996-cnoc";
+        reg = <0x00500000 0x1000>;
+        #interconnect-cells = <1>;
+    };
+
+    snoc: interconnect@524000 {
+        compatible = "qcom,msm8996-snoc";
+        reg = <0x00524000 0x1c000>;
+        #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>;
+    };
+
+    a1noc: interconnect@562000 {
+        compatible = "qcom,msm8996-a1noc";
+        reg = <0x00562000 0x5000>;
+        #interconnect-cells = <1>;
+    };
+
+    a2noc: interconnect@583000 {
+        compatible = "qcom,msm8996-a2noc";
+        reg = <0x00583000 0x7000>;
+        clocks = <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
+                 <&gcc GCC_UFS_AXI_CLK>;
+        clock-names = "aggre2_ufs_axi",
+                      "ufs_axi";
+        #interconnect-cells = <1>;
+    };
+
+    mnoc: interconnect@5a4000 {
+        compatible = "qcom,msm8996-mnoc";
+        reg = <0x005a4000 0x1c000>;
+        clocks = <&mmcc AHB_CLK_SRC>;
+        clock-names = "iface";
+        #interconnect-cells = <1>;
+    };
+
+    pnoc: interconnect@5c0000 {
+        compatible = "qcom,msm8996-pnoc";
+        reg = <0x005c0000 0x3000>;
+        #interconnect-cells = <1>;
+    };
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
index 00fe355f26de..6f8836312496 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
@@ -23,14 +23,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
 
   '#interconnect-cells':
     description: |
@@ -100,11 +92,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
 
     then:
       properties:
@@ -118,74 +105,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] 13+ messages in thread

* [PATCH 7/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939
  2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
                   ` (5 preceding siblings ...)
  2023-07-21 13:54 ` [PATCH 6/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
@ 2023-07-21 13:54 ` Konrad Dybcio
  6 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2023-07-21 13:54 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 | 156 ---------------------
 2 files changed, 74 insertions(+), 156 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..00378c1ef9d6
--- /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
+
+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.
+
+    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>;
+    };
+
+    pcnoc: interconnect@500000 {
+        compatible = "qcom,msm8939-pcnoc";
+        reg = <0x00500000 0x11000>;
+        #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
deleted file mode 100644
index 6f8836312496..000000000000
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
+++ /dev/null
@@ -1,156 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/interconnect/qcom,rpm.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Qualcomm RPM Network-On-Chip Interconnect
-
-maintainers:
-  - Georgi Djakov <georgi.djakov@linaro.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.
-
-properties:
-  reg:
-    maxItems: 1
-
-  compatible:
-    enum:
-      - qcom,msm8939-bimc
-      - qcom,msm8939-pcnoc
-      - qcom,msm8939-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
-
-# 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
-  - '#interconnect-cells'
-  - clock-names
-  - clocks
-
-additionalProperties: false
-
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - qcom,msm8939-bimc
-              - qcom,msm8939-pcnoc
-              - qcom,msm8939-snoc
-
-    then:
-      properties:
-        clock-names:
-          items:
-            - const: bus
-            - const: bus_a
-
-        clocks:
-          items:
-            - 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>
-
-      bimc: interconnect@400000 {
-              compatible = "qcom,msm8939-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,msm8939-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,msm8939-snoc";
-              reg = <0x00580000 0x14080>;
-              clock-names = "bus", "bus_a";
-              clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
-                       <&rpmcc RPM_SMD_SNOC_A_CLK>;
-              #interconnect-cells = <1>;
-
-              snoc_mm: interconnect-snoc {
-                      compatible = "qcom,msm8939-snoc-mm";
-                      clock-names = "bus", "bus_a";
-                      clocks = <&rpmcc RPM_SMD_SYSMMNOC_CLK>,
-                               <&rpmcc RPM_SMD_SYSMMNOC_A_CLK>;
-                      #interconnect-cells = <1>;
-              };
-      };

-- 
2.41.0


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

* Re: [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
  2023-07-21 13:54 ` [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
@ 2023-07-22  9:35   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-22  9:35 UTC (permalink / raw)
  To: Konrad Dybcio, 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

On 21/07/2023 15:54, 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        | 12 +++------
>  .../bindings/interconnect/qcom,rpm-common.yaml     | 31 ++++++++++++++++++++++
>  2 files changed, 35 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> index f65a2fe846de..edee78c456b7 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> @@ -13,19 +13,16 @@ description: |
>    The Qualcomm QCM2290 interconnect providers support adjusting the
>    bandwidth requirements between the various NoC fabrics.
>  
> -properties:
> -  reg:
> -    maxItems: 1
> +allOf:
> +  - $ref: qcom,rpm-common.yaml#
>  
> +properties:
>    compatible:
>      enum:
>        - qcom,qcm2290-bimc
>        - qcom,qcm2290-cnoc
>        - qcom,qcm2290-snoc
>  
> -  '#interconnect-cells':
> -    const: 1
> -
>    clock-names:
>      items:
>        - const: bus

What about the children? Aren't they also rpm-common?

> @@ -75,11 +72,10 @@ patternProperties:
>  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..87995b40a856
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
> @@ -0,0 +1,31 @@
> +# 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:
> +  reg:
> +    maxItems: 1

I would drop the reg from common parts because some of the children here
don't use it.

Best regards,
Krzysztof


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

* Re: [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks
  2023-07-21 13:54 ` [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
@ 2023-07-22  9:36   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-22  9:36 UTC (permalink / raw)
  To: Konrad Dybcio, 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

On 21/07/2023 15:54, Konrad Dybcio wrote:
> After the recent reshuffling, bus clocks are no longer exposed as RPM
> clocks. Remove the old description.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/interconnect/qcom,qcm2290.yaml        | 42 ----------------------
>  1 file changed, 42 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916
  2023-07-21 13:54 ` [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916 Konrad Dybcio
@ 2023-07-22  9:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-22  9:38 UTC (permalink / raw)
  To: Konrad Dybcio, 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

On 21/07/2023 15:54, Konrad Dybcio wrote:
> Separate out MSM8916 icc bindings and fix the clocks description by
> removing the wrong internal RPM bus clock representation that we've
> been carrying for years.
> 
> Replace the example in qcom,rpm.yaml with MSM8939 to keep it relevant
> to the file.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/interconnect/qcom,msm8916.yaml        | 52 ++++++++++++++++++++++
>  .../devicetree/bindings/interconnect/qcom,rpm.yaml | 24 +++++-----
>  2 files changed, 65 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml b/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
> new file mode 100644
> index 000000000000..49baf808c087
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interconnect/qcom,msm8916.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm MSM8916 Network-On-Chip interconnect
> +
> +maintainers:
> +  - Konrad Dybcio <konradybcio@kernel.org>
> +
> +description: |
> +  The Qualcomm MSM8916 interconnect providers support adjusting the
> +  bandwidth requirements between the various NoC fabrics.
> +
> +allOf:
> +  - $ref: qcom,rpm-common.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,msm8916-bimc
> +      - qcom,msm8916-pcnoc
> +      - qcom,msm8916-snoc
> +

Keeping reg here also makes it nicely aligned with required: (property
and required are both in one file)

> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,rpmcc.h>
> +
> +    snoc: interconnect@580000 {
> +        compatible = "qcom,msm8916-snoc";
> +        reg = <0x00580000 0x14000>;
> +        #interconnect-cells = <1>;
> +    };
> +
> +    pcnoc: interconnect@500000 {
> +        compatible = "qcom,msm8916-pcnoc";
> +        reg = <0x00500000 0x11000>;
> +        #interconnect-cells = <1>;
> +    };
> +
> +    bimc: interconnect@400000 {
> +        compatible = "qcom,msm8916-bimc";
> +        reg = <0x00400000 0x62000>;
> +        #interconnect-cells = <1>;
> +    };

Just keep one example.

> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> index 4f95d512012a..788c5e88445a 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> @@ -20,9 +20,6 @@ properties:
>  
>    compatible:
>      enum:
> -      - qcom,msm8916-bimc
> -      - qcom,msm8916-pcnoc
> -      - qcom,msm8916-snoc
>        - qcom,msm8939-bimc
>        - qcom,msm8939-pcnoc
>        - qcom,msm8939-snoc
> @@ -109,9 +106,6 @@ allOf:
>          compatible:
>            contains:
>              enum:
> -              - qcom,msm8916-bimc
> -              - qcom,msm8916-pcnoc
> -              - qcom,msm8916-snoc
>                - qcom,msm8939-bimc
>                - qcom,msm8939-pcnoc
>                - qcom,msm8939-snoc
> @@ -254,7 +248,7 @@ examples:
>        #include <dt-bindings/clock/qcom,rpmcc.h>
>  
>        bimc: interconnect@400000 {
> -              compatible = "qcom,msm8916-bimc";
> +              compatible = "qcom,msm8939-bimc";
>                reg = <0x00400000 0x62000>;
>                #interconnect-cells = <1>;
>                clock-names = "bus", "bus_a";
> @@ -263,7 +257,7 @@ examples:
>        };
>  
>        pcnoc: interconnect@500000 {
> -              compatible = "qcom,msm8916-pcnoc";
> +              compatible = "qcom,msm8939-pcnoc";
>                reg = <0x00500000 0x11000>;
>                #interconnect-cells = <1>;
>                clock-names = "bus", "bus_a";

This part makes little sense since you remove the file few patches
later. I suggest reverse the order of patches. Split out first the oones
without examples (like 8939), so the last step is kind of rename.


Best regards,
Krzysztof


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

* Re: [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404
  2023-07-21 13:54 ` [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404 Konrad Dybcio
@ 2023-07-22  9:40   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-22  9:40 UTC (permalink / raw)
  To: Konrad Dybcio, 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

On 21/07/2023 15:54, Konrad Dybcio wrote:
> Separate out QCS404 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,qcs404.yaml         | 52 ++++++++++++++++++++++
>  .../devicetree/bindings/interconnect/qcom,rpm.yaml |  6 ---
>  2 files changed, 52 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
> new file mode 100644
> index 000000000000..aff2daa55802
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interconnect/qcom,qcs404.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm QCS404 Network-On-Chip interconnect
> +
> +maintainers:
> +  - Konrad Dybcio <konradybcio@kernel.org>
> +
> +description: |
> +  The Qualcomm QCS404 interconnect providers support adjusting the
> +  bandwidth requirements between the various NoC fabrics.
> +
> +allOf:
> +  - $ref: qcom,rpm-common.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,qcs404-bimc
> +      - qcom,qcs404-pcnoc
> +      - qcom,qcs404-snoc

I am not sure it is reasonable to keep such short bindings each in its
own file. Maybe 8916 and qcs404 should be left in common file?

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,rpmcc.h>
> +
> +    snoc: interconnect@580000 {
> +        compatible = "qcom,qcs404-snoc";
> +        reg = <0x00580000 0x23080>;
> +        #interconnect-cells = <1>;
> +    };
> +
> +    pcnoc: interconnect@500000 {
> +        compatible = "qcom,qcs404-pcnoc";
> +        reg = <0x00500000 0x15080>;
> +        #interconnect-cells = <1>;
> +    };
> +
> +    bimc: interconnect@400000 {
> +        compatible = "qcom,qcs404-bimc";
> +        reg = <0x00400000 0x80000>;
> +        #interconnect-cells = <1>;
> +    };

Keep only one example.

Best regards,
Krzysztof


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

* Re: [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660
  2023-07-21 13:54 ` [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
@ 2023-07-22  9:41   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-22  9:41 UTC (permalink / raw)
  To: Konrad Dybcio, 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

On 21/07/2023 15:54, Konrad Dybcio wrote:
> 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>

...

> +
> +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>;
> +    };
> +
> +    cnoc: interconnect@1500000 {
> +        compatible = "qcom,sdm660-cnoc";
> +        reg = <0x01500000 0x10000>;
> +        #interconnect-cells = <1>;
> +    };
> +
> +    snoc: interconnect@1626000 {
> +        compatible = "qcom,sdm660-snoc";
> +        reg = <0x01626000 0x7090>;
> +        #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";
> +    };

Keep only two examples.

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-07-22  9:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 13:54 [PATCH 0/7] Update RPM ICC bindings Konrad Dybcio
2023-07-21 13:54 ` [PATCH 1/7] dt-bindings: interconnect: qcom: Introduce qcom,rpm-common Konrad Dybcio
2023-07-22  9:35   ` Krzysztof Kozlowski
2023-07-21 13:54 ` [PATCH 2/7] dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks Konrad Dybcio
2023-07-22  9:36   ` Krzysztof Kozlowski
2023-07-21 13:54 ` [PATCH 3/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8916 Konrad Dybcio
2023-07-22  9:38   ` Krzysztof Kozlowski
2023-07-21 13:54 ` [PATCH 4/7] dt-bindings: interconnect: qcom: Fix and separate out QCS404 Konrad Dybcio
2023-07-22  9:40   ` Krzysztof Kozlowski
2023-07-21 13:54 ` [PATCH 5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660 Konrad Dybcio
2023-07-22  9:41   ` Krzysztof Kozlowski
2023-07-21 13:54 ` [PATCH 6/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8996 Konrad Dybcio
2023-07-21 13:54 ` [PATCH 7/7] dt-bindings: interconnect: qcom: Fix and separate out MSM8939 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).