xref: /linux/Documentation/devicetree/bindings/cache/qcom,llcc.yaml (revision f4cdf7ca9a1fdcca413157df19753f388a5a224e)
1# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/cache/qcom,llcc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Last Level Cache Controller
8
9maintainers:
10  - Bjorn Andersson <andersson@kernel.org>
11
12description: |
13  LLCC (Last Level Cache Controller) provides last level of cache memory in SoC,
14  that can be shared by multiple clients. Clients here are different cores in the
15  SoC, the idea is to minimize the local caches at the clients and migrate to
16  common pool of memory. Cache memory is divided into partitions called slices
17  which are assigned to clients. Clients can query the slice details, activate
18  and deactivate them.
19
20properties:
21  compatible:
22    oneOf:
23      - enum:
24          - qcom,eliza-llcc
25          - qcom,glymur-llcc
26          - qcom,hawi-llcc
27          - qcom,ipq5424-llcc
28          - qcom,kaanapali-llcc
29          - qcom,qcs615-llcc
30          - qcom,qcs8300-llcc
31          - qcom,qdu1000-llcc
32          - qcom,sa8775p-llcc
33          - qcom,sar1130p-llcc
34          - qcom,sar2130p-llcc
35          - qcom,sc7180-llcc
36          - qcom,sc7280-llcc
37          - qcom,sc8180x-llcc
38          - qcom,sc8280xp-llcc
39          - qcom,sdm670-llcc
40          - qcom,sdm845-llcc
41          - qcom,shikra-llcc
42          - qcom,sm6350-llcc
43          - qcom,sm7150-llcc
44          - qcom,sm8150-llcc
45          - qcom,sm8250-llcc
46          - qcom,sm8350-llcc
47          - qcom,sm8450-llcc
48          - qcom,sm8550-llcc
49          - qcom,sm8650-llcc
50          - qcom,sm8750-llcc
51          - qcom,x1e80100-llcc
52      - items:
53          - enum:
54              - qcom,maili-llcc
55          - const: qcom,hawi-llcc
56
57  reg:
58    minItems: 1
59    maxItems: 14
60
61  reg-names:
62    minItems: 1
63    maxItems: 14
64
65  interrupts:
66    maxItems: 1
67
68  memory-region:
69    maxItems: 1
70    description: handle to a reserved-memory node used for firmware-populated
71      SLC/SCT shared memory.
72
73  nvmem-cells:
74    items:
75      - description: Reference to an nvmem node for multi channel DDR
76
77  nvmem-cell-names:
78    items:
79      - const: multi-chan-ddr
80
81required:
82  - compatible
83  - reg
84  - reg-names
85
86allOf:
87  - if:
88      properties:
89        compatible:
90          contains:
91            enum:
92              - qcom,ipq5424-llcc
93    then:
94      properties:
95        reg:
96          items:
97            - description: LLCC0 base register region
98        reg-names:
99          items:
100            - const: llcc0_base
101
102  - if:
103      properties:
104        compatible:
105          contains:
106            enum:
107              - qcom,glymur-llcc
108    then:
109      properties:
110        reg:
111          items:
112            - description: LLCC0 base register region
113            - description: LLCC1 base register region
114            - description: LLCC2 base register region
115            - description: LLCC3 base register region
116            - description: LLCC4 base register region
117            - description: LLCC5 base register region
118            - description: LLCC6 base register region
119            - description: LLCC7 base register region
120            - description: LLCC8 base register region
121            - description: LLCC9 base register region
122            - description: LLCC10 base register region
123            - description: LLCC11 base register region
124            - description: LLCC broadcast base register region
125            - description: LLCC broadcast AND register region
126        reg-names:
127          items:
128            - const: llcc0_base
129            - const: llcc1_base
130            - const: llcc2_base
131            - const: llcc3_base
132            - const: llcc4_base
133            - const: llcc5_base
134            - const: llcc6_base
135            - const: llcc7_base
136            - const: llcc8_base
137            - const: llcc9_base
138            - const: llcc10_base
139            - const: llcc11_base
140            - const: llcc_broadcast_base
141            - const: llcc_broadcast_and_base
142
143  - if:
144      properties:
145        compatible:
146          contains:
147            enum:
148              - qcom,sar1130p-llcc
149              - qcom,sar2130p-llcc
150    then:
151      properties:
152        reg:
153          items:
154            - description: LLCC0 base register region
155            - description: LLCC1 base register region
156            - description: LLCC broadcast OR register region
157            - description: LLCC broadcast AND register region
158            - description: LLCC scratchpad broadcast OR register region
159            - description: LLCC scratchpad broadcast AND register region
160        reg-names:
161          items:
162            - const: llcc0_base
163            - const: llcc1_base
164            - const: llcc_broadcast_base
165            - const: llcc_broadcast_and_base
166            - const: llcc_scratchpad_broadcast_base
167            - const: llcc_scratchpad_broadcast_and_base
168
169  - if:
170      properties:
171        compatible:
172          contains:
173            enum:
174              - qcom,qcs615-llcc
175              - qcom,sc7180-llcc
176              - qcom,sm6350-llcc
177    then:
178      properties:
179        reg:
180          items:
181            - description: LLCC0 base register region
182            - description: LLCC broadcast base register region
183        reg-names:
184          items:
185            - const: llcc0_base
186            - const: llcc_broadcast_base
187
188  - if:
189      properties:
190        compatible:
191          contains:
192            enum:
193              - qcom,sa8775p-llcc
194    then:
195      properties:
196        reg:
197          items:
198            - description: LLCC0 base register region
199            - description: LLCC1 base register region
200            - description: LLCC2 base register region
201            - description: LLCC3 base register region
202            - description: LLCC4 base register region
203            - description: LLCC5 base register region
204            - description: LLCC broadcast base register region
205        reg-names:
206          items:
207            - const: llcc0_base
208            - const: llcc1_base
209            - const: llcc2_base
210            - const: llcc3_base
211            - const: llcc4_base
212            - const: llcc5_base
213            - const: llcc_broadcast_base
214
215  - if:
216      properties:
217        compatible:
218          contains:
219            enum:
220              - qcom,sc7280-llcc
221              - qcom,sdm670-llcc
222              - qcom,shikra-llcc
223    then:
224      properties:
225        reg:
226          items:
227            - description: LLCC0 base register region
228            - description: LLCC1 base register region
229            - description: LLCC broadcast base register region
230        reg-names:
231          items:
232            - const: llcc0_base
233            - const: llcc1_base
234            - const: llcc_broadcast_base
235
236  - if:
237      properties:
238        compatible:
239          contains:
240            enum:
241              - qcom,qdu1000-llcc
242              - qcom,sc8180x-llcc
243              - qcom,sc8280xp-llcc
244    then:
245      properties:
246        reg:
247          items:
248            - description: LLCC0 base register region
249            - description: LLCC1 base register region
250            - description: LLCC2 base register region
251            - description: LLCC3 base register region
252            - description: LLCC4 base register region
253            - description: LLCC5 base register region
254            - description: LLCC6 base register region
255            - description: LLCC7 base register region
256            - description: LLCC broadcast base register region
257        reg-names:
258          items:
259            - const: llcc0_base
260            - const: llcc1_base
261            - const: llcc2_base
262            - const: llcc3_base
263            - const: llcc4_base
264            - const: llcc5_base
265            - const: llcc6_base
266            - const: llcc7_base
267            - const: llcc_broadcast_base
268
269  - if:
270      properties:
271        compatible:
272          contains:
273            enum:
274              - qcom,x1e80100-llcc
275    then:
276      properties:
277        reg:
278          items:
279            - description: LLCC0 base register region
280            - description: LLCC1 base register region
281            - description: LLCC2 base register region
282            - description: LLCC3 base register region
283            - description: LLCC4 base register region
284            - description: LLCC5 base register region
285            - description: LLCC6 base register region
286            - description: LLCC7 base register region
287            - description: LLCC broadcast base register region
288            - description: LLCC broadcast AND register region
289        reg-names:
290          items:
291            - const: llcc0_base
292            - const: llcc1_base
293            - const: llcc2_base
294            - const: llcc3_base
295            - const: llcc4_base
296            - const: llcc5_base
297            - const: llcc6_base
298            - const: llcc7_base
299            - const: llcc_broadcast_base
300            - const: llcc_broadcast_and_base
301
302  - if:
303      properties:
304        compatible:
305          contains:
306            enum:
307              - qcom,qcs8300-llcc
308              - qcom,sdm845-llcc
309              - qcom,sm8150-llcc
310              - qcom,sm8250-llcc
311              - qcom,sm8350-llcc
312    then:
313      properties:
314        reg:
315          items:
316            - description: LLCC0 base register region
317            - description: LLCC1 base register region
318            - description: LLCC2 base register region
319            - description: LLCC3 base register region
320            - description: LLCC broadcast base register region
321        reg-names:
322          items:
323            - const: llcc0_base
324            - const: llcc1_base
325            - const: llcc2_base
326            - const: llcc3_base
327            - const: llcc_broadcast_base
328
329  - if:
330      properties:
331        compatible:
332          contains:
333            enum:
334              - qcom,kaanapali-llcc
335              - qcom,hawi-llcc
336              - qcom,sm8450-llcc
337              - qcom,sm8550-llcc
338              - qcom,sm8650-llcc
339              - qcom,sm8750-llcc
340    then:
341      properties:
342        reg:
343          items:
344            - description: LLCC0 base register region
345            - description: LLCC1 base register region
346            - description: LLCC2 base register region
347            - description: LLCC3 base register region
348            - description: LLCC broadcast OR register region
349            - description: LLCC broadcast AND register region
350        reg-names:
351          items:
352            - const: llcc0_base
353            - const: llcc1_base
354            - const: llcc2_base
355            - const: llcc3_base
356            - const: llcc_broadcast_base
357            - const: llcc_broadcast_and_base
358  - if:
359      properties:
360        compatible:
361          contains:
362            enum:
363              - qcom,hawi-llcc
364    then:
365      required:
366        - memory-region
367    else:
368      properties:
369        memory-region: false
370
371  - if:
372      properties:
373        compatible:
374          contains:
375            enum:
376              - qcom,eliza-llcc
377    then:
378      properties:
379        reg:
380          items:
381            - description: LLCC0 base register region
382            - description: LLCC2 base register region
383            - description: LLCC broadcast OR register region
384            - description: LLCC broadcast AND register region
385        reg-names:
386          items:
387            - const: llcc0_base
388            - const: llcc2_base
389            - const: llcc_broadcast_base
390            - const: llcc_broadcast_and_base
391
392additionalProperties: false
393
394examples:
395  - |
396    #include <dt-bindings/interrupt-controller/arm-gic.h>
397
398    soc {
399        #address-cells = <2>;
400        #size-cells = <2>;
401
402        system-cache-controller@1100000 {
403            compatible = "qcom,sdm845-llcc";
404            reg = <0 0x01100000 0 0x50000>, <0 0x01180000 0 0x50000>,
405                <0 0x01200000 0 0x50000>, <0 0x01280000 0 0x50000>,
406                <0 0x01300000 0 0x50000>;
407            reg-names = "llcc0_base", "llcc1_base", "llcc2_base",
408                "llcc3_base", "llcc_broadcast_base";
409            interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
410        };
411    };
412