1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/gpu/arm,mali-valhall-csf.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: ARM Mali Valhall GPU 8 9maintainers: 10 - Liviu Dudau <liviu.dudau@arm.com> 11 - Boris Brezillon <boris.brezillon@collabora.com> 12 13properties: 14 $nodename: 15 pattern: '^gpu@[a-f0-9]+$' 16 17 compatible: 18 oneOf: 19 - items: 20 - enum: 21 - mediatek,mt8196-mali 22 - nxp,imx95-mali # G310 23 - rockchip,rk3588-mali 24 - const: arm,mali-valhall-csf # Mali Valhall 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 minItems: 1 43 maxItems: 3 44 45 clock-names: 46 minItems: 1 47 items: 48 - const: core 49 - enum: 50 - coregroup 51 - stacks 52 - const: stacks 53 54 mali-supply: true 55 56 operating-points-v2: true 57 opp-table: 58 type: object 59 60 power-domains: 61 minItems: 1 62 maxItems: 5 63 64 power-domain-names: 65 minItems: 1 66 maxItems: 5 67 68 sram-supply: true 69 70 "#cooling-cells": 71 const: 2 72 73 dynamic-power-coefficient: 74 $ref: /schemas/types.yaml#/definitions/uint32 75 description: 76 A u32 value that represents the running time dynamic 77 power coefficient in units of uW/MHz/V^2. The 78 coefficient can either be calculated from power 79 measurements or derived by analysis. 80 81 The dynamic power consumption of the GPU is 82 proportional to the square of the Voltage (V) and 83 the clock frequency (f). The coefficient is used to 84 calculate the dynamic power as below - 85 86 Pdyn = dynamic-power-coefficient * V^2 * f 87 88 where voltage is in V, frequency is in MHz. 89 90 dma-coherent: true 91 92required: 93 - compatible 94 - reg 95 - interrupts 96 - interrupt-names 97 - clocks 98 99additionalProperties: false 100 101allOf: 102 - if: 103 properties: 104 compatible: 105 contains: 106 const: rockchip,rk3588-mali 107 then: 108 properties: 109 clocks: 110 minItems: 3 111 power-domains: 112 maxItems: 1 113 power-domain-names: false 114 required: 115 - mali-supply 116 - if: 117 properties: 118 compatible: 119 contains: 120 const: mediatek,mt8196-mali 121 then: 122 properties: 123 mali-supply: false 124 sram-supply: false 125 operating-points-v2: false 126 power-domains: 127 maxItems: 1 128 power-domain-names: false 129 clocks: 130 maxItems: 2 131 clock-names: 132 items: 133 - const: core 134 - const: stacks 135 required: 136 - power-domains 137 138examples: 139 - | 140 #include <dt-bindings/clock/rockchip,rk3588-cru.h> 141 #include <dt-bindings/interrupt-controller/irq.h> 142 #include <dt-bindings/interrupt-controller/arm-gic.h> 143 #include <dt-bindings/power/rk3588-power.h> 144 145 gpu: gpu@fb000000 { 146 compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf"; 147 reg = <0xfb000000 0x200000>; 148 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH 0>, 149 <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH 0>, 150 <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH 0>; 151 interrupt-names = "job", "mmu", "gpu"; 152 clock-names = "core", "coregroup", "stacks"; 153 clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>, 154 <&cru CLK_GPU_STACKS>; 155 power-domains = <&power RK3588_PD_GPU>; 156 operating-points-v2 = <&gpu_opp_table>; 157 mali-supply = <&vdd_gpu_s0>; 158 sram-supply = <&vdd_gpu_mem_s0>; 159 160 gpu_opp_table: opp-table { 161 compatible = "operating-points-v2"; 162 opp-300000000 { 163 opp-hz = /bits/ 64 <300000000>; 164 opp-microvolt = <675000 675000 850000>; 165 }; 166 opp-400000000 { 167 opp-hz = /bits/ 64 <400000000>; 168 opp-microvolt = <675000 675000 850000>; 169 }; 170 }; 171 }; 172 - | 173 gpu@48000000 { 174 compatible = "mediatek,mt8196-mali", "arm,mali-valhall-csf"; 175 reg = <0x48000000 0x480000>; 176 clocks = <&gpufreq 0>, <&gpufreq 1>; 177 clock-names = "core", "stacks"; 178 interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH 0>, 179 <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH 0>, 180 <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH 0>; 181 interrupt-names = "job", "mmu", "gpu"; 182 power-domains = <&gpufreq>; 183 }; 184 185... 186