xref: /linux/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml (revision f1775c26e8b8809d922a29bb5e3df6ea503d2fa0)
1842b4aecSRob Herring# SPDX-License-Identifier: GPL-2.0-only
2842b4aecSRob Herring%YAML 1.2
3842b4aecSRob Herring---
4842b4aecSRob Herring$id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml#
5842b4aecSRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
6842b4aecSRob Herring
7842b4aecSRob Herringtitle: ARM Mali Bifrost GPU
8842b4aecSRob Herring
9842b4aecSRob Herringmaintainers:
10842b4aecSRob Herring  - Rob Herring <robh@kernel.org>
11842b4aecSRob Herring
12842b4aecSRob Herringproperties:
13842b4aecSRob Herring  $nodename:
14842b4aecSRob Herring    pattern: '^gpu@[a-f0-9]+$'
15842b4aecSRob Herring
16842b4aecSRob Herring  compatible:
17842b4aecSRob Herring    items:
18842b4aecSRob Herring      - enum:
19842b4aecSRob Herring          - amlogic,meson-g12a-mali
20a7a596cdSNicolas Boichat          - mediatek,mt8183-mali
210211b71cSAndreas Färber          - realtek,rtd1619-mali
22570df0a5SBiju Das          - renesas,r9a07g044-mali
23ad848dd5SHeiko Stuebner          - rockchip,px30-mali
2451ca8fcbSEzequiel Garcia          - rockchip,rk3568-mali
25842b4aecSRob Herring      - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
26842b4aecSRob Herring
27842b4aecSRob Herring  reg:
28842b4aecSRob Herring    maxItems: 1
29842b4aecSRob Herring
30842b4aecSRob Herring  interrupts:
31570df0a5SBiju Das    minItems: 3
32842b4aecSRob Herring    items:
33842b4aecSRob Herring      - description: Job interrupt
34842b4aecSRob Herring      - description: MMU interrupt
35842b4aecSRob Herring      - description: GPU interrupt
36570df0a5SBiju Das      - description: Event interrupt
37842b4aecSRob Herring
38842b4aecSRob Herring  interrupt-names:
39570df0a5SBiju Das    minItems: 3
40842b4aecSRob Herring    items:
41842b4aecSRob Herring      - const: job
42842b4aecSRob Herring      - const: mmu
43842b4aecSRob Herring      - const: gpu
44570df0a5SBiju Das      - const: event
45842b4aecSRob Herring
46842b4aecSRob Herring  clocks:
47570df0a5SBiju Das    minItems: 1
48570df0a5SBiju Das    maxItems: 3
49570df0a5SBiju Das
50570df0a5SBiju Das  clock-names: true
51842b4aecSRob Herring
52f3dde260SRob Herring  mali-supply: true
53842b4aecSRob Herring
54a7a596cdSNicolas Boichat  sram-supply: true
55a7a596cdSNicolas Boichat
56842b4aecSRob Herring  operating-points-v2: true
57842b4aecSRob Herring
582c905f6cSJohan Jonker  power-domains:
59a7a596cdSNicolas Boichat    minItems: 1
60a7a596cdSNicolas Boichat    maxItems: 3
612c905f6cSJohan Jonker
620d9a302dSRob Herring  resets:
63570df0a5SBiju Das    minItems: 1
64570df0a5SBiju Das    maxItems: 3
65570df0a5SBiju Das
66570df0a5SBiju Das  reset-names: true
670d9a302dSRob Herring
682c905f6cSJohan Jonker  "#cooling-cells":
692c905f6cSJohan Jonker    const: 2
702c905f6cSJohan Jonker
71e33dc2f3SLukasz Luba  dynamic-power-coefficient:
72e33dc2f3SLukasz Luba    $ref: '/schemas/types.yaml#/definitions/uint32'
73e33dc2f3SLukasz Luba    description:
74e33dc2f3SLukasz Luba      A u32 value that represents the running time dynamic
75e33dc2f3SLukasz Luba      power coefficient in units of uW/MHz/V^2. The
76e33dc2f3SLukasz Luba      coefficient can either be calculated from power
77e33dc2f3SLukasz Luba      measurements or derived by analysis.
78e33dc2f3SLukasz Luba
79e33dc2f3SLukasz Luba      The dynamic power consumption of the GPU is
80e33dc2f3SLukasz Luba      proportional to the square of the Voltage (V) and
81e33dc2f3SLukasz Luba      the clock frequency (f). The coefficient is used to
82e33dc2f3SLukasz Luba      calculate the dynamic power as below -
83e33dc2f3SLukasz Luba
84e33dc2f3SLukasz Luba      Pdyn = dynamic-power-coefficient * V^2 * f
85e33dc2f3SLukasz Luba
86e33dc2f3SLukasz Luba      where voltage is in V, frequency is in MHz.
87e33dc2f3SLukasz Luba
883f9a3345SKevin Hilman  dma-coherent: true
893f9a3345SKevin Hilman
90842b4aecSRob Herringrequired:
91842b4aecSRob Herring  - compatible
92842b4aecSRob Herring  - reg
93842b4aecSRob Herring  - interrupts
94842b4aecSRob Herring  - interrupt-names
95842b4aecSRob Herring  - clocks
96842b4aecSRob Herring
977f464532SRob HerringadditionalProperties: false
987f464532SRob Herring
99842b4aecSRob HerringallOf:
100842b4aecSRob Herring  - if:
101842b4aecSRob Herring      properties:
102842b4aecSRob Herring        compatible:
103842b4aecSRob Herring          contains:
104842b4aecSRob Herring            const: amlogic,meson-g12a-mali
105842b4aecSRob Herring    then:
106842b4aecSRob Herring      required:
107842b4aecSRob Herring        - resets
108a7a596cdSNicolas Boichat  - if:
109a7a596cdSNicolas Boichat      properties:
110a7a596cdSNicolas Boichat        compatible:
111a7a596cdSNicolas Boichat          contains:
112570df0a5SBiju Das            const: renesas,r9a07g044-mali
113570df0a5SBiju Das    then:
114570df0a5SBiju Das      properties:
115570df0a5SBiju Das        interrupts:
116570df0a5SBiju Das          minItems: 4
117570df0a5SBiju Das        interrupt-names:
118570df0a5SBiju Das          minItems: 4
119570df0a5SBiju Das        clocks:
120570df0a5SBiju Das          minItems: 3
121570df0a5SBiju Das        clock-names:
122570df0a5SBiju Das          items:
123570df0a5SBiju Das            - const: gpu
124570df0a5SBiju Das            - const: bus
125570df0a5SBiju Das            - const: bus_ace
126570df0a5SBiju Das        resets:
127570df0a5SBiju Das          minItems: 3
128570df0a5SBiju Das        reset-names:
129570df0a5SBiju Das          items:
130570df0a5SBiju Das            - const: rst
131570df0a5SBiju Das            - const: axi_rst
132570df0a5SBiju Das            - const: ace_rst
133570df0a5SBiju Das      required:
134570df0a5SBiju Das        - clock-names
135570df0a5SBiju Das        - power-domains
136570df0a5SBiju Das        - resets
137570df0a5SBiju Das        - reset-names
138570df0a5SBiju Das  - if:
139570df0a5SBiju Das      properties:
140570df0a5SBiju Das        compatible:
141570df0a5SBiju Das          contains:
142a7a596cdSNicolas Boichat            const: mediatek,mt8183-mali
143a7a596cdSNicolas Boichat    then:
144a7a596cdSNicolas Boichat      properties:
145a7a596cdSNicolas Boichat        power-domains:
146a7a596cdSNicolas Boichat          minItems: 3
147a7a596cdSNicolas Boichat        power-domain-names:
148a7a596cdSNicolas Boichat          items:
149a7a596cdSNicolas Boichat            - const: core0
150a7a596cdSNicolas Boichat            - const: core1
151a7a596cdSNicolas Boichat            - const: core2
152a7a596cdSNicolas Boichat
153a7a596cdSNicolas Boichat      required:
154a7a596cdSNicolas Boichat        - sram-supply
155a7a596cdSNicolas Boichat        - power-domains
156a7a596cdSNicolas Boichat        - power-domain-names
157a7a596cdSNicolas Boichat    else:
158a7a596cdSNicolas Boichat      properties:
159a7a596cdSNicolas Boichat        power-domains:
160a7a596cdSNicolas Boichat          maxItems: 1
161a7a596cdSNicolas Boichat        sram-supply: false
162*f1775c26SAlex Bee  - if:
163*f1775c26SAlex Bee      properties:
164*f1775c26SAlex Bee        compatible:
165*f1775c26SAlex Bee          contains:
166*f1775c26SAlex Bee            const: rockchip,rk3568-mali
167*f1775c26SAlex Bee    then:
168*f1775c26SAlex Bee      properties:
169*f1775c26SAlex Bee        clocks:
170*f1775c26SAlex Bee          minItems: 2
171*f1775c26SAlex Bee        clock-names:
172*f1775c26SAlex Bee          items:
173*f1775c26SAlex Bee            - const: gpu
174*f1775c26SAlex Bee            - const: bus
175*f1775c26SAlex Bee      required:
176*f1775c26SAlex Bee        - clock-names
177842b4aecSRob Herring
178842b4aecSRob Herringexamples:
179842b4aecSRob Herring  - |
180842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/irq.h>
181842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/arm-gic.h>
182842b4aecSRob Herring
183842b4aecSRob Herring    gpu@ffe40000 {
184842b4aecSRob Herring      compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
185842b4aecSRob Herring      reg = <0xffe40000 0x10000>;
186842b4aecSRob Herring      interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
187842b4aecSRob Herring             <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
188842b4aecSRob Herring             <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
189842b4aecSRob Herring      interrupt-names = "job", "mmu", "gpu";
190842b4aecSRob Herring      clocks = <&clk 1>;
191842b4aecSRob Herring      mali-supply = <&vdd_gpu>;
192842b4aecSRob Herring      operating-points-v2 = <&gpu_opp_table>;
193842b4aecSRob Herring      resets = <&reset 0>, <&reset 1>;
194842b4aecSRob Herring    };
195842b4aecSRob Herring
19629fc7695SRob Herring    gpu_opp_table: opp-table {
197842b4aecSRob Herring      compatible = "operating-points-v2";
198842b4aecSRob Herring
19951a21e0eSRob Herring      opp-533000000 {
200842b4aecSRob Herring        opp-hz = /bits/ 64 <533000000>;
201842b4aecSRob Herring        opp-microvolt = <1250000>;
202842b4aecSRob Herring      };
20351a21e0eSRob Herring      opp-450000000 {
204842b4aecSRob Herring        opp-hz = /bits/ 64 <450000000>;
205842b4aecSRob Herring        opp-microvolt = <1150000>;
206842b4aecSRob Herring      };
20751a21e0eSRob Herring      opp-400000000 {
208842b4aecSRob Herring        opp-hz = /bits/ 64 <400000000>;
209842b4aecSRob Herring        opp-microvolt = <1125000>;
210842b4aecSRob Herring      };
21151a21e0eSRob Herring      opp-350000000 {
212842b4aecSRob Herring        opp-hz = /bits/ 64 <350000000>;
213842b4aecSRob Herring        opp-microvolt = <1075000>;
214842b4aecSRob Herring      };
21551a21e0eSRob Herring      opp-266000000 {
216842b4aecSRob Herring        opp-hz = /bits/ 64 <266000000>;
217842b4aecSRob Herring        opp-microvolt = <1025000>;
218842b4aecSRob Herring      };
21951a21e0eSRob Herring      opp-160000000 {
220842b4aecSRob Herring        opp-hz = /bits/ 64 <160000000>;
221842b4aecSRob Herring        opp-microvolt = <925000>;
222842b4aecSRob Herring      };
22351a21e0eSRob Herring      opp-100000000 {
224842b4aecSRob Herring        opp-hz = /bits/ 64 <100000000>;
225842b4aecSRob Herring        opp-microvolt = <912500>;
226842b4aecSRob Herring      };
227842b4aecSRob Herring    };
228842b4aecSRob Herring
229842b4aecSRob Herring...
230