Merge branch 'omap-for-v5.14/ti-sysc' into omap-for-v5.15/ti-sysc
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / gpu / arm,mali-bifrost.yaml
1 # SPDX-License-Identifier: GPL-2.0-only
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: ARM Mali Bifrost GPU
8
9 maintainers:
10   - Rob Herring <robh@kernel.org>
11
12 properties:
13   $nodename:
14     pattern: '^gpu@[a-f0-9]+$'
15
16   compatible:
17     items:
18       - enum:
19           - amlogic,meson-g12a-mali
20           - mediatek,mt8183-mali
21           - realtek,rtd1619-mali
22           - rockchip,px30-mali
23       - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
24
25   reg:
26     maxItems: 1
27
28   interrupts:
29     items:
30       - description: Job interrupt
31       - description: MMU interrupt
32       - description: GPU interrupt
33
34   interrupt-names:
35     items:
36       - const: job
37       - const: mmu
38       - const: gpu
39
40   clocks:
41     maxItems: 1
42
43   mali-supply: true
44
45   sram-supply: true
46
47   operating-points-v2: true
48
49   power-domains:
50     minItems: 1
51     maxItems: 3
52
53   resets:
54     maxItems: 2
55
56   "#cooling-cells":
57     const: 2
58
59   dynamic-power-coefficient:
60     $ref: '/schemas/types.yaml#/definitions/uint32'
61     description:
62       A u32 value that represents the running time dynamic
63       power coefficient in units of uW/MHz/V^2. The
64       coefficient can either be calculated from power
65       measurements or derived by analysis.
66
67       The dynamic power consumption of the GPU is
68       proportional to the square of the Voltage (V) and
69       the clock frequency (f). The coefficient is used to
70       calculate the dynamic power as below -
71
72       Pdyn = dynamic-power-coefficient * V^2 * f
73
74       where voltage is in V, frequency is in MHz.
75
76   dma-coherent: true
77
78 required:
79   - compatible
80   - reg
81   - interrupts
82   - interrupt-names
83   - clocks
84
85 additionalProperties: false
86
87 allOf:
88   - if:
89       properties:
90         compatible:
91           contains:
92             const: amlogic,meson-g12a-mali
93     then:
94       required:
95         - resets
96   - if:
97       properties:
98         compatible:
99           contains:
100             const: mediatek,mt8183-mali
101     then:
102       properties:
103         power-domains:
104           minItems: 3
105         power-domain-names:
106           items:
107             - const: core0
108             - const: core1
109             - const: core2
110
111       required:
112         - sram-supply
113         - power-domains
114         - power-domain-names
115     else:
116       properties:
117         power-domains:
118           maxItems: 1
119         sram-supply: false
120
121 examples:
122   - |
123     #include <dt-bindings/interrupt-controller/irq.h>
124     #include <dt-bindings/interrupt-controller/arm-gic.h>
125
126     gpu@ffe40000 {
127       compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
128       reg = <0xffe40000 0x10000>;
129       interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
130              <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
131              <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
132       interrupt-names = "job", "mmu", "gpu";
133       clocks = <&clk 1>;
134       mali-supply = <&vdd_gpu>;
135       operating-points-v2 = <&gpu_opp_table>;
136       resets = <&reset 0>, <&reset 1>;
137     };
138
139     gpu_opp_table: opp_table0 {
140       compatible = "operating-points-v2";
141
142       opp-533000000 {
143         opp-hz = /bits/ 64 <533000000>;
144         opp-microvolt = <1250000>;
145       };
146       opp-450000000 {
147         opp-hz = /bits/ 64 <450000000>;
148         opp-microvolt = <1150000>;
149       };
150       opp-400000000 {
151         opp-hz = /bits/ 64 <400000000>;
152         opp-microvolt = <1125000>;
153       };
154       opp-350000000 {
155         opp-hz = /bits/ 64 <350000000>;
156         opp-microvolt = <1075000>;
157       };
158       opp-266000000 {
159         opp-hz = /bits/ 64 <266000000>;
160         opp-microvolt = <1025000>;
161       };
162       opp-160000000 {
163         opp-hz = /bits/ 64 <160000000>;
164         opp-microvolt = <925000>;
165       };
166       opp-100000000 {
167         opp-hz = /bits/ 64 <100000000>;
168         opp-microvolt = <912500>;
169       };
170     };
171
172 ...