xref: /linux/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml (revision 570df0a51955b4741ca3a87b065ce4d7927bf325)
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
22*570df0a5SBiju 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:
31*570df0a5SBiju Das    minItems: 3
32842b4aecSRob Herring    items:
33842b4aecSRob Herring      - description: Job interrupt
34842b4aecSRob Herring      - description: MMU interrupt
35842b4aecSRob Herring      - description: GPU interrupt
36*570df0a5SBiju Das      - description: Event interrupt
37842b4aecSRob Herring
38842b4aecSRob Herring  interrupt-names:
39*570df0a5SBiju Das    minItems: 3
40842b4aecSRob Herring    items:
41842b4aecSRob Herring      - const: job
42842b4aecSRob Herring      - const: mmu
43842b4aecSRob Herring      - const: gpu
44*570df0a5SBiju Das      - const: event
45842b4aecSRob Herring
46842b4aecSRob Herring  clocks:
47*570df0a5SBiju Das    minItems: 1
48*570df0a5SBiju Das    maxItems: 3
49*570df0a5SBiju Das
50*570df0a5SBiju 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:
63*570df0a5SBiju Das    minItems: 1
64*570df0a5SBiju Das    maxItems: 3
65*570df0a5SBiju Das
66*570df0a5SBiju 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:
112*570df0a5SBiju Das            const: renesas,r9a07g044-mali
113*570df0a5SBiju Das    then:
114*570df0a5SBiju Das      properties:
115*570df0a5SBiju Das        interrupts:
116*570df0a5SBiju Das          minItems: 4
117*570df0a5SBiju Das        interrupt-names:
118*570df0a5SBiju Das          minItems: 4
119*570df0a5SBiju Das        clocks:
120*570df0a5SBiju Das          minItems: 3
121*570df0a5SBiju Das        clock-names:
122*570df0a5SBiju Das          items:
123*570df0a5SBiju Das            - const: gpu
124*570df0a5SBiju Das            - const: bus
125*570df0a5SBiju Das            - const: bus_ace
126*570df0a5SBiju Das        resets:
127*570df0a5SBiju Das          minItems: 3
128*570df0a5SBiju Das        reset-names:
129*570df0a5SBiju Das          items:
130*570df0a5SBiju Das            - const: rst
131*570df0a5SBiju Das            - const: axi_rst
132*570df0a5SBiju Das            - const: ace_rst
133*570df0a5SBiju Das      required:
134*570df0a5SBiju Das        - clock-names
135*570df0a5SBiju Das        - power-domains
136*570df0a5SBiju Das        - resets
137*570df0a5SBiju Das        - reset-names
138*570df0a5SBiju Das  - if:
139*570df0a5SBiju Das      properties:
140*570df0a5SBiju Das        compatible:
141*570df0a5SBiju 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
162842b4aecSRob Herring
163842b4aecSRob Herringexamples:
164842b4aecSRob Herring  - |
165842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/irq.h>
166842b4aecSRob Herring    #include <dt-bindings/interrupt-controller/arm-gic.h>
167842b4aecSRob Herring
168842b4aecSRob Herring    gpu@ffe40000 {
169842b4aecSRob Herring      compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
170842b4aecSRob Herring      reg = <0xffe40000 0x10000>;
171842b4aecSRob Herring      interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
172842b4aecSRob Herring             <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
173842b4aecSRob Herring             <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
174842b4aecSRob Herring      interrupt-names = "job", "mmu", "gpu";
175842b4aecSRob Herring      clocks = <&clk 1>;
176842b4aecSRob Herring      mali-supply = <&vdd_gpu>;
177842b4aecSRob Herring      operating-points-v2 = <&gpu_opp_table>;
178842b4aecSRob Herring      resets = <&reset 0>, <&reset 1>;
179842b4aecSRob Herring    };
180842b4aecSRob Herring
18129fc7695SRob Herring    gpu_opp_table: opp-table {
182842b4aecSRob Herring      compatible = "operating-points-v2";
183842b4aecSRob Herring
18451a21e0eSRob Herring      opp-533000000 {
185842b4aecSRob Herring        opp-hz = /bits/ 64 <533000000>;
186842b4aecSRob Herring        opp-microvolt = <1250000>;
187842b4aecSRob Herring      };
18851a21e0eSRob Herring      opp-450000000 {
189842b4aecSRob Herring        opp-hz = /bits/ 64 <450000000>;
190842b4aecSRob Herring        opp-microvolt = <1150000>;
191842b4aecSRob Herring      };
19251a21e0eSRob Herring      opp-400000000 {
193842b4aecSRob Herring        opp-hz = /bits/ 64 <400000000>;
194842b4aecSRob Herring        opp-microvolt = <1125000>;
195842b4aecSRob Herring      };
19651a21e0eSRob Herring      opp-350000000 {
197842b4aecSRob Herring        opp-hz = /bits/ 64 <350000000>;
198842b4aecSRob Herring        opp-microvolt = <1075000>;
199842b4aecSRob Herring      };
20051a21e0eSRob Herring      opp-266000000 {
201842b4aecSRob Herring        opp-hz = /bits/ 64 <266000000>;
202842b4aecSRob Herring        opp-microvolt = <1025000>;
203842b4aecSRob Herring      };
20451a21e0eSRob Herring      opp-160000000 {
205842b4aecSRob Herring        opp-hz = /bits/ 64 <160000000>;
206842b4aecSRob Herring        opp-microvolt = <925000>;
207842b4aecSRob Herring      };
20851a21e0eSRob Herring      opp-100000000 {
209842b4aecSRob Herring        opp-hz = /bits/ 64 <100000000>;
210842b4aecSRob Herring        opp-microvolt = <912500>;
211842b4aecSRob Herring      };
212842b4aecSRob Herring    };
213842b4aecSRob Herring
214842b4aecSRob Herring...
215