Merge tag 'block-6.1-2022-10-20' of git://git.kernel.dk/linux
[linux-block.git] / Documentation / devicetree / bindings / gpu / arm,mali-midgard.yaml
CommitLineData
553cedf6
RH
1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpu/arm,mali-midgard.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: ARM Mali Midgard GPU
8
9maintainers:
10 - Rob Herring <robh@kernel.org>
11
12properties:
13 $nodename:
14 pattern: '^gpu@[a-f0-9]+$'
15 compatible:
16 oneOf:
59b3d30f
AF
17 - items:
18 - enum:
9f60a65b 19 - samsung,exynos5250-mali
59b3d30f 20 - const: arm,mali-t604
3afd6389
MM
21 - items:
22 - enum:
9f60a65b 23 - samsung,exynos5420-mali
3afd6389 24 - const: arm,mali-t628
553cedf6
RH
25 - items:
26 - enum:
9f60a65b 27 - allwinner,sun50i-h6-mali
553cedf6
RH
28 - const: arm,mali-t720
29 - items:
30 - enum:
9f60a65b
RH
31 - amlogic,meson-gxm-mali
32 - realtek,rtd1295-mali
553cedf6 33 - const: arm,mali-t820
577dd5de
RM
34 - items:
35 - enum:
9f60a65b 36 - arm,juno-mali
577dd5de 37 - const: arm,mali-t624
553cedf6
RH
38 - items:
39 - enum:
9f60a65b
RH
40 - rockchip,rk3288-mali
41 - samsung,exynos5433-mali
553cedf6
RH
42 - const: arm,mali-t760
43 - items:
44 - enum:
9f60a65b 45 - rockchip,rk3399-mali
553cedf6 46 - const: arm,mali-t860
553cedf6 47
553cedf6
RH
48 # "arm,mali-t830"
49 # "arm,mali-t880"
50
51 reg:
52 maxItems: 1
53
54 interrupts:
55 items:
56 - description: Job interrupt
57 - description: MMU interrupt
58 - description: GPU interrupt
59
60 interrupt-names:
61 items:
62 - const: job
63 - const: mmu
64 - const: gpu
65
66 clocks:
67 minItems: 1
68 maxItems: 2
69
70 clock-names:
71 minItems: 1
72 items:
73 - const: core
74 - const: bus
75
f3dde260 76 mali-supply: true
c8fa60b2
KK
77 opp-table:
78 type: object
553cedf6 79
0d9a302d
RH
80 power-domains:
81 maxItems: 1
82
553cedf6
RH
83 resets:
84 minItems: 1
85 maxItems: 2
86
87 operating-points-v2: true
88
89 "#cooling-cells":
90 const: 2
91
17b53ce3
AP
92 dma-coherent: true
93
23dd6845
LL
94 dynamic-power-coefficient:
95 $ref: '/schemas/types.yaml#/definitions/uint32'
96 description:
97 A u32 value that represents the running time dynamic
98 power coefficient in units of uW/MHz/V^2. The
99 coefficient can either be calculated from power
100 measurements or derived by analysis.
101
102 The dynamic power consumption of the GPU is
103 proportional to the square of the Voltage (V) and
104 the clock frequency (f). The coefficient is used to
105 calculate the dynamic power as below -
106
107 Pdyn = dynamic-power-coefficient * V^2 * f
108
109 where voltage is in V, frequency is in MHz.
110
553cedf6
RH
111required:
112 - compatible
113 - reg
114 - interrupts
115 - interrupt-names
116 - clocks
117
7f464532
RH
118additionalProperties: false
119
553cedf6
RH
120allOf:
121 - if:
122 properties:
123 compatible:
124 contains:
125 const: allwinner,sun50i-h6-mali
126 then:
127 properties:
128 clocks:
129 minItems: 2
130 required:
131 - clock-names
132 - resets
133 - if:
134 properties:
135 compatible:
136 contains:
137 const: amlogic,meson-gxm-mali
138 then:
139 properties:
140 resets:
141 minItems: 2
142 required:
143 - resets
144
145examples:
146 - |
147 #include <dt-bindings/interrupt-controller/irq.h>
148 #include <dt-bindings/interrupt-controller/arm-gic.h>
149
150 gpu@ffa30000 {
151 compatible = "rockchip,rk3288-mali", "arm,mali-t760";
152 reg = <0xffa30000 0x10000>;
153 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
154 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
155 <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
156 interrupt-names = "job", "mmu", "gpu";
157 clocks = <&cru 0>;
158 mali-supply = <&vdd_gpu>;
159 operating-points-v2 = <&gpu_opp_table>;
160 power-domains = <&power 0>;
161 #cooling-cells = <2>;
162 };
163
29fc7695 164 gpu_opp_table: opp-table {
553cedf6
RH
165 compatible = "operating-points-v2";
166
51a21e0e 167 opp-533000000 {
553cedf6
RH
168 opp-hz = /bits/ 64 <533000000>;
169 opp-microvolt = <1250000>;
170 };
51a21e0e 171 opp-450000000 {
553cedf6
RH
172 opp-hz = /bits/ 64 <450000000>;
173 opp-microvolt = <1150000>;
174 };
51a21e0e 175 opp-400000000 {
553cedf6
RH
176 opp-hz = /bits/ 64 <400000000>;
177 opp-microvolt = <1125000>;
178 };
51a21e0e 179 opp-350000000 {
553cedf6
RH
180 opp-hz = /bits/ 64 <350000000>;
181 opp-microvolt = <1075000>;
182 };
51a21e0e 183 opp-266000000 {
553cedf6
RH
184 opp-hz = /bits/ 64 <266000000>;
185 opp-microvolt = <1025000>;
186 };
51a21e0e 187 opp-160000000 {
553cedf6
RH
188 opp-hz = /bits/ 64 <160000000>;
189 opp-microvolt = <925000>;
190 };
51a21e0e 191 opp-100000000 {
553cedf6
RH
192 opp-hz = /bits/ 64 <100000000>;
193 opp-microvolt = <912500>;
194 };
195 };
196
197...