xref: /linux/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml (revision db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb)
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:
17      - items:
18          - enum:
19              - samsung,exynos5250-mali
20          - const: arm,mali-t604
21      - items:
22          - enum:
23              - samsung,exynos5420-mali
24          - const: arm,mali-t628
25      - items:
26          - enum:
27              - allwinner,sun50i-h6-mali
28          - const: arm,mali-t720
29      - items:
30          - enum:
31              - amlogic,meson-gxm-mali
32              - realtek,rtd1295-mali
33          - const: arm,mali-t820
34      - items:
35          - enum:
36              - arm,juno-mali
37          - const: arm,mali-t624
38      - items:
39          - enum:
40              - rockchip,rk3288-mali
41              - samsung,exynos5433-mali
42          - const: arm,mali-t760
43      - items:
44          - enum:
45              - samsung,exynos7-mali
46          - const: samsung,exynos5433-mali
47          - const: arm,mali-t760
48      - items:
49          - enum:
50              - samsung,exynos7870-mali
51          - const: arm,mali-t830
52      - items:
53          - enum:
54              - rockchip,rk3399-mali
55          - const: arm,mali-t860
56      - items:
57          - enum:
58              - samsung,exynos8890-mali
59          - const: arm,mali-t880
60
61  reg:
62    maxItems: 1
63
64  interrupts:
65    items:
66      - description: Job interrupt
67      - description: MMU interrupt
68      - description: GPU interrupt
69
70  interrupt-names:
71    items:
72      - const: job
73      - const: mmu
74      - const: gpu
75
76  clocks:
77    minItems: 1
78    maxItems: 2
79
80  clock-names:
81    minItems: 1
82    items:
83      - const: core
84      - const: bus
85
86  mali-supply: true
87  opp-table:
88    type: object
89
90  power-domains:
91    maxItems: 1
92
93  resets:
94    minItems: 1
95    maxItems: 2
96
97  operating-points-v2: true
98
99  "#cooling-cells":
100    const: 2
101
102  dma-coherent: true
103
104  dynamic-power-coefficient:
105    $ref: /schemas/types.yaml#/definitions/uint32
106    description:
107      A u32 value that represents the running time dynamic
108      power coefficient in units of uW/MHz/V^2. The
109      coefficient can either be calculated from power
110      measurements or derived by analysis.
111
112      The dynamic power consumption of the GPU is
113      proportional to the square of the Voltage (V) and
114      the clock frequency (f). The coefficient is used to
115      calculate the dynamic power as below -
116
117      Pdyn = dynamic-power-coefficient * V^2 * f
118
119      where voltage is in V, frequency is in MHz.
120
121required:
122  - compatible
123  - reg
124  - interrupts
125  - interrupt-names
126  - clocks
127
128additionalProperties: false
129
130allOf:
131  - if:
132      properties:
133        compatible:
134          contains:
135            const: allwinner,sun50i-h6-mali
136    then:
137      properties:
138        clocks:
139          minItems: 2
140      required:
141        - clock-names
142        - resets
143  - if:
144      properties:
145        compatible:
146          contains:
147            const: amlogic,meson-gxm-mali
148    then:
149      properties:
150        resets:
151          minItems: 2
152      required:
153        - resets
154
155examples:
156  - |
157    #include <dt-bindings/interrupt-controller/irq.h>
158    #include <dt-bindings/interrupt-controller/arm-gic.h>
159
160    gpu@ffa30000 {
161      compatible = "rockchip,rk3288-mali", "arm,mali-t760";
162      reg = <0xffa30000 0x10000>;
163      interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
164             <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
165             <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
166      interrupt-names = "job", "mmu", "gpu";
167      clocks = <&cru 0>;
168      mali-supply = <&vdd_gpu>;
169      operating-points-v2 = <&gpu_opp_table>;
170      power-domains = <&power 0>;
171      #cooling-cells = <2>;
172    };
173
174    gpu_opp_table: opp-table {
175      compatible = "operating-points-v2";
176
177      opp-533000000 {
178        opp-hz = /bits/ 64 <533000000>;
179        opp-microvolt = <1250000>;
180      };
181      opp-450000000 {
182        opp-hz = /bits/ 64 <450000000>;
183        opp-microvolt = <1150000>;
184      };
185      opp-400000000 {
186        opp-hz = /bits/ 64 <400000000>;
187        opp-microvolt = <1125000>;
188      };
189      opp-350000000 {
190        opp-hz = /bits/ 64 <350000000>;
191        opp-microvolt = <1075000>;
192      };
193      opp-266000000 {
194        opp-hz = /bits/ 64 <266000000>;
195        opp-microvolt = <1025000>;
196      };
197      opp-160000000 {
198        opp-hz = /bits/ 64 <160000000>;
199        opp-microvolt = <925000>;
200      };
201      opp-100000000 {
202        opp-hz = /bits/ 64 <100000000>;
203        opp-microvolt = <912500>;
204      };
205    };
206
207...
208