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 221f03cb1bSAngeloGioacchino Del Regno - mediatek,mt8183b-mali 230b2cf514SAngeloGioacchino Del Regno - mediatek,mt8186-mali 240211b71cSAndreas Färber - realtek,rtd1619-mali 25570df0a5SBiju Das - renesas,r9a07g044-mali 265dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 27ad848dd5SHeiko Stuebner - rockchip,px30-mali 2851ca8fcbSEzequiel Garcia - rockchip,rk3568-mali 29842b4aecSRob Herring - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable 305d82e74aSAlyssa Rosenzweig - items: 315d82e74aSAlyssa Rosenzweig - enum: 322ade2830SAngeloGioacchino Del Regno - mediatek,mt8195-mali 332ade2830SAngeloGioacchino Del Regno - const: mediatek,mt8192-mali 342ade2830SAngeloGioacchino Del Regno - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 352ade2830SAngeloGioacchino Del Regno - items: 362ade2830SAngeloGioacchino Del Regno - enum: 37*b3abace4SAngeloGioacchino Del Regno - mediatek,mt8188-mali 385d82e74aSAlyssa Rosenzweig - mediatek,mt8192-mali 395d82e74aSAlyssa Rosenzweig - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 40842b4aecSRob Herring 41842b4aecSRob Herring reg: 42842b4aecSRob Herring maxItems: 1 43842b4aecSRob Herring 44842b4aecSRob Herring interrupts: 45570df0a5SBiju Das minItems: 3 46842b4aecSRob Herring items: 47842b4aecSRob Herring - description: Job interrupt 48842b4aecSRob Herring - description: MMU interrupt 49842b4aecSRob Herring - description: GPU interrupt 50570df0a5SBiju Das - description: Event interrupt 51842b4aecSRob Herring 52842b4aecSRob Herring interrupt-names: 53570df0a5SBiju Das minItems: 3 54842b4aecSRob Herring items: 55842b4aecSRob Herring - const: job 56842b4aecSRob Herring - const: mmu 57842b4aecSRob Herring - const: gpu 58570df0a5SBiju Das - const: event 59842b4aecSRob Herring 60842b4aecSRob Herring clocks: 61570df0a5SBiju Das minItems: 1 62570df0a5SBiju Das maxItems: 3 63570df0a5SBiju Das 64570df0a5SBiju Das clock-names: true 65842b4aecSRob Herring 66f3dde260SRob Herring mali-supply: true 67842b4aecSRob Herring 68a7a596cdSNicolas Boichat sram-supply: true 69a7a596cdSNicolas Boichat 70842b4aecSRob Herring operating-points-v2: true 71842b4aecSRob Herring 722c905f6cSJohan Jonker power-domains: 73a7a596cdSNicolas Boichat minItems: 1 74eccda274SAngeloGioacchino Del Regno maxItems: 5 752c905f6cSJohan Jonker 76aeb73790SAngeloGioacchino Del Regno power-domain-names: 77aeb73790SAngeloGioacchino Del Regno minItems: 2 78aeb73790SAngeloGioacchino Del Regno maxItems: 5 79aeb73790SAngeloGioacchino Del Regno 800d9a302dSRob Herring resets: 81570df0a5SBiju Das minItems: 1 82570df0a5SBiju Das maxItems: 3 83570df0a5SBiju Das 84570df0a5SBiju Das reset-names: true 850d9a302dSRob Herring 862c905f6cSJohan Jonker "#cooling-cells": 872c905f6cSJohan Jonker const: 2 882c905f6cSJohan Jonker 89e33dc2f3SLukasz Luba dynamic-power-coefficient: 90a835321bSKrzysztof Kozlowski $ref: /schemas/types.yaml#/definitions/uint32 91e33dc2f3SLukasz Luba description: 92e33dc2f3SLukasz Luba A u32 value that represents the running time dynamic 93e33dc2f3SLukasz Luba power coefficient in units of uW/MHz/V^2. The 94e33dc2f3SLukasz Luba coefficient can either be calculated from power 95e33dc2f3SLukasz Luba measurements or derived by analysis. 96e33dc2f3SLukasz Luba 97e33dc2f3SLukasz Luba The dynamic power consumption of the GPU is 98e33dc2f3SLukasz Luba proportional to the square of the Voltage (V) and 99e33dc2f3SLukasz Luba the clock frequency (f). The coefficient is used to 100e33dc2f3SLukasz Luba calculate the dynamic power as below - 101e33dc2f3SLukasz Luba 102e33dc2f3SLukasz Luba Pdyn = dynamic-power-coefficient * V^2 * f 103e33dc2f3SLukasz Luba 104e33dc2f3SLukasz Luba where voltage is in V, frequency is in MHz. 105e33dc2f3SLukasz Luba 1063f9a3345SKevin Hilman dma-coherent: true 1073f9a3345SKevin Hilman 108191308baSAngeloGioacchino Del Regno nvmem-cell-names: 109191308baSAngeloGioacchino Del Regno items: 110191308baSAngeloGioacchino Del Regno - const: speed-bin 111191308baSAngeloGioacchino Del Regno 112191308baSAngeloGioacchino Del Regno nvmem-cells: 113191308baSAngeloGioacchino Del Regno maxItems: 1 114191308baSAngeloGioacchino Del Regno 115842b4aecSRob Herringrequired: 116842b4aecSRob Herring - compatible 117842b4aecSRob Herring - reg 118842b4aecSRob Herring - interrupts 119842b4aecSRob Herring - interrupt-names 120842b4aecSRob Herring - clocks 121842b4aecSRob Herring 1227f464532SRob HerringadditionalProperties: false 1237f464532SRob Herring 124842b4aecSRob HerringallOf: 125842b4aecSRob Herring - if: 126842b4aecSRob Herring properties: 127842b4aecSRob Herring compatible: 128842b4aecSRob Herring contains: 129842b4aecSRob Herring const: amlogic,meson-g12a-mali 130842b4aecSRob Herring then: 131e82b8453SAngeloGioacchino Del Regno properties: 132e82b8453SAngeloGioacchino Del Regno power-domains: 133e82b8453SAngeloGioacchino Del Regno maxItems: 1 134aeb73790SAngeloGioacchino Del Regno power-domain-names: false 135842b4aecSRob Herring required: 136842b4aecSRob Herring - resets 137a7a596cdSNicolas Boichat - if: 138a7a596cdSNicolas Boichat properties: 139a7a596cdSNicolas Boichat compatible: 140a7a596cdSNicolas Boichat contains: 1415dc6ce76SLad Prabhakar enum: 1425dc6ce76SLad Prabhakar - renesas,r9a07g044-mali 1435dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 144570df0a5SBiju Das then: 145570df0a5SBiju Das properties: 146570df0a5SBiju Das interrupts: 147570df0a5SBiju Das minItems: 4 148570df0a5SBiju Das interrupt-names: 149570df0a5SBiju Das minItems: 4 150570df0a5SBiju Das clocks: 151570df0a5SBiju Das minItems: 3 152570df0a5SBiju Das clock-names: 153570df0a5SBiju Das items: 154570df0a5SBiju Das - const: gpu 155570df0a5SBiju Das - const: bus 156570df0a5SBiju Das - const: bus_ace 157e82b8453SAngeloGioacchino Del Regno power-domains: 158e82b8453SAngeloGioacchino Del Regno maxItems: 1 159aeb73790SAngeloGioacchino Del Regno power-domain-names: false 160570df0a5SBiju Das resets: 161570df0a5SBiju Das minItems: 3 162570df0a5SBiju Das reset-names: 163570df0a5SBiju Das items: 164570df0a5SBiju Das - const: rst 165570df0a5SBiju Das - const: axi_rst 166570df0a5SBiju Das - const: ace_rst 167570df0a5SBiju Das required: 168570df0a5SBiju Das - clock-names 169570df0a5SBiju Das - power-domains 170570df0a5SBiju Das - resets 171570df0a5SBiju Das - reset-names 172570df0a5SBiju Das - if: 173570df0a5SBiju Das properties: 174570df0a5SBiju Das compatible: 175570df0a5SBiju Das contains: 176a7a596cdSNicolas Boichat const: mediatek,mt8183-mali 177a7a596cdSNicolas Boichat then: 178a7a596cdSNicolas Boichat properties: 179a7a596cdSNicolas Boichat power-domains: 180a7a596cdSNicolas Boichat minItems: 3 181eccda274SAngeloGioacchino Del Regno maxItems: 3 182a7a596cdSNicolas Boichat power-domain-names: 183a7a596cdSNicolas Boichat items: 184a7a596cdSNicolas Boichat - const: core0 185a7a596cdSNicolas Boichat - const: core1 186a7a596cdSNicolas Boichat - const: core2 187a7a596cdSNicolas Boichat 188a7a596cdSNicolas Boichat required: 189a7a596cdSNicolas Boichat - sram-supply 190a7a596cdSNicolas Boichat - power-domains 191a7a596cdSNicolas Boichat - power-domain-names 192a7a596cdSNicolas Boichat else: 193a7a596cdSNicolas Boichat properties: 194a7a596cdSNicolas Boichat sram-supply: false 195f1775c26SAlex Bee - if: 196f1775c26SAlex Bee properties: 197f1775c26SAlex Bee compatible: 198f1775c26SAlex Bee contains: 199*b3abace4SAngeloGioacchino Del Regno enum: 200*b3abace4SAngeloGioacchino Del Regno - mediatek,mt8183b-mali 201*b3abace4SAngeloGioacchino Del Regno - mediatek,mt8188-mali 2021f03cb1bSAngeloGioacchino Del Regno then: 2031f03cb1bSAngeloGioacchino Del Regno properties: 2041f03cb1bSAngeloGioacchino Del Regno power-domains: 2051f03cb1bSAngeloGioacchino Del Regno minItems: 3 2061f03cb1bSAngeloGioacchino Del Regno maxItems: 3 2071f03cb1bSAngeloGioacchino Del Regno power-domain-names: 2081f03cb1bSAngeloGioacchino Del Regno items: 2091f03cb1bSAngeloGioacchino Del Regno - const: core0 2101f03cb1bSAngeloGioacchino Del Regno - const: core1 2111f03cb1bSAngeloGioacchino Del Regno - const: core2 2121f03cb1bSAngeloGioacchino Del Regno required: 2131f03cb1bSAngeloGioacchino Del Regno - power-domains 2141f03cb1bSAngeloGioacchino Del Regno - power-domain-names 2151f03cb1bSAngeloGioacchino Del Regno - if: 2161f03cb1bSAngeloGioacchino Del Regno properties: 2171f03cb1bSAngeloGioacchino Del Regno compatible: 2181f03cb1bSAngeloGioacchino Del Regno contains: 2190b2cf514SAngeloGioacchino Del Regno const: mediatek,mt8186-mali 2200b2cf514SAngeloGioacchino Del Regno then: 2210b2cf514SAngeloGioacchino Del Regno properties: 2220b2cf514SAngeloGioacchino Del Regno power-domains: 2230b2cf514SAngeloGioacchino Del Regno minItems: 2 2240b2cf514SAngeloGioacchino Del Regno maxItems: 2 2250b2cf514SAngeloGioacchino Del Regno power-domain-names: 2260b2cf514SAngeloGioacchino Del Regno items: 2270b2cf514SAngeloGioacchino Del Regno - const: core0 2280b2cf514SAngeloGioacchino Del Regno - const: core1 2290b2cf514SAngeloGioacchino Del Regno required: 2300b2cf514SAngeloGioacchino Del Regno - power-domains 2310b2cf514SAngeloGioacchino Del Regno - power-domain-names 2320b2cf514SAngeloGioacchino Del Regno - if: 2330b2cf514SAngeloGioacchino Del Regno properties: 2340b2cf514SAngeloGioacchino Del Regno compatible: 2350b2cf514SAngeloGioacchino Del Regno contains: 23613a8fc8aSAngeloGioacchino Del Regno const: mediatek,mt8192-mali 23713a8fc8aSAngeloGioacchino Del Regno then: 23813a8fc8aSAngeloGioacchino Del Regno properties: 23913a8fc8aSAngeloGioacchino Del Regno power-domains: 24013a8fc8aSAngeloGioacchino Del Regno minItems: 5 24113a8fc8aSAngeloGioacchino Del Regno power-domain-names: 24213a8fc8aSAngeloGioacchino Del Regno items: 24313a8fc8aSAngeloGioacchino Del Regno - const: core0 24413a8fc8aSAngeloGioacchino Del Regno - const: core1 24513a8fc8aSAngeloGioacchino Del Regno - const: core2 24613a8fc8aSAngeloGioacchino Del Regno - const: core3 24713a8fc8aSAngeloGioacchino Del Regno - const: core4 24813a8fc8aSAngeloGioacchino Del Regno required: 24913a8fc8aSAngeloGioacchino Del Regno - power-domains 25013a8fc8aSAngeloGioacchino Del Regno - power-domain-names 25113a8fc8aSAngeloGioacchino Del Regno - if: 25213a8fc8aSAngeloGioacchino Del Regno properties: 25313a8fc8aSAngeloGioacchino Del Regno compatible: 25413a8fc8aSAngeloGioacchino Del Regno contains: 255f1775c26SAlex Bee const: rockchip,rk3568-mali 256f1775c26SAlex Bee then: 257f1775c26SAlex Bee properties: 258f1775c26SAlex Bee clocks: 259f1775c26SAlex Bee minItems: 2 260f1775c26SAlex Bee clock-names: 261f1775c26SAlex Bee items: 262f1775c26SAlex Bee - const: gpu 263f1775c26SAlex Bee - const: bus 264e82b8453SAngeloGioacchino Del Regno power-domains: 265e82b8453SAngeloGioacchino Del Regno maxItems: 1 266aeb73790SAngeloGioacchino Del Regno power-domain-names: false 267f1775c26SAlex Bee required: 268f1775c26SAlex Bee - clock-names 269842b4aecSRob Herring 270842b4aecSRob Herringexamples: 271842b4aecSRob Herring - | 272842b4aecSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 273842b4aecSRob Herring #include <dt-bindings/interrupt-controller/arm-gic.h> 274842b4aecSRob Herring 275842b4aecSRob Herring gpu@ffe40000 { 276842b4aecSRob Herring compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 277842b4aecSRob Herring reg = <0xffe40000 0x10000>; 278842b4aecSRob Herring interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 279842b4aecSRob Herring <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 280842b4aecSRob Herring <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 281842b4aecSRob Herring interrupt-names = "job", "mmu", "gpu"; 282842b4aecSRob Herring clocks = <&clk 1>; 283842b4aecSRob Herring mali-supply = <&vdd_gpu>; 284842b4aecSRob Herring operating-points-v2 = <&gpu_opp_table>; 285842b4aecSRob Herring resets = <&reset 0>, <&reset 1>; 286842b4aecSRob Herring }; 287842b4aecSRob Herring 28829fc7695SRob Herring gpu_opp_table: opp-table { 289842b4aecSRob Herring compatible = "operating-points-v2"; 290842b4aecSRob Herring 29151a21e0eSRob Herring opp-533000000 { 292842b4aecSRob Herring opp-hz = /bits/ 64 <533000000>; 293842b4aecSRob Herring opp-microvolt = <1250000>; 294842b4aecSRob Herring }; 29551a21e0eSRob Herring opp-450000000 { 296842b4aecSRob Herring opp-hz = /bits/ 64 <450000000>; 297842b4aecSRob Herring opp-microvolt = <1150000>; 298842b4aecSRob Herring }; 29951a21e0eSRob Herring opp-400000000 { 300842b4aecSRob Herring opp-hz = /bits/ 64 <400000000>; 301842b4aecSRob Herring opp-microvolt = <1125000>; 302842b4aecSRob Herring }; 30351a21e0eSRob Herring opp-350000000 { 304842b4aecSRob Herring opp-hz = /bits/ 64 <350000000>; 305842b4aecSRob Herring opp-microvolt = <1075000>; 306842b4aecSRob Herring }; 30751a21e0eSRob Herring opp-266000000 { 308842b4aecSRob Herring opp-hz = /bits/ 64 <266000000>; 309842b4aecSRob Herring opp-microvolt = <1025000>; 310842b4aecSRob Herring }; 31151a21e0eSRob Herring opp-160000000 { 312842b4aecSRob Herring opp-hz = /bits/ 64 <160000000>; 313842b4aecSRob Herring opp-microvolt = <925000>; 314842b4aecSRob Herring }; 31551a21e0eSRob Herring opp-100000000 { 316842b4aecSRob Herring opp-hz = /bits/ 64 <100000000>; 317842b4aecSRob Herring opp-microvolt = <912500>; 318842b4aecSRob Herring }; 319842b4aecSRob Herring }; 320842b4aecSRob Herring 321842b4aecSRob Herring... 322