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