1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/interconnect/qcom,rpm.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm RPM Network-On-Chip Interconnect
8
9maintainers:
10  - Georgi Djakov <georgi.djakov@linaro.org>
11
12description: |
13  RPM interconnect providers support system bandwidth requirements through
14  RPM processor. The provider is able to communicate with the RPM through
15  the RPM shared memory device.
16
17properties:
18  reg:
19    maxItems: 1
20
21  compatible:
22    enum:
23      - qcom,msm8916-bimc
24      - qcom,msm8916-pcnoc
25      - qcom,msm8916-snoc
26      - qcom,msm8939-bimc
27      - qcom,msm8939-pcnoc
28      - qcom,msm8939-snoc
29      - qcom,msm8996-a0noc
30      - qcom,msm8996-a1noc
31      - qcom,msm8996-a2noc
32      - qcom,msm8996-bimc
33      - qcom,msm8996-cnoc
34      - qcom,msm8996-mnoc
35      - qcom,msm8996-pnoc
36      - qcom,msm8996-snoc
37      - qcom,qcs404-bimc
38      - qcom,qcs404-pcnoc
39      - qcom,qcs404-snoc
40      - qcom,sdm660-a2noc
41      - qcom,sdm660-bimc
42      - qcom,sdm660-cnoc
43      - qcom,sdm660-gnoc
44      - qcom,sdm660-mnoc
45      - qcom,sdm660-snoc
46
47  '#interconnect-cells':
48    description: |
49      Value: <1> is one cell in an interconnect specifier for the
50      interconnect node id, <2> requires the interconnect node id and an
51      extra path tag.
52    enum: [ 1, 2 ]
53
54  clocks:
55    minItems: 2
56    maxItems: 7
57
58  clock-names:
59    minItems: 2
60    maxItems: 7
61
62  power-domains:
63    maxItems: 1
64
65# Child node's properties
66patternProperties:
67  '^interconnect-[a-z0-9]+$':
68    type: object
69    description:
70      snoc-mm is a child of snoc, sharing snoc's register address space.
71
72    properties:
73      compatible:
74        enum:
75          - qcom,msm8939-snoc-mm
76
77      '#interconnect-cells':
78        const: 1
79
80      clock-names:
81        items:
82          - const: bus
83          - const: bus_a
84
85      clocks:
86        items:
87          - description: Bus Clock
88          - description: Bus A Clock
89
90    required:
91      - compatible
92      - '#interconnect-cells'
93      - clock-names
94      - clocks
95
96required:
97  - compatible
98  - reg
99  - '#interconnect-cells'
100  - clock-names
101  - clocks
102
103additionalProperties: false
104
105allOf:
106  - if:
107      properties:
108        compatible:
109          contains:
110            enum:
111              - qcom,msm8916-bimc
112              - qcom,msm8916-pcnoc
113              - qcom,msm8916-snoc
114              - qcom,msm8939-bimc
115              - qcom,msm8939-pcnoc
116              - qcom,msm8939-snoc
117              - qcom,msm8996-a1noc
118              - qcom,msm8996-bimc
119              - qcom,msm8996-cnoc
120              - qcom,msm8996-pnoc
121              - qcom,msm8996-snoc
122              - qcom,qcs404-bimc
123              - qcom,qcs404-pcnoc
124              - qcom,qcs404-snoc
125              - qcom,sdm660-bimc
126              - qcom,sdm660-cnoc
127              - qcom,sdm660-gnoc
128              - qcom,sdm660-snoc
129
130    then:
131      properties:
132        clock-names:
133          items:
134            - const: bus
135            - const: bus_a
136
137        clocks:
138          items:
139            - description: Bus Clock
140            - description: Bus A Clock
141
142  - if:
143      properties:
144        compatible:
145          contains:
146            enum:
147              - qcom,msm8996-mnoc
148              - qcom,sdm660-mnoc
149
150    then:
151      properties:
152        clock-names:
153          items:
154            - const: bus
155            - const: bus_a
156            - const: iface
157
158        clocks:
159          items:
160            - description: Bus Clock.
161            - description: Bus A Clock.
162            - description: CPU-NoC High-performance Bus Clock.
163
164  - if:
165      properties:
166        compatible:
167          contains:
168            enum:
169              - qcom,msm8996-a0noc
170
171    then:
172      properties:
173        clock-names:
174          items:
175            - const: aggre0_snoc_axi
176            - const: aggre0_cnoc_ahb
177            - const: aggre0_noc_mpu_cfg
178
179        clocks:
180          items:
181            - description: Aggregate0 System NoC AXI Clock.
182            - description: Aggregate0 Config NoC AHB Clock.
183            - description: Aggregate0 NoC MPU Clock.
184
185      required:
186        - power-domains
187
188  - if:
189      properties:
190        compatible:
191          contains:
192            enum:
193              - qcom,msm8996-a2noc
194
195    then:
196      properties:
197        clock-names:
198          items:
199            - const: bus
200            - const: bus_a
201            - const: aggre2_ufs_axi
202            - const: ufs_axi
203
204        clocks:
205          items:
206            - description: Bus Clock
207            - description: Bus A Clock
208            - description: Aggregate2 NoC UFS AXI Clock
209            - description: UFS AXI Clock
210
211  - if:
212      properties:
213        compatible:
214          contains:
215            enum:
216              - qcom,sdm660-a2noc
217
218    then:
219      properties:
220        clock-names:
221          items:
222            - const: bus
223            - const: bus_a
224            - const: ipa
225            - const: ufs_axi
226            - const: aggre2_ufs_axi
227            - const: aggre2_usb3_axi
228            - const: cfg_noc_usb2_axi
229
230        clocks:
231          items:
232            - description: Bus Clock.
233            - description: Bus A Clock.
234            - description: IPA Clock.
235            - description: UFS AXI Clock.
236            - description: Aggregate2 UFS AXI Clock.
237            - description: Aggregate2 USB3 AXI Clock.
238            - description: Config NoC USB2 AXI Clock.
239
240  - if:
241      not:
242        properties:
243          compatible:
244            contains:
245              enum:
246                - qcom,msm8939-snoc
247    then:
248      patternProperties:
249        '^interconnect-[a-z0-9]+$': false
250
251examples:
252  - |
253      #include <dt-bindings/clock/qcom,rpmcc.h>
254
255      bimc: interconnect@400000 {
256              compatible = "qcom,msm8916-bimc";
257              reg = <0x00400000 0x62000>;
258              #interconnect-cells = <1>;
259              clock-names = "bus", "bus_a";
260              clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
261                       <&rpmcc RPM_SMD_BIMC_A_CLK>;
262      };
263
264      pcnoc: interconnect@500000 {
265              compatible = "qcom,msm8916-pcnoc";
266              reg = <0x00500000 0x11000>;
267              #interconnect-cells = <1>;
268              clock-names = "bus", "bus_a";
269              clocks = <&rpmcc RPM_SMD_PCNOC_CLK>,
270                       <&rpmcc RPM_SMD_PCNOC_A_CLK>;
271      };
272
273      snoc: interconnect@580000 {
274              compatible = "qcom,msm8916-snoc";
275              reg = <0x00580000 0x14000>;
276              #interconnect-cells = <1>;
277              clock-names = "bus", "bus_a";
278              clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
279                       <&rpmcc RPM_SMD_SNOC_A_CLK>;
280      };
281