xref: /linux/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml (revision 5dc6ce767dc8ba173534fa75c66a9e2a13b969d1)
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
23*5dc6ce76SLad Prabhakar          - renesas,r9a07g054-mali
24ad848dd5SHeiko Stuebner          - rockchip,px30-mali
2551ca8fcbSEzequiel Garcia          - rockchip,rk3568-mali
26842b4aecSRob Herring      - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
27842b4aecSRob Herring
28842b4aecSRob Herring  reg:
29842b4aecSRob Herring    maxItems: 1
30842b4aecSRob Herring
31842b4aecSRob Herring  interrupts:
32570df0a5SBiju Das    minItems: 3
33842b4aecSRob Herring    items:
34842b4aecSRob Herring      - description: Job interrupt
35842b4aecSRob Herring      - description: MMU interrupt
36842b4aecSRob Herring      - description: GPU interrupt
37570df0a5SBiju Das      - description: Event interrupt
38842b4aecSRob Herring
39842b4aecSRob Herring  interrupt-names:
40570df0a5SBiju Das    minItems: 3
41842b4aecSRob Herring    items:
42842b4aecSRob Herring      - const: job
43842b4aecSRob Herring      - const: mmu
44842b4aecSRob Herring      - const: gpu
45570df0a5SBiju Das      - const: event
46842b4aecSRob Herring
47842b4aecSRob Herring  clocks:
48570df0a5SBiju Das    minItems: 1
49570df0a5SBiju Das    maxItems: 3
50570df0a5SBiju Das
51570df0a5SBiju Das  clock-names: true
52842b4aecSRob Herring
53f3dde260SRob Herring  mali-supply: true
54842b4aecSRob Herring
55a7a596cdSNicolas Boichat  sram-supply: true
56a7a596cdSNicolas Boichat
57842b4aecSRob Herring  operating-points-v2: true
58842b4aecSRob Herring
592c905f6cSJohan Jonker  power-domains:
60a7a596cdSNicolas Boichat    minItems: 1
61a7a596cdSNicolas Boichat    maxItems: 3
622c905f6cSJohan Jonker
630d9a302dSRob Herring  resets:
64570df0a5SBiju Das    minItems: 1
65570df0a5SBiju Das    maxItems: 3
66570df0a5SBiju Das
67570df0a5SBiju Das  reset-names: true
680d9a302dSRob Herring
692c905f6cSJohan Jonker  "#cooling-cells":
702c905f6cSJohan Jonker    const: 2
712c905f6cSJohan Jonker
72e33dc2f3SLukasz Luba  dynamic-power-coefficient:
73e33dc2f3SLukasz Luba    $ref: '/schemas/types.yaml#/definitions/uint32'
74e33dc2f3SLukasz Luba    description:
75e33dc2f3SLukasz Luba      A u32 value that represents the running time dynamic
76e33dc2f3SLukasz Luba      power coefficient in units of uW/MHz/V^2. The
77e33dc2f3SLukasz Luba      coefficient can either be calculated from power
78e33dc2f3SLukasz Luba      measurements or derived by analysis.
79e33dc2f3SLukasz Luba
80e33dc2f3SLukasz Luba      The dynamic power consumption of the GPU is
81e33dc2f3SLukasz Luba      proportional to the square of the Voltage (V) and
82e33dc2f3SLukasz Luba      the clock frequency (f). The coefficient is used to
83e33dc2f3SLukasz Luba      calculate the dynamic power as below -
84e33dc2f3SLukasz Luba
85e33dc2f3SLukasz Luba      Pdyn = dynamic-power-coefficient * V^2 * f
86e33dc2f3SLukasz Luba
87e33dc2f3SLukasz Luba      where voltage is in V, frequency is in MHz.
88e33dc2f3SLukasz Luba
893f9a3345SKevin Hilman  dma-coherent: true
903f9a3345SKevin Hilman
91842b4aecSRob Herringrequired:
92842b4aecSRob Herring  - compatible
93842b4aecSRob Herring  - reg
94842b4aecSRob Herring  - interrupts
95842b4aecSRob Herring  - interrupt-names
96842b4aecSRob Herring  - clocks
97842b4aecSRob Herring
987f464532SRob HerringadditionalProperties: false
997f464532SRob Herring
100842b4aecSRob HerringallOf:
101842b4aecSRob Herring  - if:
102842b4aecSRob Herring      properties:
103842b4aecSRob Herring        compatible:
104842b4aecSRob Herring          contains:
105842b4aecSRob Herring            const: amlogic,meson-g12a-mali
106842b4aecSRob Herring    then:
107842b4aecSRob Herring      required:
108842b4aecSRob Herring        - resets
109a7a596cdSNicolas Boichat  - if:
110a7a596cdSNicolas Boichat      properties:
111a7a596cdSNicolas Boichat        compatible:
112a7a596cdSNicolas Boichat          contains:
113*5dc6ce76SLad Prabhakar            enum:
114*5dc6ce76SLad Prabhakar              - renesas,r9a07g044-mali
115*5dc6ce76SLad Prabhakar              - renesas,r9a07g054-mali
116570df0a5SBiju Das    then:
117570df0a5SBiju Das      properties:
118570df0a5SBiju Das        interrupts:
119570df0a5SBiju Das          minItems: 4
120570df0a5SBiju Das        interrupt-names:
121570df0a5SBiju Das          minItems: 4
122570df0a5SBiju Das        clocks:
123570df0a5SBiju Das          minItems: 3
124570df0a5SBiju Das        clock-names:
125570df0a5SBiju Das          items:
126570df0a5SBiju Das            - const: gpu
127570df0a5SBiju Das            - const: bus
128570df0a5SBiju Das            - const: bus_ace
129570df0a5SBiju Das        resets:
130570df0a5SBiju Das          minItems: 3
131570df0a5SBiju Das        reset-names:
132570df0a5SBiju Das          items:
133570df0a5SBiju Das            - const: rst
134570df0a5SBiju Das            - const: axi_rst
135570df0a5SBiju Das            - const: ace_rst
136570df0a5SBiju Das      required:
137570df0a5SBiju Das        - clock-names
138570df0a5SBiju Das        - power-domains
139570df0a5SBiju Das        - resets
140570df0a5SBiju Das        - reset-names
141570df0a5SBiju Das  - if:
142570df0a5SBiju Das      properties:
143570df0a5SBiju Das        compatible:
144570df0a5SBiju Das          contains:
145a7a596cdSNicolas Boichat            const: mediatek,mt8183-mali
146a7a596cdSNicolas Boichat    then:
147a7a596cdSNicolas Boichat      properties:
148a7a596cdSNicolas Boichat        power-domains:
149a7a596cdSNicolas Boichat          minItems: 3
150a7a596cdSNicolas Boichat        power-domain-names:
151a7a596cdSNicolas Boichat          items:
152a7a596cdSNicolas Boichat            - const: core0
153a7a596cdSNicolas Boichat            - const: core1
154a7a596cdSNicolas Boichat            - const: core2
155a7a596cdSNicolas Boichat
156a7a596cdSNicolas Boichat      required:
157a7a596cdSNicolas Boichat        - sram-supply
158a7a596cdSNicolas Boichat        - power-domains
159a7a596cdSNicolas Boichat        - power-domain-names
160a7a596cdSNicolas Boichat    else:
161a7a596cdSNicolas Boichat      properties:
162a7a596cdSNicolas Boichat        power-domains:
163a7a596cdSNicolas Boichat          maxItems: 1
164a7a596cdSNicolas Boichat        sram-supply: false
165f1775c26SAlex Bee  - if:
166f1775c26SAlex Bee      properties:
167f1775c26SAlex Bee        compatible:
168f1775c26SAlex Bee          contains:
169f1775c26SAlex Bee            const: rockchip,rk3568-mali
170f1775c26SAlex Bee    then:
171f1775c26SAlex Bee      properties:
172f1775c26SAlex Bee        clocks:
173f1775c26SAlex Bee          minItems: 2
174f1775c26SAlex Bee        clock-names:
175f1775c26SAlex Bee          items:
176f1775c26SAlex Bee            - const: gpu
177f1775c26SAlex Bee            - const: bus
178f1775c26SAlex Bee      required:
179f1775c26SAlex Bee        - clock-names
180842b4aecSRob Herring
181842b4aecSRob Herringexamples:
182842b4aecSRob Herring  - |
183842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/irq.h>
184842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/arm-gic.h>
185842b4aecSRob Herring
186842b4aecSRob Herring    gpu@ffe40000 {
187842b4aecSRob Herring      compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
188842b4aecSRob Herring      reg = <0xffe40000 0x10000>;
189842b4aecSRob Herring      interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
190842b4aecSRob Herring             <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
191842b4aecSRob Herring             <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
192842b4aecSRob Herring      interrupt-names = "job", "mmu", "gpu";
193842b4aecSRob Herring      clocks = <&clk 1>;
194842b4aecSRob Herring      mali-supply = <&vdd_gpu>;
195842b4aecSRob Herring      operating-points-v2 = <&gpu_opp_table>;
196842b4aecSRob Herring      resets = <&reset 0>, <&reset 1>;
197842b4aecSRob Herring    };
198842b4aecSRob Herring
19929fc7695SRob Herring    gpu_opp_table: opp-table {
200842b4aecSRob Herring      compatible = "operating-points-v2";
201842b4aecSRob Herring
20251a21e0eSRob Herring      opp-533000000 {
203842b4aecSRob Herring        opp-hz = /bits/ 64 <533000000>;
204842b4aecSRob Herring        opp-microvolt = <1250000>;
205842b4aecSRob Herring      };
20651a21e0eSRob Herring      opp-450000000 {
207842b4aecSRob Herring        opp-hz = /bits/ 64 <450000000>;
208842b4aecSRob Herring        opp-microvolt = <1150000>;
209842b4aecSRob Herring      };
21051a21e0eSRob Herring      opp-400000000 {
211842b4aecSRob Herring        opp-hz = /bits/ 64 <400000000>;
212842b4aecSRob Herring        opp-microvolt = <1125000>;
213842b4aecSRob Herring      };
21451a21e0eSRob Herring      opp-350000000 {
215842b4aecSRob Herring        opp-hz = /bits/ 64 <350000000>;
216842b4aecSRob Herring        opp-microvolt = <1075000>;
217842b4aecSRob Herring      };
21851a21e0eSRob Herring      opp-266000000 {
219842b4aecSRob Herring        opp-hz = /bits/ 64 <266000000>;
220842b4aecSRob Herring        opp-microvolt = <1025000>;
221842b4aecSRob Herring      };
22251a21e0eSRob Herring      opp-160000000 {
223842b4aecSRob Herring        opp-hz = /bits/ 64 <160000000>;
224842b4aecSRob Herring        opp-microvolt = <925000>;
225842b4aecSRob Herring      };
22651a21e0eSRob Herring      opp-100000000 {
227842b4aecSRob Herring        opp-hz = /bits/ 64 <100000000>;
228842b4aecSRob Herring        opp-microvolt = <912500>;
229842b4aecSRob Herring      };
230842b4aecSRob Herring    };
231842b4aecSRob Herring
232842b4aecSRob Herring...
233