xref: /linux/Documentation/devicetree/bindings/display/msm/gmu.yaml (revision 2cc21a66c0c8673f18064cd9896aeb0fda880fa0)
1# SPDX-License-Identifier: GPL-2.0-only
2# Copyright 2019-2020, The Linux Foundation, All Rights Reserved
3%YAML 1.2
4---
5
6$id: http://devicetree.org/schemas/display/msm/gmu.yaml#
7$schema: http://devicetree.org/meta-schemas/core.yaml#
8
9title: GMU attached to certain Adreno GPUs
10
11maintainers:
12  - Rob Clark <robdclark@gmail.com>
13
14description: |
15  These bindings describe the Graphics Management Unit (GMU) that is attached
16  to members of the Adreno A6xx GPU family. The GMU provides on-device power
17  management and support to improve power efficiency and reduce the load on
18  the CPU.
19
20properties:
21  compatible:
22    oneOf:
23      - items:
24          - pattern: '^qcom,adreno-gmu-[6-8][0-9][0-9]\.[0-9]$'
25          - const: qcom,adreno-gmu
26      - items:
27          - pattern: '^qcom,adreno-gmu-x[1-9][0-9][0-9]\.[0-9]$'
28          - const: qcom,adreno-gmu
29      - const: qcom,adreno-gmu-wrapper
30
31  reg:
32    minItems: 1
33    maxItems: 4
34
35  reg-names:
36    minItems: 1
37    maxItems: 4
38
39  clocks:
40    minItems: 4
41    maxItems: 7
42
43  clock-names:
44    minItems: 4
45    maxItems: 7
46
47  interrupts:
48    items:
49      - description: GMU HFI interrupt
50      - description: GMU interrupt
51
52  interrupt-names:
53    items:
54      - const: hfi
55      - const: gmu
56
57  power-domains:
58    items:
59      - description: CX power domain
60      - description: GX power domain
61
62  power-domain-names:
63    items:
64      - const: cx
65      - const: gx
66
67  iommus:
68    maxItems: 1
69
70  qcom,qmp:
71    $ref: /schemas/types.yaml#/definitions/phandle
72    description: Reference to the AOSS side-channel message RAM
73
74  operating-points-v2: true
75
76  opp-table:
77    type: object
78
79required:
80  - compatible
81  - reg
82  - reg-names
83  - power-domains
84  - power-domain-names
85
86additionalProperties: false
87
88allOf:
89  - if:
90      properties:
91        compatible:
92          contains:
93            enum:
94              - qcom,adreno-gmu-615.0
95              - qcom,adreno-gmu-618.0
96              - qcom,adreno-gmu-630.2
97    then:
98      properties:
99        reg:
100          items:
101            - description: Core GMU registers
102            - description: GMU PDC registers
103            - description: GMU PDC sequence registers
104        reg-names:
105          items:
106            - const: gmu
107            - const: gmu_pdc
108            - const: gmu_pdc_seq
109        clocks:
110          items:
111            - description: GMU clock
112            - description: GPU CX clock
113            - description: GPU AXI clock
114            - description: GPU MEMNOC clock
115        clock-names:
116          items:
117            - const: gmu
118            - const: cxo
119            - const: axi
120            - const: memnoc
121
122  - if:
123      properties:
124        compatible:
125          contains:
126            enum:
127              - qcom,adreno-gmu-623.0
128    then:
129      properties:
130        reg:
131          items:
132            - description: Core GMU registers
133            - description: Resource controller registers
134            - description: GMU PDC registers
135        reg-names:
136          items:
137            - const: gmu
138            - const: rscc
139            - const: gmu_pdc
140        clocks:
141          items:
142            - description: GMU clock
143            - description: GPU CX clock
144            - description: GPU AXI clock
145            - description: GPU MEMNOC clock
146            - description: GPU AHB clock
147            - description: GPU HUB CX clock
148        clock-names:
149          items:
150            - const: gmu
151            - const: cxo
152            - const: axi
153            - const: memnoc
154            - const: ahb
155            - const: hub
156
157  - if:
158      properties:
159        compatible:
160          contains:
161            enum:
162              - qcom,adreno-gmu-635.0
163              - qcom,adreno-gmu-660.1
164              - qcom,adreno-gmu-663.0
165    then:
166      properties:
167        reg:
168          items:
169            - description: Core GMU registers
170            - description: Resource controller registers
171            - description: GMU PDC registers
172        reg-names:
173          items:
174            - const: gmu
175            - const: rscc
176            - const: gmu_pdc
177        clocks:
178          items:
179            - description: GMU clock
180            - description: GPU CX clock
181            - description: GPU AXI clock
182            - description: GPU MEMNOC clock
183            - description: GPU AHB clock
184            - description: GPU HUB CX clock
185            - description: GPU SMMU vote clock
186        clock-names:
187          items:
188            - const: gmu
189            - const: cxo
190            - const: axi
191            - const: memnoc
192            - const: ahb
193            - const: hub
194            - const: smmu_vote
195
196  - if:
197      properties:
198        compatible:
199          contains:
200            enum:
201              - qcom,adreno-gmu-640.1
202    then:
203      properties:
204        reg:
205          items:
206            - description: Core GMU registers
207            - description: GMU PDC registers
208            - description: GMU PDC sequence registers
209        reg-names:
210          items:
211            - const: gmu
212            - const: gmu_pdc
213            - const: gmu_pdc_seq
214
215  - if:
216      properties:
217        compatible:
218          contains:
219            enum:
220              - qcom,adreno-gmu-650.2
221    then:
222      properties:
223        reg:
224          items:
225            - description: Core GMU registers
226            - description: Resource controller registers
227            - description: GMU PDC registers
228            - description: GMU PDC sequence registers
229        reg-names:
230          items:
231            - const: gmu
232            - const: rscc
233            - const: gmu_pdc
234            - const: gmu_pdc_seq
235
236  - if:
237      properties:
238        compatible:
239          contains:
240            enum:
241              - qcom,adreno-gmu-640.1
242              - qcom,adreno-gmu-650.2
243    then:
244      properties:
245        clocks:
246          items:
247            - description: GPU AHB clock
248            - description: GMU clock
249            - description: GPU CX clock
250            - description: GPU AXI clock
251            - description: GPU MEMNOC clock
252        clock-names:
253          items:
254            - const: ahb
255            - const: gmu
256            - const: cxo
257            - const: axi
258            - const: memnoc
259
260  - if:
261      properties:
262        compatible:
263          contains:
264            enum:
265              - qcom,adreno-gmu-722.0
266              - qcom,adreno-gmu-730.1
267              - qcom,adreno-gmu-740.1
268              - qcom,adreno-gmu-750.1
269              - qcom,adreno-gmu-x185.1
270    then:
271      properties:
272        reg:
273          items:
274            - description: Core GMU registers
275            - description: Resource controller registers
276            - description: GMU PDC registers
277        reg-names:
278          items:
279            - const: gmu
280            - const: rscc
281            - const: gmu_pdc
282        clocks:
283          items:
284            - description: GPU AHB clock
285            - description: GMU clock
286            - description: GPU CX clock
287            - description: GPU AXI clock
288            - description: GPU MEMNOC clock
289            - description: GMU HUB clock
290            - description: GPUSS DEMET clock
291        clock-names:
292          items:
293            - const: ahb
294            - const: gmu
295            - const: cxo
296            - const: axi
297            - const: memnoc
298            - const: hub
299            - const: demet
300
301      required:
302        - qcom,qmp
303
304  - if:
305      properties:
306        compatible:
307          contains:
308            enum:
309              - qcom,adreno-gmu-810.0
310              - qcom,adreno-gmu-830.1
311    then:
312      properties:
313        reg:
314          items:
315            - description: Core GMU registers
316        reg-names:
317          items:
318            - const: gmu
319        clocks:
320          items:
321            - description: GPU AHB clock
322            - description: GMU clock
323            - description: GPU CX clock
324            - description: GPU AXI clock
325            - description: GPU MEMNOC clock
326            - description: GMU HUB clock
327        clock-names:
328          items:
329            - const: ahb
330            - const: gmu
331            - const: cxo
332            - const: axi
333            - const: memnoc
334            - const: hub
335
336  - if:
337      properties:
338        compatible:
339          contains:
340            const: qcom,adreno-gmu-840.1
341    then:
342      properties:
343        reg:
344          items:
345            - description: Core GMU registers
346        reg-names:
347          items:
348            - const: gmu
349        clocks:
350          items:
351            - description: GPU AHB clock
352            - description: GMU clock
353            - description: GPU CX clock
354            - description: GPU MEMNOC clock
355            - description: GMU HUB clock
356        clock-names:
357          items:
358            - const: ahb
359            - const: gmu
360            - const: cxo
361            - const: memnoc
362            - const: hub
363
364  - if:
365      properties:
366        compatible:
367          contains:
368            enum:
369              - qcom,adreno-gmu-x285.0
370              - qcom,adreno-gmu-x290.1
371    then:
372      properties:
373        reg:
374          items:
375            - description: Core GMU registers
376        reg-names:
377          items:
378            - const: gmu
379        clocks:
380          items:
381            - description: GPU AHB clock
382            - description: GMU clock
383            - description: GPU CX clock
384            - description: GPU MEMNOC clock
385            - description: GMU HUB clock
386            - description: GMU RSCC HUB clock
387        clock-names:
388          items:
389            - const: ahb
390            - const: gmu
391            - const: cxo
392            - const: memnoc
393            - const: hub
394            - const: rscc
395
396  - if:
397      properties:
398        compatible:
399          contains:
400            const: qcom,adreno-gmu-wrapper
401    then:
402      properties:
403        reg:
404          items:
405            - description: GMU wrapper register space
406        reg-names:
407          items:
408            - const: gmu
409    else:
410      required:
411        - clocks
412        - clock-names
413        - interrupts
414        - interrupt-names
415        - iommus
416        - operating-points-v2
417
418examples:
419  - |
420    #include <dt-bindings/clock/qcom,gpucc-sdm845.h>
421    #include <dt-bindings/clock/qcom,gcc-sdm845.h>
422    #include <dt-bindings/interrupt-controller/irq.h>
423    #include <dt-bindings/interrupt-controller/arm-gic.h>
424
425    gmu: gmu@506a000 {
426        compatible = "qcom,adreno-gmu-630.2", "qcom,adreno-gmu";
427
428        reg = <0x506a000 0x30000>,
429              <0xb280000 0x10000>,
430              <0xb480000 0x10000>;
431        reg-names = "gmu", "gmu_pdc", "gmu_pdc_seq";
432
433        clocks = <&gpucc GPU_CC_CX_GMU_CLK>,
434                 <&gpucc GPU_CC_CXO_CLK>,
435                 <&gcc GCC_DDRSS_GPU_AXI_CLK>,
436                 <&gcc GCC_GPU_MEMNOC_GFX_CLK>;
437        clock-names = "gmu", "cxo", "axi", "memnoc";
438
439        interrupts = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
440                     <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
441        interrupt-names = "hfi", "gmu";
442
443        power-domains = <&gpucc GPU_CX_GDSC>,
444                        <&gpucc GPU_GX_GDSC>;
445        power-domain-names = "cx", "gx";
446
447        iommus = <&adreno_smmu 5>;
448        operating-points-v2 = <&gmu_opp_table>;
449    };
450
451    gmu_wrapper: gmu@596a000 {
452        compatible = "qcom,adreno-gmu-wrapper";
453        reg = <0x0596a000 0x30000>;
454        reg-names = "gmu";
455        power-domains = <&gpucc GPU_CX_GDSC>,
456                        <&gpucc GPU_GX_GDSC>;
457        power-domain-names = "cx", "gx";
458    };
459