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: 175d82e74aSAlyssa Rosenzweig oneOf: 185d82e74aSAlyssa Rosenzweig - items: 19842b4aecSRob Herring - enum: 20842b4aecSRob Herring - amlogic,meson-g12a-mali 21a7a596cdSNicolas Boichat - mediatek,mt8183-mali 22*1f03cb1bSAngeloGioacchino Del Regno - mediatek,mt8183b-mali 230211b71cSAndreas Färber - realtek,rtd1619-mali 24570df0a5SBiju Das - renesas,r9a07g044-mali 255dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 26ad848dd5SHeiko Stuebner - rockchip,px30-mali 2751ca8fcbSEzequiel Garcia - rockchip,rk3568-mali 28842b4aecSRob Herring - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable 295d82e74aSAlyssa Rosenzweig - items: 305d82e74aSAlyssa Rosenzweig - enum: 315d82e74aSAlyssa Rosenzweig - mediatek,mt8192-mali 325d82e74aSAlyssa Rosenzweig - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 33842b4aecSRob Herring 34842b4aecSRob Herring reg: 35842b4aecSRob Herring maxItems: 1 36842b4aecSRob Herring 37842b4aecSRob Herring interrupts: 38570df0a5SBiju Das minItems: 3 39842b4aecSRob Herring items: 40842b4aecSRob Herring - description: Job interrupt 41842b4aecSRob Herring - description: MMU interrupt 42842b4aecSRob Herring - description: GPU interrupt 43570df0a5SBiju Das - description: Event interrupt 44842b4aecSRob Herring 45842b4aecSRob Herring interrupt-names: 46570df0a5SBiju Das minItems: 3 47842b4aecSRob Herring items: 48842b4aecSRob Herring - const: job 49842b4aecSRob Herring - const: mmu 50842b4aecSRob Herring - const: gpu 51570df0a5SBiju Das - const: event 52842b4aecSRob Herring 53842b4aecSRob Herring clocks: 54570df0a5SBiju Das minItems: 1 55570df0a5SBiju Das maxItems: 3 56570df0a5SBiju Das 57570df0a5SBiju Das clock-names: true 58842b4aecSRob Herring 59f3dde260SRob Herring mali-supply: true 60842b4aecSRob Herring 61a7a596cdSNicolas Boichat sram-supply: true 62a7a596cdSNicolas Boichat 63842b4aecSRob Herring operating-points-v2: true 64842b4aecSRob Herring 652c905f6cSJohan Jonker power-domains: 66a7a596cdSNicolas Boichat minItems: 1 67eccda274SAngeloGioacchino Del Regno maxItems: 5 682c905f6cSJohan Jonker 69aeb73790SAngeloGioacchino Del Regno power-domain-names: 70aeb73790SAngeloGioacchino Del Regno minItems: 2 71aeb73790SAngeloGioacchino Del Regno maxItems: 5 72aeb73790SAngeloGioacchino Del Regno 730d9a302dSRob Herring resets: 74570df0a5SBiju Das minItems: 1 75570df0a5SBiju Das maxItems: 3 76570df0a5SBiju Das 77570df0a5SBiju Das reset-names: true 780d9a302dSRob Herring 792c905f6cSJohan Jonker "#cooling-cells": 802c905f6cSJohan Jonker const: 2 812c905f6cSJohan Jonker 82e33dc2f3SLukasz Luba dynamic-power-coefficient: 83e33dc2f3SLukasz Luba $ref: '/schemas/types.yaml#/definitions/uint32' 84e33dc2f3SLukasz Luba description: 85e33dc2f3SLukasz Luba A u32 value that represents the running time dynamic 86e33dc2f3SLukasz Luba power coefficient in units of uW/MHz/V^2. The 87e33dc2f3SLukasz Luba coefficient can either be calculated from power 88e33dc2f3SLukasz Luba measurements or derived by analysis. 89e33dc2f3SLukasz Luba 90e33dc2f3SLukasz Luba The dynamic power consumption of the GPU is 91e33dc2f3SLukasz Luba proportional to the square of the Voltage (V) and 92e33dc2f3SLukasz Luba the clock frequency (f). The coefficient is used to 93e33dc2f3SLukasz Luba calculate the dynamic power as below - 94e33dc2f3SLukasz Luba 95e33dc2f3SLukasz Luba Pdyn = dynamic-power-coefficient * V^2 * f 96e33dc2f3SLukasz Luba 97e33dc2f3SLukasz Luba where voltage is in V, frequency is in MHz. 98e33dc2f3SLukasz Luba 993f9a3345SKevin Hilman dma-coherent: true 1003f9a3345SKevin Hilman 101842b4aecSRob Herringrequired: 102842b4aecSRob Herring - compatible 103842b4aecSRob Herring - reg 104842b4aecSRob Herring - interrupts 105842b4aecSRob Herring - interrupt-names 106842b4aecSRob Herring - clocks 107842b4aecSRob Herring 1087f464532SRob HerringadditionalProperties: false 1097f464532SRob Herring 110842b4aecSRob HerringallOf: 111842b4aecSRob Herring - if: 112842b4aecSRob Herring properties: 113842b4aecSRob Herring compatible: 114842b4aecSRob Herring contains: 115842b4aecSRob Herring const: amlogic,meson-g12a-mali 116842b4aecSRob Herring then: 117e82b8453SAngeloGioacchino Del Regno properties: 118e82b8453SAngeloGioacchino Del Regno power-domains: 119e82b8453SAngeloGioacchino Del Regno maxItems: 1 120aeb73790SAngeloGioacchino Del Regno power-domain-names: false 121842b4aecSRob Herring required: 122842b4aecSRob Herring - resets 123a7a596cdSNicolas Boichat - if: 124a7a596cdSNicolas Boichat properties: 125a7a596cdSNicolas Boichat compatible: 126a7a596cdSNicolas Boichat contains: 1275dc6ce76SLad Prabhakar enum: 1285dc6ce76SLad Prabhakar - renesas,r9a07g044-mali 1295dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 130570df0a5SBiju Das then: 131570df0a5SBiju Das properties: 132570df0a5SBiju Das interrupts: 133570df0a5SBiju Das minItems: 4 134570df0a5SBiju Das interrupt-names: 135570df0a5SBiju Das minItems: 4 136570df0a5SBiju Das clocks: 137570df0a5SBiju Das minItems: 3 138570df0a5SBiju Das clock-names: 139570df0a5SBiju Das items: 140570df0a5SBiju Das - const: gpu 141570df0a5SBiju Das - const: bus 142570df0a5SBiju Das - const: bus_ace 143e82b8453SAngeloGioacchino Del Regno power-domains: 144e82b8453SAngeloGioacchino Del Regno maxItems: 1 145aeb73790SAngeloGioacchino Del Regno power-domain-names: false 146570df0a5SBiju Das resets: 147570df0a5SBiju Das minItems: 3 148570df0a5SBiju Das reset-names: 149570df0a5SBiju Das items: 150570df0a5SBiju Das - const: rst 151570df0a5SBiju Das - const: axi_rst 152570df0a5SBiju Das - const: ace_rst 153570df0a5SBiju Das required: 154570df0a5SBiju Das - clock-names 155570df0a5SBiju Das - power-domains 156570df0a5SBiju Das - resets 157570df0a5SBiju Das - reset-names 158570df0a5SBiju Das - if: 159570df0a5SBiju Das properties: 160570df0a5SBiju Das compatible: 161570df0a5SBiju Das contains: 162a7a596cdSNicolas Boichat const: mediatek,mt8183-mali 163a7a596cdSNicolas Boichat then: 164a7a596cdSNicolas Boichat properties: 165a7a596cdSNicolas Boichat power-domains: 166a7a596cdSNicolas Boichat minItems: 3 167eccda274SAngeloGioacchino Del Regno maxItems: 3 168a7a596cdSNicolas Boichat power-domain-names: 169a7a596cdSNicolas Boichat items: 170a7a596cdSNicolas Boichat - const: core0 171a7a596cdSNicolas Boichat - const: core1 172a7a596cdSNicolas Boichat - const: core2 173a7a596cdSNicolas Boichat 174a7a596cdSNicolas Boichat required: 175a7a596cdSNicolas Boichat - sram-supply 176a7a596cdSNicolas Boichat - power-domains 177a7a596cdSNicolas Boichat - power-domain-names 178a7a596cdSNicolas Boichat else: 179a7a596cdSNicolas Boichat properties: 180a7a596cdSNicolas Boichat sram-supply: false 181f1775c26SAlex Bee - if: 182f1775c26SAlex Bee properties: 183f1775c26SAlex Bee compatible: 184f1775c26SAlex Bee contains: 185*1f03cb1bSAngeloGioacchino Del Regno const: mediatek,mt8183b-mali 186*1f03cb1bSAngeloGioacchino Del Regno then: 187*1f03cb1bSAngeloGioacchino Del Regno properties: 188*1f03cb1bSAngeloGioacchino Del Regno power-domains: 189*1f03cb1bSAngeloGioacchino Del Regno minItems: 3 190*1f03cb1bSAngeloGioacchino Del Regno maxItems: 3 191*1f03cb1bSAngeloGioacchino Del Regno power-domain-names: 192*1f03cb1bSAngeloGioacchino Del Regno items: 193*1f03cb1bSAngeloGioacchino Del Regno - const: core0 194*1f03cb1bSAngeloGioacchino Del Regno - const: core1 195*1f03cb1bSAngeloGioacchino Del Regno - const: core2 196*1f03cb1bSAngeloGioacchino Del Regno required: 197*1f03cb1bSAngeloGioacchino Del Regno - power-domains 198*1f03cb1bSAngeloGioacchino Del Regno - power-domain-names 199*1f03cb1bSAngeloGioacchino Del Regno - if: 200*1f03cb1bSAngeloGioacchino Del Regno properties: 201*1f03cb1bSAngeloGioacchino Del Regno compatible: 202*1f03cb1bSAngeloGioacchino Del Regno contains: 20313a8fc8aSAngeloGioacchino Del Regno const: mediatek,mt8192-mali 20413a8fc8aSAngeloGioacchino Del Regno then: 20513a8fc8aSAngeloGioacchino Del Regno properties: 20613a8fc8aSAngeloGioacchino Del Regno power-domains: 20713a8fc8aSAngeloGioacchino Del Regno minItems: 5 20813a8fc8aSAngeloGioacchino Del Regno power-domain-names: 20913a8fc8aSAngeloGioacchino Del Regno items: 21013a8fc8aSAngeloGioacchino Del Regno - const: core0 21113a8fc8aSAngeloGioacchino Del Regno - const: core1 21213a8fc8aSAngeloGioacchino Del Regno - const: core2 21313a8fc8aSAngeloGioacchino Del Regno - const: core3 21413a8fc8aSAngeloGioacchino Del Regno - const: core4 21513a8fc8aSAngeloGioacchino Del Regno required: 21613a8fc8aSAngeloGioacchino Del Regno - power-domains 21713a8fc8aSAngeloGioacchino Del Regno - power-domain-names 21813a8fc8aSAngeloGioacchino Del Regno - if: 21913a8fc8aSAngeloGioacchino Del Regno properties: 22013a8fc8aSAngeloGioacchino Del Regno compatible: 22113a8fc8aSAngeloGioacchino Del Regno contains: 222f1775c26SAlex Bee const: rockchip,rk3568-mali 223f1775c26SAlex Bee then: 224f1775c26SAlex Bee properties: 225f1775c26SAlex Bee clocks: 226f1775c26SAlex Bee minItems: 2 227f1775c26SAlex Bee clock-names: 228f1775c26SAlex Bee items: 229f1775c26SAlex Bee - const: gpu 230f1775c26SAlex Bee - const: bus 231e82b8453SAngeloGioacchino Del Regno power-domains: 232e82b8453SAngeloGioacchino Del Regno maxItems: 1 233aeb73790SAngeloGioacchino Del Regno power-domain-names: false 234f1775c26SAlex Bee required: 235f1775c26SAlex Bee - clock-names 236842b4aecSRob Herring 237842b4aecSRob Herringexamples: 238842b4aecSRob Herring - | 239842b4aecSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 240842b4aecSRob Herring #include <dt-bindings/interrupt-controller/arm-gic.h> 241842b4aecSRob Herring 242842b4aecSRob Herring gpu@ffe40000 { 243842b4aecSRob Herring compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 244842b4aecSRob Herring reg = <0xffe40000 0x10000>; 245842b4aecSRob Herring interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 246842b4aecSRob Herring <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 247842b4aecSRob Herring <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 248842b4aecSRob Herring interrupt-names = "job", "mmu", "gpu"; 249842b4aecSRob Herring clocks = <&clk 1>; 250842b4aecSRob Herring mali-supply = <&vdd_gpu>; 251842b4aecSRob Herring operating-points-v2 = <&gpu_opp_table>; 252842b4aecSRob Herring resets = <&reset 0>, <&reset 1>; 253842b4aecSRob Herring }; 254842b4aecSRob Herring 25529fc7695SRob Herring gpu_opp_table: opp-table { 256842b4aecSRob Herring compatible = "operating-points-v2"; 257842b4aecSRob Herring 25851a21e0eSRob Herring opp-533000000 { 259842b4aecSRob Herring opp-hz = /bits/ 64 <533000000>; 260842b4aecSRob Herring opp-microvolt = <1250000>; 261842b4aecSRob Herring }; 26251a21e0eSRob Herring opp-450000000 { 263842b4aecSRob Herring opp-hz = /bits/ 64 <450000000>; 264842b4aecSRob Herring opp-microvolt = <1150000>; 265842b4aecSRob Herring }; 26651a21e0eSRob Herring opp-400000000 { 267842b4aecSRob Herring opp-hz = /bits/ 64 <400000000>; 268842b4aecSRob Herring opp-microvolt = <1125000>; 269842b4aecSRob Herring }; 27051a21e0eSRob Herring opp-350000000 { 271842b4aecSRob Herring opp-hz = /bits/ 64 <350000000>; 272842b4aecSRob Herring opp-microvolt = <1075000>; 273842b4aecSRob Herring }; 27451a21e0eSRob Herring opp-266000000 { 275842b4aecSRob Herring opp-hz = /bits/ 64 <266000000>; 276842b4aecSRob Herring opp-microvolt = <1025000>; 277842b4aecSRob Herring }; 27851a21e0eSRob Herring opp-160000000 { 279842b4aecSRob Herring opp-hz = /bits/ 64 <160000000>; 280842b4aecSRob Herring opp-microvolt = <925000>; 281842b4aecSRob Herring }; 28251a21e0eSRob Herring opp-100000000 { 283842b4aecSRob Herring opp-hz = /bits/ 64 <100000000>; 284842b4aecSRob Herring opp-microvolt = <912500>; 285842b4aecSRob Herring }; 286842b4aecSRob Herring }; 287842b4aecSRob Herring 288842b4aecSRob Herring... 289