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