1# SPDX-License-Identifier: GPL-2.0-only 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: ARM Mali Bifrost GPU 8 9maintainers: 10 - Rob Herring <robh@kernel.org> 11 12properties: 13 $nodename: 14 pattern: '^gpu@[a-f0-9]+$' 15 16 compatible: 17 items: 18 - enum: 19 - amlogic,meson-g12a-mali 20 - mediatek,mt8183-mali 21 - realtek,rtd1619-mali 22 - rockchip,px30-mali 23 - rockchip,rk3568-mali 24 - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable 25 26 reg: 27 maxItems: 1 28 29 interrupts: 30 items: 31 - description: Job interrupt 32 - description: MMU interrupt 33 - description: GPU interrupt 34 35 interrupt-names: 36 items: 37 - const: job 38 - const: mmu 39 - const: gpu 40 41 clocks: 42 maxItems: 1 43 44 mali-supply: true 45 46 sram-supply: true 47 48 operating-points-v2: true 49 50 power-domains: 51 minItems: 1 52 maxItems: 3 53 54 resets: 55 maxItems: 2 56 57 "#cooling-cells": 58 const: 2 59 60 dynamic-power-coefficient: 61 $ref: '/schemas/types.yaml#/definitions/uint32' 62 description: 63 A u32 value that represents the running time dynamic 64 power coefficient in units of uW/MHz/V^2. The 65 coefficient can either be calculated from power 66 measurements or derived by analysis. 67 68 The dynamic power consumption of the GPU is 69 proportional to the square of the Voltage (V) and 70 the clock frequency (f). The coefficient is used to 71 calculate the dynamic power as below - 72 73 Pdyn = dynamic-power-coefficient * V^2 * f 74 75 where voltage is in V, frequency is in MHz. 76 77 dma-coherent: true 78 79required: 80 - compatible 81 - reg 82 - interrupts 83 - interrupt-names 84 - clocks 85 86additionalProperties: false 87 88allOf: 89 - if: 90 properties: 91 compatible: 92 contains: 93 const: amlogic,meson-g12a-mali 94 then: 95 required: 96 - resets 97 - if: 98 properties: 99 compatible: 100 contains: 101 const: mediatek,mt8183-mali 102 then: 103 properties: 104 power-domains: 105 minItems: 3 106 power-domain-names: 107 items: 108 - const: core0 109 - const: core1 110 - const: core2 111 112 required: 113 - sram-supply 114 - power-domains 115 - power-domain-names 116 else: 117 properties: 118 power-domains: 119 maxItems: 1 120 sram-supply: false 121 122examples: 123 - | 124 #include <dt-bindings/interrupt-controller/irq.h> 125 #include <dt-bindings/interrupt-controller/arm-gic.h> 126 127 gpu@ffe40000 { 128 compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 129 reg = <0xffe40000 0x10000>; 130 interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 131 <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 132 <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 133 interrupt-names = "job", "mmu", "gpu"; 134 clocks = <&clk 1>; 135 mali-supply = <&vdd_gpu>; 136 operating-points-v2 = <&gpu_opp_table>; 137 resets = <&reset 0>, <&reset 1>; 138 }; 139 140 gpu_opp_table: opp-table { 141 compatible = "operating-points-v2"; 142 143 opp-533000000 { 144 opp-hz = /bits/ 64 <533000000>; 145 opp-microvolt = <1250000>; 146 }; 147 opp-450000000 { 148 opp-hz = /bits/ 64 <450000000>; 149 opp-microvolt = <1150000>; 150 }; 151 opp-400000000 { 152 opp-hz = /bits/ 64 <400000000>; 153 opp-microvolt = <1125000>; 154 }; 155 opp-350000000 { 156 opp-hz = /bits/ 64 <350000000>; 157 opp-microvolt = <1075000>; 158 }; 159 opp-266000000 { 160 opp-hz = /bits/ 64 <266000000>; 161 opp-microvolt = <1025000>; 162 }; 163 opp-160000000 { 164 opp-hz = /bits/ 64 <160000000>; 165 opp-microvolt = <925000>; 166 }; 167 opp-100000000 { 168 opp-hz = /bits/ 64 <100000000>; 169 opp-microvolt = <912500>; 170 }; 171 }; 172 173... 174