Debian Codegraph @

Documentation/devicetree/bindings/display/msm/gpu.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4
5 $id: http://devicetree.org/schemas/display/msm/gpu.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Adreno or Snapdragon GPUs
9
10 maintainers:
11 - Rob Clark <[email protected]>
12
13 # dtschema does not select nodes based on pattern+const, so add custom select
14 # as a work-around:
15 select:
16 properties:
17 compatible:
18 contains:
19 enum:
20 - qcom,adreno
21 - amd,imageon
22 required:
23 - compatible
24
25 properties:
26 compatible:
27 oneOf:
28 - description: |
29 The driver is parsing the compat string for Adreno to
30 figure out the chip-id.
31 items:
32 - pattern: '^qcom,adreno-[0-9a-f]{8}$'
33 - const: qcom,adreno
34 - description: |
35 The driver is parsing the compat string for Adreno to
36 figure out the gpu-id and patch level.
37 items:
38 - pattern: '^qcom,adreno-[3-7][0-9][0-9]\.[0-9]+$'
39 - const: qcom,adreno
40 - description: |
41 The driver is parsing the compat string for Imageon to
42 figure out the gpu-id and patch level.
43 items:
44 - pattern: '^amd,imageon-200\.[0-1]$'
45 - const: amd,imageon
46
47 clocks:
48 minItems: 1
49 maxItems: 7
50
51 clock-names:
52 minItems: 1
53 maxItems: 7
54
55 reg:
56 minItems: 1
57 maxItems: 3
58
59 reg-names:
60 minItems: 1
61 items:
62 - const: kgsl_3d0_reg_memory
63 - const: cx_mem
64 - const: cx_dbgc
65
66 interrupts:
67 maxItems: 1
68
69 interrupt-names:
70 maxItems: 1
71
72 interconnects:
73 minItems: 1
74 maxItems: 2
75
76 interconnect-names:
77 minItems: 1
78 items:
79 - const: gfx-mem
80 - const: ocmem
81
82 iommus:
83 minItems: 1
84 maxItems: 64
85
86 sram:
87 $ref: /schemas/types.yaml#/definitions/phandle-array
88 minItems: 1
89 maxItems: 4
90 items:
91 maxItems: 1
92 description: |
93 phandles to one or more reserved on-chip SRAM regions.
94 phandle to the On Chip Memory (OCMEM) that's present on some a3xx and
95 a4xx Snapdragon SoCs. See
96 Documentation/devicetree/bindings/sram/qcom,ocmem.yaml
97
98 operating-points-v2: true
99 opp-table:
100 type: object
101
102 power-domains:
103 maxItems: 1
104
105 zap-shader:
106 type: object
107 additionalProperties: false
108 description: |
109 For a5xx and a6xx devices this node contains a memory-region that
110 points to reserved memory to store the zap shader that can be used to
111 help bring the GPU out of secure mode.
112 properties:
113 memory-region:
114 maxItems: 1
115
116 firmware-name:
117 description: |
118 Default name of the firmware to load to the remote processor.
119
120 "#cooling-cells":
121 const: 2
122
123 nvmem-cell-names:
124 maxItems: 1
125
126 nvmem-cells:
127 description: efuse registers
128 maxItems: 1
129
130 qcom,gmu:
131 $ref: /schemas/types.yaml#/definitions/phandle
132 description: |
133 For GMU attached devices a phandle to the GMU device that will
134 control the power for the GPU.
135
136 required:
137 - compatible
138 - reg
139 - interrupts
140
141 additionalProperties: false
142
143 allOf:
144 - if:
145 properties:
146 compatible:
147 contains:
148 oneOf:
149 - pattern: '^qcom,adreno-305\.[0-9]+$'
150 - pattern: '^qcom,adreno-330\.[0-9]+$'
151 then:
152 properties:
153 clocks:
154 minItems: 3
155 maxItems: 3
156 clock-names:
157 items:
158 - const: core
159 description: GPU Core clock
160 - const: iface
161 description: GPU Interface clock
162 - const: mem_iface
163 description: GPU Memory Interface clock
164
165 - if:
166 properties:
167 compatible:
168 contains:
169 pattern: '^qcom,adreno-306\.[0-9]+$'
170 then:
171 properties:
172 clocks:
173 minItems: 5
174 maxItems: 6
175 clock-names:
176 oneOf:
177 - items:
178 - const: core
179 description: GPU Core clock
180 - const: iface
181 description: GPU Interface clock
182 - const: mem_iface
183 description: GPU Memory Interface clock
184 - const: alt_mem_iface
185 description: GPU Alternative Memory Interface clock
186 - const: gfx3d
187 description: GPU 3D engine clock
188 - items:
189 - const: core
190 description: GPU Core clock
191 - const: iface
192 description: GPU Interface clock
193 - const: mem
194 description: GPU Memory clock
195 - const: mem_iface
196 description: GPU Memory Interface clock
197 - const: alt_mem_iface
198 description: GPU Alternative Memory Interface clock
199 - const: gfx3d
200 description: GPU 3D engine clock
201
202 - if:
203 properties:
204 compatible:
205 contains:
206 pattern: '^qcom,adreno-320\.[0-9]+$'
207 then:
208 properties:
209 clocks:
210 minItems: 4
211 maxItems: 4
212 clock-names:
213 items:
214 - const: core
215 description: GPU Core clock
216 - const: iface
217 description: GPU Interface clock
218 - const: mem
219 description: GPU Memory clock
220 - const: mem_iface
221 description: GPU Memory Interface clock
222
223 - if:
224 properties:
225 compatible:
226 contains:
227 pattern: '^qcom,adreno-405\.[0-9]+$'
228 then:
229 properties:
230 clocks:
231 minItems: 7
232 maxItems: 7
233 clock-names:
234 items:
235 - const: core
236 description: GPU Core clock
237 - const: iface
238 description: GPU Interface clock
239 - const: mem
240 description: GPU Memory clock
241 - const: mem_iface
242 description: GPU Memory Interface clock
243 - const: alt_mem_iface
244 description: GPU Alternative Memory Interface clock
245 - const: gfx3d
246 description: GPU 3D engine clock
247 - const: rbbmtimer
248 description: GPU RBBM Timer for Adreno 5xx series
249
250 - if:
251 properties:
252 compatible:
253 contains:
254 pattern: '^qcom,adreno-50[56]\.[0-9]+$'
255 then:
256 properties:
257 clocks:
258 minItems: 6
259 maxItems: 6
260 clock-names:
261 items:
262 - const: core
263 description: GPU Core clock
264 - const: iface
265 description: GPU Interface clock
266 - const: mem_iface
267 description: GPU Memory Interface clock
268 - const: alt_mem_iface
269 description: GPU Alternative Memory Interface clock
270 - const: rbbmtimer
271 description: GPU RBBM Timer for Adreno 5xx series
272 - const: alwayson
273 description: GPU AON clock
274
275 - if:
276 properties:
277 compatible:
278 contains:
279 oneOf:
280 - pattern: '^qcom,adreno-508\.[0-9]+$'
281 - pattern: '^qcom,adreno-509\.[0-9]+$'
282 - pattern: '^qcom,adreno-512\.[0-9]+$'
283 - pattern: '^qcom,adreno-540\.[0-9]+$'
284 then:
285 properties:
286 clocks:
287 minItems: 6
288 maxItems: 6
289 clock-names:
290 items:
291 - const: iface
292 description: GPU Interface clock
293 - const: rbbmtimer
294 description: GPU RBBM Timer for Adreno 5xx series
295 - const: mem
296 description: GPU Memory clock
297 - const: mem_iface
298 description: GPU Memory Interface clock
299 - const: rbcpr
300 description: GPU RB Core Power Reduction clock
301 - const: core
302 description: GPU Core clock
303
304 - if:
305 properties:
306 compatible:
307 contains:
308 pattern: '^qcom,adreno-510\.[0-9]+$'
309 then:
310 properties:
311 clocks:
312 minItems: 6
313 maxItems: 6
314 clock-names:
315 items:
316 - const: core
317 description: GPU Core clock
318 - const: iface
319 description: GPU Interface clock
320 - const: mem
321 description: GPU Memory clock
322 - const: mem_iface
323 description: GPU Memory Interface clock
324 - const: rbbmtimer
325 description: GPU RBBM Timer for Adreno 5xx series
326 - const: alwayson
327 description: GPU AON clock
328
329 - if:
330 properties:
331 compatible:
332 contains:
333 pattern: '^qcom,adreno-530\.[0-9]+$'
334 then:
335 properties:
336 clocks:
337 minItems: 5
338 maxItems: 5
339 clock-names:
340 items:
341 - const: core
342 description: GPU Core clock
343 - const: iface
344 description: GPU Interface clock
345 - const: rbbmtimer
346 description: GPU RBBM Timer for Adreno 5xx series
347 - const: mem
348 description: GPU Memory clock
349 - const: mem_iface
350 description: GPU Memory Interface clock
351
352 - if:
353 properties:
354 compatible:
355 contains:
356 enum:
357 - qcom,adreno-610.0
358 - qcom,adreno-619.1
359 - qcom,adreno-07000200
360 then:
361 properties:
362 clocks:
363 minItems: 6
364 maxItems: 6
365
366 clock-names:
367 items:
368 - const: core
369 description: GPU Core clock
370 - const: iface
371 description: GPU Interface clock
372 - const: mem_iface
373 description: GPU Memory Interface clock
374 - const: alt_mem_iface
375 description: GPU Alternative Memory Interface clock
376 - const: gmu
377 description: CX GMU clock
378 - const: xo
379 description: GPUCC clocksource clock
380
381 required:
382 - clocks
383 - clock-names
384
385 - if:
386 properties:
387 compatible:
388 contains:
389 const: qcom,adreno-612.0
390 then:
391 properties:
392 clocks:
393 items:
394 - description: GPU Core clock
395
396 clock-names:
397 items:
398 - const: core
399
400 reg:
401 minItems: 3
402 maxItems: 3
403
404 reg-names:
405 items:
406 - const: kgsl_3d0_reg_memory
407 - const: cx_mem
408 - const: cx_dbgc
409
410 required:
411 - clocks
412 - clock-names
413
414 - if:
415 properties:
416 compatible:
417 contains:
418 enum:
419 - qcom,adreno-615.0
420 - qcom,adreno-618.0
421 - qcom,adreno-619.0
422 - qcom,adreno-621.0
423 - qcom,adreno-623.0
424 - qcom,adreno-630.2
425 - qcom,adreno-635.0
426 - qcom,adreno-640.1
427 - qcom,adreno-650.2
428 - qcom,adreno-660.1
429 - qcom,adreno-663.0
430 - qcom,adreno-680.1
431 - qcom,adreno-690.0
432 - qcom,adreno-730.1
433 - qcom,adreno-43030c00
434 - qcom,adreno-43050a01
435 - qcom,adreno-43050c01
436 - qcom,adreno-43051401
437
438 then: # Starting with A6xx, the clocks are usually defined in the GMU node
439 properties:
440 clocks: false
441 clock-names: false
442
443 reg-names:
444 minItems: 1
445 items:
446 - const: kgsl_3d0_reg_memory
447 - const: cx_mem
448 - const: cx_dbgc
449
450 examples:
451 - |
452
453 // Example a3xx/4xx:
454
455 #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
456 #include <dt-bindings/clock/qcom,rpmcc.h>
457 #include <dt-bindings/interrupt-controller/irq.h>
458 #include <dt-bindings/interrupt-controller/arm-gic.h>
459
460 gpu: gpu@fdb00000 {
461 compatible = "qcom,adreno-330.2", "qcom,adreno";
462
463 reg = <0xfdb00000 0x10000>;
464 reg-names = "kgsl_3d0_reg_memory";
465
466 clock-names = "core", "iface", "mem_iface";
467 clocks = <&mmcc OXILI_GFX3D_CLK>,
468 <&mmcc OXILICX_AHB_CLK>,
469 <&mmcc OXILICX_AXI_CLK>;
470
471 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
472 interrupt-names = "kgsl_3d0_irq";
473
474 sram = <&gpu_sram>;
475 power-domains = <&mmcc OXILICX_GDSC>;
476 operating-points-v2 = <&gpu_opp_table>;
477 iommus = <&gpu_iommu 0>;
478 #cooling-cells = <2>;
479 };
480
481 ocmem@fdd00000 {
482 compatible = "qcom,msm8974-ocmem";
483
484 reg = <0xfdd00000 0x2000>,
485 <0xfec00000 0x180000>;
486 reg-names = "ctrl", "mem";
487
488 clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
489 <&mmcc OCMEMCX_OCMEMNOC_CLK>;
490 clock-names = "core", "iface";
491
492 #address-cells = <1>;
493 #size-cells = <1>;
494 ranges = <0 0xfec00000 0x100000>;
495
496 gpu_sram: gpu-sram@0 {
497 reg = <0x0 0x100000>;
498 };
499 };
500 - |
501
502 // Example a6xx (with GMU):
503
504 #include <dt-bindings/clock/qcom,gpucc-sdm845.h>
505 #include <dt-bindings/clock/qcom,gcc-sdm845.h>
506 #include <dt-bindings/power/qcom-rpmpd.h>
507 #include <dt-bindings/interrupt-controller/irq.h>
508 #include <dt-bindings/interrupt-controller/arm-gic.h>
509 #include <dt-bindings/interconnect/qcom,sdm845.h>
510
511 reserved-memory {
512 #address-cells = <2>;
513 #size-cells = <2>;
514
515 zap_shader_region: gpu@8f200000 {
516 compatible = "shared-dma-pool";
517 reg = <0x0 0x90b00000 0x0 0xa00000>;
518 no-map;
519 };
520 };
521
522 gpu@5000000 {
523 compatible = "qcom,adreno-630.2", "qcom,adreno";
524
525 reg = <0x5000000 0x40000>, <0x509e000 0x10>;
526 reg-names = "kgsl_3d0_reg_memory", "cx_mem";
527
528 #cooling-cells = <2>;
529
530 interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
531
532 iommus = <&adreno_smmu 0>;
533
534 operating-points-v2 = <&gpu_opp_table>;
535
536 interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>;
537 interconnect-names = "gfx-mem";
538
539 qcom,gmu = <&gmu>;
540
541 gpu_opp_table: opp-table {
542 compatible = "operating-points-v2";
543
544 opp-430000000 {
545 opp-hz = /bits/ 64 <430000000>;
546 opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
547 opp-peak-kBps = <5412000>;
548 };
549
550 opp-355000000 {
551 opp-hz = /bits/ 64 <355000000>;
552 opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
553 opp-peak-kBps = <3072000>;
554 };
555
556 opp-267000000 {
557 opp-hz = /bits/ 64 <267000000>;
558 opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
559 opp-peak-kBps = <3072000>;
560 };
561
562 opp-180000000 {
563 opp-hz = /bits/ 64 <180000000>;
564 opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
565 opp-peak-kBps = <1804000>;
566 };
567 };
568
569 zap-shader {
570 memory-region = <&zap_shader_region>;
571 firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn";
572 };
573 };