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 20*a7a596cdSNicolas Boichat - mediatek,mt8183-mali 210211b71cSAndreas Färber - realtek,rtd1619-mali 22ad848dd5SHeiko Stuebner - rockchip,px30-mali 23842b4aecSRob Herring - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable 24842b4aecSRob Herring 25842b4aecSRob Herring reg: 26842b4aecSRob Herring maxItems: 1 27842b4aecSRob Herring 28842b4aecSRob Herring interrupts: 29842b4aecSRob Herring items: 30842b4aecSRob Herring - description: Job interrupt 31842b4aecSRob Herring - description: MMU interrupt 32842b4aecSRob Herring - description: GPU interrupt 33842b4aecSRob Herring 34842b4aecSRob Herring interrupt-names: 35842b4aecSRob Herring items: 36842b4aecSRob Herring - const: job 37842b4aecSRob Herring - const: mmu 38842b4aecSRob Herring - const: gpu 39842b4aecSRob Herring 40842b4aecSRob Herring clocks: 41842b4aecSRob Herring maxItems: 1 42842b4aecSRob Herring 43f3dde260SRob Herring mali-supply: true 44842b4aecSRob Herring 45*a7a596cdSNicolas Boichat sram-supply: true 46*a7a596cdSNicolas Boichat 47842b4aecSRob Herring operating-points-v2: true 48842b4aecSRob Herring 492c905f6cSJohan Jonker power-domains: 50*a7a596cdSNicolas Boichat minItems: 1 51*a7a596cdSNicolas Boichat maxItems: 3 522c905f6cSJohan Jonker 530d9a302dSRob Herring resets: 540d9a302dSRob Herring maxItems: 2 550d9a302dSRob Herring 562c905f6cSJohan Jonker "#cooling-cells": 572c905f6cSJohan Jonker const: 2 582c905f6cSJohan Jonker 59e33dc2f3SLukasz Luba dynamic-power-coefficient: 60e33dc2f3SLukasz Luba $ref: '/schemas/types.yaml#/definitions/uint32' 61e33dc2f3SLukasz Luba description: 62e33dc2f3SLukasz Luba A u32 value that represents the running time dynamic 63e33dc2f3SLukasz Luba power coefficient in units of uW/MHz/V^2. The 64e33dc2f3SLukasz Luba coefficient can either be calculated from power 65e33dc2f3SLukasz Luba measurements or derived by analysis. 66e33dc2f3SLukasz Luba 67e33dc2f3SLukasz Luba The dynamic power consumption of the GPU is 68e33dc2f3SLukasz Luba proportional to the square of the Voltage (V) and 69e33dc2f3SLukasz Luba the clock frequency (f). The coefficient is used to 70e33dc2f3SLukasz Luba calculate the dynamic power as below - 71e33dc2f3SLukasz Luba 72e33dc2f3SLukasz Luba Pdyn = dynamic-power-coefficient * V^2 * f 73e33dc2f3SLukasz Luba 74e33dc2f3SLukasz Luba where voltage is in V, frequency is in MHz. 75e33dc2f3SLukasz Luba 763f9a3345SKevin Hilman dma-coherent: true 773f9a3345SKevin Hilman 78842b4aecSRob Herringrequired: 79842b4aecSRob Herring - compatible 80842b4aecSRob Herring - reg 81842b4aecSRob Herring - interrupts 82842b4aecSRob Herring - interrupt-names 83842b4aecSRob Herring - clocks 84842b4aecSRob Herring 857f464532SRob HerringadditionalProperties: false 867f464532SRob Herring 87842b4aecSRob HerringallOf: 88842b4aecSRob Herring - if: 89842b4aecSRob Herring properties: 90842b4aecSRob Herring compatible: 91842b4aecSRob Herring contains: 92842b4aecSRob Herring const: amlogic,meson-g12a-mali 93842b4aecSRob Herring then: 94842b4aecSRob Herring required: 95842b4aecSRob Herring - resets 96*a7a596cdSNicolas Boichat - if: 97*a7a596cdSNicolas Boichat properties: 98*a7a596cdSNicolas Boichat compatible: 99*a7a596cdSNicolas Boichat contains: 100*a7a596cdSNicolas Boichat const: mediatek,mt8183-mali 101*a7a596cdSNicolas Boichat then: 102*a7a596cdSNicolas Boichat properties: 103*a7a596cdSNicolas Boichat power-domains: 104*a7a596cdSNicolas Boichat minItems: 3 105*a7a596cdSNicolas Boichat power-domain-names: 106*a7a596cdSNicolas Boichat items: 107*a7a596cdSNicolas Boichat - const: core0 108*a7a596cdSNicolas Boichat - const: core1 109*a7a596cdSNicolas Boichat - const: core2 110*a7a596cdSNicolas Boichat 111*a7a596cdSNicolas Boichat required: 112*a7a596cdSNicolas Boichat - sram-supply 113*a7a596cdSNicolas Boichat - power-domains 114*a7a596cdSNicolas Boichat - power-domain-names 115*a7a596cdSNicolas Boichat else: 116*a7a596cdSNicolas Boichat properties: 117*a7a596cdSNicolas Boichat power-domains: 118*a7a596cdSNicolas Boichat maxItems: 1 119*a7a596cdSNicolas Boichat sram-supply: false 120842b4aecSRob Herring 121842b4aecSRob Herringexamples: 122842b4aecSRob Herring - | 123842b4aecSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 124842b4aecSRob Herring #include <dt-bindings/interrupt-controller/arm-gic.h> 125842b4aecSRob Herring 126842b4aecSRob Herring gpu@ffe40000 { 127842b4aecSRob Herring compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 128842b4aecSRob Herring reg = <0xffe40000 0x10000>; 129842b4aecSRob Herring interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 130842b4aecSRob Herring <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 131842b4aecSRob Herring <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 132842b4aecSRob Herring interrupt-names = "job", "mmu", "gpu"; 133842b4aecSRob Herring clocks = <&clk 1>; 134842b4aecSRob Herring mali-supply = <&vdd_gpu>; 135842b4aecSRob Herring operating-points-v2 = <&gpu_opp_table>; 136842b4aecSRob Herring resets = <&reset 0>, <&reset 1>; 137842b4aecSRob Herring }; 138842b4aecSRob Herring 139842b4aecSRob Herring gpu_opp_table: opp_table0 { 140842b4aecSRob Herring compatible = "operating-points-v2"; 141842b4aecSRob Herring 14251a21e0eSRob Herring opp-533000000 { 143842b4aecSRob Herring opp-hz = /bits/ 64 <533000000>; 144842b4aecSRob Herring opp-microvolt = <1250000>; 145842b4aecSRob Herring }; 14651a21e0eSRob Herring opp-450000000 { 147842b4aecSRob Herring opp-hz = /bits/ 64 <450000000>; 148842b4aecSRob Herring opp-microvolt = <1150000>; 149842b4aecSRob Herring }; 15051a21e0eSRob Herring opp-400000000 { 151842b4aecSRob Herring opp-hz = /bits/ 64 <400000000>; 152842b4aecSRob Herring opp-microvolt = <1125000>; 153842b4aecSRob Herring }; 15451a21e0eSRob Herring opp-350000000 { 155842b4aecSRob Herring opp-hz = /bits/ 64 <350000000>; 156842b4aecSRob Herring opp-microvolt = <1075000>; 157842b4aecSRob Herring }; 15851a21e0eSRob Herring opp-266000000 { 159842b4aecSRob Herring opp-hz = /bits/ 64 <266000000>; 160842b4aecSRob Herring opp-microvolt = <1025000>; 161842b4aecSRob Herring }; 16251a21e0eSRob Herring opp-160000000 { 163842b4aecSRob Herring opp-hz = /bits/ 64 <160000000>; 164842b4aecSRob Herring opp-microvolt = <925000>; 165842b4aecSRob Herring }; 16651a21e0eSRob Herring opp-100000000 { 167842b4aecSRob Herring opp-hz = /bits/ 64 <100000000>; 168842b4aecSRob Herring opp-microvolt = <912500>; 169842b4aecSRob Herring }; 170842b4aecSRob Herring }; 171842b4aecSRob Herring 172842b4aecSRob Herring... 173