diff mbox series

[5/7] dt-bindings: interconnect: qcom: Fix and separate out SDM660

Message ID 20230721-topic-icc_bindings-v1-5-93e2bc728fb7@linaro.org
State New
Headers show
Series Update RPM ICC bindings | expand

Commit Message

Konrad Dybcio July 21, 2023, 1:54 p.m. UTC
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(-)

Comments

Krzysztof Kozlowski July 22, 2023, 9:41 a.m. UTC | #1
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
diff mbox series

Patch

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>;
+    };