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             - rockchip,rk3288-mali
37             - samsung,exynos5433-mali
38          - const: arm,mali-t760
39      - items:
40          - enum:
41             - rockchip,rk3399-mali
42          - const: arm,mali-t860
43
44          # "arm,mali-t624"
45          # "arm,mali-t830"
46          # "arm,mali-t880"
47
48  reg:
49    maxItems: 1
50
51  interrupts:
52    items:
53      - description: Job interrupt
54      - description: MMU interrupt
55      - description: GPU interrupt
56
57  interrupt-names:
58    items:
59      - const: job
60      - const: mmu
61      - const: gpu
62
63  clocks:
64    minItems: 1
65    maxItems: 2
66
67  clock-names:
68    minItems: 1
69    items:
70      - const: core
71      - const: bus
72
73  mali-supply: true
74
75  resets:
76    minItems: 1
77    maxItems: 2
78
79  operating-points-v2: true
80
81  "#cooling-cells":
82    const: 2
83
84required:
85  - compatible
86  - reg
87  - interrupts
88  - interrupt-names
89  - clocks
90
91allOf:
92  - if:
93      properties:
94        compatible:
95          contains:
96            const: allwinner,sun50i-h6-mali
97    then:
98      properties:
99        clocks:
100          minItems: 2
101      required:
102        - clock-names
103        - resets
104  - if:
105      properties:
106        compatible:
107          contains:
108            const: amlogic,meson-gxm-mali
109    then:
110      properties:
111        resets:
112          minItems: 2
113      required:
114        - resets
115
116examples:
117  - |
118    #include <dt-bindings/interrupt-controller/irq.h>
119    #include <dt-bindings/interrupt-controller/arm-gic.h>
120
121    gpu@ffa30000 {
122      compatible = "rockchip,rk3288-mali", "arm,mali-t760";
123      reg = <0xffa30000 0x10000>;
124      interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
125             <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
126             <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
127      interrupt-names = "job", "mmu", "gpu";
128      clocks = <&cru 0>;
129      mali-supply = <&vdd_gpu>;
130      operating-points-v2 = <&gpu_opp_table>;
131      power-domains = <&power 0>;
132      #cooling-cells = <2>;
133    };
134
135    gpu_opp_table: opp_table0 {
136      compatible = "operating-points-v2";
137
138      opp@533000000 {
139        opp-hz = /bits/ 64 <533000000>;
140        opp-microvolt = <1250000>;
141      };
142      opp@450000000 {
143        opp-hz = /bits/ 64 <450000000>;
144        opp-microvolt = <1150000>;
145      };
146      opp@400000000 {
147        opp-hz = /bits/ 64 <400000000>;
148        opp-microvolt = <1125000>;
149      };
150      opp@350000000 {
151        opp-hz = /bits/ 64 <350000000>;
152        opp-microvolt = <1075000>;
153      };
154      opp@266000000 {
155        opp-hz = /bits/ 64 <266000000>;
156        opp-microvolt = <1025000>;
157      };
158      opp@160000000 {
159        opp-hz = /bits/ 64 <160000000>;
160        opp-microvolt = <925000>;
161      };
162      opp@100000000 {
163        opp-hz = /bits/ 64 <100000000>;
164        opp-microvolt = <912500>;
165      };
166    };
167
168...
169