0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: ARM Mali Bifrost GPU
0008
0009 maintainers:
0010 - Rob Herring <robh@kernel.org>
0011
0012 properties:
0013 $nodename:
0014 pattern: '^gpu@[a-f0-9]+$'
0015
0016 compatible:
0017 oneOf:
0018 - items:
0019 - enum:
0020 - amlogic,meson-g12a-mali
0021 - mediatek,mt8183-mali
0022 - realtek,rtd1619-mali
0023 - renesas,r9a07g044-mali
0024 - renesas,r9a07g054-mali
0025 - rockchip,px30-mali
0026 - rockchip,rk3568-mali
0027 - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
0028 - items:
0029 - enum:
0030 - mediatek,mt8192-mali
0031 - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
0032
0033 reg:
0034 maxItems: 1
0035
0036 interrupts:
0037 minItems: 3
0038 items:
0039 - description: Job interrupt
0040 - description: MMU interrupt
0041 - description: GPU interrupt
0042 - description: Event interrupt
0043
0044 interrupt-names:
0045 minItems: 3
0046 items:
0047 - const: job
0048 - const: mmu
0049 - const: gpu
0050 - const: event
0051
0052 clocks:
0053 minItems: 1
0054 maxItems: 3
0055
0056 clock-names: true
0057
0058 mali-supply: true
0059
0060 sram-supply: true
0061
0062 operating-points-v2: true
0063
0064 power-domains:
0065 minItems: 1
0066 maxItems: 3
0067
0068 resets:
0069 minItems: 1
0070 maxItems: 3
0071
0072 reset-names: true
0073
0074 "#cooling-cells":
0075 const: 2
0076
0077 dynamic-power-coefficient:
0078 $ref: '/schemas/types.yaml#/definitions/uint32'
0079 description:
0080 A u32 value that represents the running time dynamic
0081 power coefficient in units of uW/MHz/V^2. The
0082 coefficient can either be calculated from power
0083 measurements or derived by analysis.
0084
0085 The dynamic power consumption of the GPU is
0086 proportional to the square of the Voltage (V) and
0087 the clock frequency (f). The coefficient is used to
0088 calculate the dynamic power as below -
0089
0090 Pdyn = dynamic-power-coefficient * V^2 * f
0091
0092 where voltage is in V, frequency is in MHz.
0093
0094 dma-coherent: true
0095
0096 required:
0097 - compatible
0098 - reg
0099 - interrupts
0100 - interrupt-names
0101 - clocks
0102
0103 additionalProperties: false
0104
0105 allOf:
0106 - if:
0107 properties:
0108 compatible:
0109 contains:
0110 const: amlogic,meson-g12a-mali
0111 then:
0112 required:
0113 - resets
0114 - if:
0115 properties:
0116 compatible:
0117 contains:
0118 enum:
0119 - renesas,r9a07g044-mali
0120 - renesas,r9a07g054-mali
0121 then:
0122 properties:
0123 interrupts:
0124 minItems: 4
0125 interrupt-names:
0126 minItems: 4
0127 clocks:
0128 minItems: 3
0129 clock-names:
0130 items:
0131 - const: gpu
0132 - const: bus
0133 - const: bus_ace
0134 resets:
0135 minItems: 3
0136 reset-names:
0137 items:
0138 - const: rst
0139 - const: axi_rst
0140 - const: ace_rst
0141 required:
0142 - clock-names
0143 - power-domains
0144 - resets
0145 - reset-names
0146 - if:
0147 properties:
0148 compatible:
0149 contains:
0150 const: mediatek,mt8183-mali
0151 then:
0152 properties:
0153 power-domains:
0154 minItems: 3
0155 power-domain-names:
0156 items:
0157 - const: core0
0158 - const: core1
0159 - const: core2
0160
0161 required:
0162 - sram-supply
0163 - power-domains
0164 - power-domain-names
0165 else:
0166 properties:
0167 power-domains:
0168 maxItems: 1
0169 sram-supply: false
0170 - if:
0171 properties:
0172 compatible:
0173 contains:
0174 const: rockchip,rk3568-mali
0175 then:
0176 properties:
0177 clocks:
0178 minItems: 2
0179 clock-names:
0180 items:
0181 - const: gpu
0182 - const: bus
0183 required:
0184 - clock-names
0185
0186 examples:
0187 - |
0188 #include <dt-bindings/interrupt-controller/irq.h>
0189 #include <dt-bindings/interrupt-controller/arm-gic.h>
0190
0191 gpu@ffe40000 {
0192 compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
0193 reg = <0xffe40000 0x10000>;
0194 interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
0195 <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
0196 <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
0197 interrupt-names = "job", "mmu", "gpu";
0198 clocks = <&clk 1>;
0199 mali-supply = <&vdd_gpu>;
0200 operating-points-v2 = <&gpu_opp_table>;
0201 resets = <&reset 0>, <&reset 1>;
0202 };
0203
0204 gpu_opp_table: opp-table {
0205 compatible = "operating-points-v2";
0206
0207 opp-533000000 {
0208 opp-hz = /bits/ 64 <533000000>;
0209 opp-microvolt = <1250000>;
0210 };
0211 opp-450000000 {
0212 opp-hz = /bits/ 64 <450000000>;
0213 opp-microvolt = <1150000>;
0214 };
0215 opp-400000000 {
0216 opp-hz = /bits/ 64 <400000000>;
0217 opp-microvolt = <1125000>;
0218 };
0219 opp-350000000 {
0220 opp-hz = /bits/ 64 <350000000>;
0221 opp-microvolt = <1075000>;
0222 };
0223 opp-266000000 {
0224 opp-hz = /bits/ 64 <266000000>;
0225 opp-microvolt = <1025000>;
0226 };
0227 opp-160000000 {
0228 opp-hz = /bits/ 64 <160000000>;
0229 opp-microvolt = <925000>;
0230 };
0231 opp-100000000 {
0232 opp-hz = /bits/ 64 <100000000>;
0233 opp-microvolt = <912500>;
0234 };
0235 };
0236
0237 ...