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: 32*2ade2830SAngeloGioacchino Del Regno - mediatek,mt8195-mali 33*2ade2830SAngeloGioacchino Del Regno - const: mediatek,mt8192-mali 34*2ade2830SAngeloGioacchino Del Regno - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 35*2ade2830SAngeloGioacchino Del Regno - items: 36*2ade2830SAngeloGioacchino Del Regno - enum: 375d82e74aSAlyssa Rosenzweig - mediatek,mt8192-mali 385d82e74aSAlyssa Rosenzweig - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 39842b4aecSRob Herring 40842b4aecSRob Herring reg: 41842b4aecSRob Herring maxItems: 1 42842b4aecSRob Herring 43842b4aecSRob Herring interrupts: 44570df0a5SBiju Das minItems: 3 45842b4aecSRob Herring items: 46842b4aecSRob Herring - description: Job interrupt 47842b4aecSRob Herring - description: MMU interrupt 48842b4aecSRob Herring - description: GPU interrupt 49570df0a5SBiju Das - description: Event interrupt 50842b4aecSRob Herring 51842b4aecSRob Herring interrupt-names: 52570df0a5SBiju Das minItems: 3 53842b4aecSRob Herring items: 54842b4aecSRob Herring - const: job 55842b4aecSRob Herring - const: mmu 56842b4aecSRob Herring - const: gpu 57570df0a5SBiju Das - const: event 58842b4aecSRob Herring 59842b4aecSRob Herring clocks: 60570df0a5SBiju Das minItems: 1 61570df0a5SBiju Das maxItems: 3 62570df0a5SBiju Das 63570df0a5SBiju Das clock-names: true 64842b4aecSRob Herring 65f3dde260SRob Herring mali-supply: true 66842b4aecSRob Herring 67a7a596cdSNicolas Boichat sram-supply: true 68a7a596cdSNicolas Boichat 69842b4aecSRob Herring operating-points-v2: true 70842b4aecSRob Herring 712c905f6cSJohan Jonker power-domains: 72a7a596cdSNicolas Boichat minItems: 1 73eccda274SAngeloGioacchino Del Regno maxItems: 5 742c905f6cSJohan Jonker 75aeb73790SAngeloGioacchino Del Regno power-domain-names: 76aeb73790SAngeloGioacchino Del Regno minItems: 2 77aeb73790SAngeloGioacchino Del Regno maxItems: 5 78aeb73790SAngeloGioacchino Del Regno 790d9a302dSRob Herring resets: 80570df0a5SBiju Das minItems: 1 81570df0a5SBiju Das maxItems: 3 82570df0a5SBiju Das 83570df0a5SBiju Das reset-names: true 840d9a302dSRob Herring 852c905f6cSJohan Jonker "#cooling-cells": 862c905f6cSJohan Jonker const: 2 872c905f6cSJohan Jonker 88e33dc2f3SLukasz Luba dynamic-power-coefficient: 89e33dc2f3SLukasz Luba $ref: '/schemas/types.yaml#/definitions/uint32' 90e33dc2f3SLukasz Luba description: 91e33dc2f3SLukasz Luba A u32 value that represents the running time dynamic 92e33dc2f3SLukasz Luba power coefficient in units of uW/MHz/V^2. The 93e33dc2f3SLukasz Luba coefficient can either be calculated from power 94e33dc2f3SLukasz Luba measurements or derived by analysis. 95e33dc2f3SLukasz Luba 96e33dc2f3SLukasz Luba The dynamic power consumption of the GPU is 97e33dc2f3SLukasz Luba proportional to the square of the Voltage (V) and 98e33dc2f3SLukasz Luba the clock frequency (f). The coefficient is used to 99e33dc2f3SLukasz Luba calculate the dynamic power as below - 100e33dc2f3SLukasz Luba 101e33dc2f3SLukasz Luba Pdyn = dynamic-power-coefficient * V^2 * f 102e33dc2f3SLukasz Luba 103e33dc2f3SLukasz Luba where voltage is in V, frequency is in MHz. 104e33dc2f3SLukasz Luba 1053f9a3345SKevin Hilman dma-coherent: true 1063f9a3345SKevin Hilman 107842b4aecSRob Herringrequired: 108842b4aecSRob Herring - compatible 109842b4aecSRob Herring - reg 110842b4aecSRob Herring - interrupts 111842b4aecSRob Herring - interrupt-names 112842b4aecSRob Herring - clocks 113842b4aecSRob Herring 1147f464532SRob HerringadditionalProperties: false 1157f464532SRob Herring 116842b4aecSRob HerringallOf: 117842b4aecSRob Herring - if: 118842b4aecSRob Herring properties: 119842b4aecSRob Herring compatible: 120842b4aecSRob Herring contains: 121842b4aecSRob Herring const: amlogic,meson-g12a-mali 122842b4aecSRob Herring then: 123e82b8453SAngeloGioacchino Del Regno properties: 124e82b8453SAngeloGioacchino Del Regno power-domains: 125e82b8453SAngeloGioacchino Del Regno maxItems: 1 126aeb73790SAngeloGioacchino Del Regno power-domain-names: false 127842b4aecSRob Herring required: 128842b4aecSRob Herring - resets 129a7a596cdSNicolas Boichat - if: 130a7a596cdSNicolas Boichat properties: 131a7a596cdSNicolas Boichat compatible: 132a7a596cdSNicolas Boichat contains: 1335dc6ce76SLad Prabhakar enum: 1345dc6ce76SLad Prabhakar - renesas,r9a07g044-mali 1355dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 136570df0a5SBiju Das then: 137570df0a5SBiju Das properties: 138570df0a5SBiju Das interrupts: 139570df0a5SBiju Das minItems: 4 140570df0a5SBiju Das interrupt-names: 141570df0a5SBiju Das minItems: 4 142570df0a5SBiju Das clocks: 143570df0a5SBiju Das minItems: 3 144570df0a5SBiju Das clock-names: 145570df0a5SBiju Das items: 146570df0a5SBiju Das - const: gpu 147570df0a5SBiju Das - const: bus 148570df0a5SBiju Das - const: bus_ace 149e82b8453SAngeloGioacchino Del Regno power-domains: 150e82b8453SAngeloGioacchino Del Regno maxItems: 1 151aeb73790SAngeloGioacchino Del Regno power-domain-names: false 152570df0a5SBiju Das resets: 153570df0a5SBiju Das minItems: 3 154570df0a5SBiju Das reset-names: 155570df0a5SBiju Das items: 156570df0a5SBiju Das - const: rst 157570df0a5SBiju Das - const: axi_rst 158570df0a5SBiju Das - const: ace_rst 159570df0a5SBiju Das required: 160570df0a5SBiju Das - clock-names 161570df0a5SBiju Das - power-domains 162570df0a5SBiju Das - resets 163570df0a5SBiju Das - reset-names 164570df0a5SBiju Das - if: 165570df0a5SBiju Das properties: 166570df0a5SBiju Das compatible: 167570df0a5SBiju Das contains: 168a7a596cdSNicolas Boichat const: mediatek,mt8183-mali 169a7a596cdSNicolas Boichat then: 170a7a596cdSNicolas Boichat properties: 171a7a596cdSNicolas Boichat power-domains: 172a7a596cdSNicolas Boichat minItems: 3 173eccda274SAngeloGioacchino Del Regno maxItems: 3 174a7a596cdSNicolas Boichat power-domain-names: 175a7a596cdSNicolas Boichat items: 176a7a596cdSNicolas Boichat - const: core0 177a7a596cdSNicolas Boichat - const: core1 178a7a596cdSNicolas Boichat - const: core2 179a7a596cdSNicolas Boichat 180a7a596cdSNicolas Boichat required: 181a7a596cdSNicolas Boichat - sram-supply 182a7a596cdSNicolas Boichat - power-domains 183a7a596cdSNicolas Boichat - power-domain-names 184a7a596cdSNicolas Boichat else: 185a7a596cdSNicolas Boichat properties: 186a7a596cdSNicolas Boichat sram-supply: false 187f1775c26SAlex Bee - if: 188f1775c26SAlex Bee properties: 189f1775c26SAlex Bee compatible: 190f1775c26SAlex Bee contains: 1911f03cb1bSAngeloGioacchino Del Regno const: mediatek,mt8183b-mali 1921f03cb1bSAngeloGioacchino Del Regno then: 1931f03cb1bSAngeloGioacchino Del Regno properties: 1941f03cb1bSAngeloGioacchino Del Regno power-domains: 1951f03cb1bSAngeloGioacchino Del Regno minItems: 3 1961f03cb1bSAngeloGioacchino Del Regno maxItems: 3 1971f03cb1bSAngeloGioacchino Del Regno power-domain-names: 1981f03cb1bSAngeloGioacchino Del Regno items: 1991f03cb1bSAngeloGioacchino Del Regno - const: core0 2001f03cb1bSAngeloGioacchino Del Regno - const: core1 2011f03cb1bSAngeloGioacchino Del Regno - const: core2 2021f03cb1bSAngeloGioacchino Del Regno required: 2031f03cb1bSAngeloGioacchino Del Regno - power-domains 2041f03cb1bSAngeloGioacchino Del Regno - power-domain-names 2051f03cb1bSAngeloGioacchino Del Regno - if: 2061f03cb1bSAngeloGioacchino Del Regno properties: 2071f03cb1bSAngeloGioacchino Del Regno compatible: 2081f03cb1bSAngeloGioacchino Del Regno contains: 2090b2cf514SAngeloGioacchino Del Regno const: mediatek,mt8186-mali 2100b2cf514SAngeloGioacchino Del Regno then: 2110b2cf514SAngeloGioacchino Del Regno properties: 2120b2cf514SAngeloGioacchino Del Regno power-domains: 2130b2cf514SAngeloGioacchino Del Regno minItems: 2 2140b2cf514SAngeloGioacchino Del Regno maxItems: 2 2150b2cf514SAngeloGioacchino Del Regno power-domain-names: 2160b2cf514SAngeloGioacchino Del Regno items: 2170b2cf514SAngeloGioacchino Del Regno - const: core0 2180b2cf514SAngeloGioacchino Del Regno - const: core1 2190b2cf514SAngeloGioacchino Del Regno required: 2200b2cf514SAngeloGioacchino Del Regno - power-domains 2210b2cf514SAngeloGioacchino Del Regno - power-domain-names 2220b2cf514SAngeloGioacchino Del Regno - if: 2230b2cf514SAngeloGioacchino Del Regno properties: 2240b2cf514SAngeloGioacchino Del Regno compatible: 2250b2cf514SAngeloGioacchino Del Regno contains: 22613a8fc8aSAngeloGioacchino Del Regno const: mediatek,mt8192-mali 22713a8fc8aSAngeloGioacchino Del Regno then: 22813a8fc8aSAngeloGioacchino Del Regno properties: 22913a8fc8aSAngeloGioacchino Del Regno power-domains: 23013a8fc8aSAngeloGioacchino Del Regno minItems: 5 23113a8fc8aSAngeloGioacchino Del Regno power-domain-names: 23213a8fc8aSAngeloGioacchino Del Regno items: 23313a8fc8aSAngeloGioacchino Del Regno - const: core0 23413a8fc8aSAngeloGioacchino Del Regno - const: core1 23513a8fc8aSAngeloGioacchino Del Regno - const: core2 23613a8fc8aSAngeloGioacchino Del Regno - const: core3 23713a8fc8aSAngeloGioacchino Del Regno - const: core4 23813a8fc8aSAngeloGioacchino Del Regno required: 23913a8fc8aSAngeloGioacchino Del Regno - power-domains 24013a8fc8aSAngeloGioacchino Del Regno - power-domain-names 24113a8fc8aSAngeloGioacchino Del Regno - if: 24213a8fc8aSAngeloGioacchino Del Regno properties: 24313a8fc8aSAngeloGioacchino Del Regno compatible: 24413a8fc8aSAngeloGioacchino Del Regno contains: 245f1775c26SAlex Bee const: rockchip,rk3568-mali 246f1775c26SAlex Bee then: 247f1775c26SAlex Bee properties: 248f1775c26SAlex Bee clocks: 249f1775c26SAlex Bee minItems: 2 250f1775c26SAlex Bee clock-names: 251f1775c26SAlex Bee items: 252f1775c26SAlex Bee - const: gpu 253f1775c26SAlex Bee - const: bus 254e82b8453SAngeloGioacchino Del Regno power-domains: 255e82b8453SAngeloGioacchino Del Regno maxItems: 1 256aeb73790SAngeloGioacchino Del Regno power-domain-names: false 257f1775c26SAlex Bee required: 258f1775c26SAlex Bee - clock-names 259842b4aecSRob Herring 260842b4aecSRob Herringexamples: 261842b4aecSRob Herring - | 262842b4aecSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 263842b4aecSRob Herring #include <dt-bindings/interrupt-controller/arm-gic.h> 264842b4aecSRob Herring 265842b4aecSRob Herring gpu@ffe40000 { 266842b4aecSRob Herring compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 267842b4aecSRob Herring reg = <0xffe40000 0x10000>; 268842b4aecSRob Herring interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 269842b4aecSRob Herring <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 270842b4aecSRob Herring <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 271842b4aecSRob Herring interrupt-names = "job", "mmu", "gpu"; 272842b4aecSRob Herring clocks = <&clk 1>; 273842b4aecSRob Herring mali-supply = <&vdd_gpu>; 274842b4aecSRob Herring operating-points-v2 = <&gpu_opp_table>; 275842b4aecSRob Herring resets = <&reset 0>, <&reset 1>; 276842b4aecSRob Herring }; 277842b4aecSRob Herring 27829fc7695SRob Herring gpu_opp_table: opp-table { 279842b4aecSRob Herring compatible = "operating-points-v2"; 280842b4aecSRob Herring 28151a21e0eSRob Herring opp-533000000 { 282842b4aecSRob Herring opp-hz = /bits/ 64 <533000000>; 283842b4aecSRob Herring opp-microvolt = <1250000>; 284842b4aecSRob Herring }; 28551a21e0eSRob Herring opp-450000000 { 286842b4aecSRob Herring opp-hz = /bits/ 64 <450000000>; 287842b4aecSRob Herring opp-microvolt = <1150000>; 288842b4aecSRob Herring }; 28951a21e0eSRob Herring opp-400000000 { 290842b4aecSRob Herring opp-hz = /bits/ 64 <400000000>; 291842b4aecSRob Herring opp-microvolt = <1125000>; 292842b4aecSRob Herring }; 29351a21e0eSRob Herring opp-350000000 { 294842b4aecSRob Herring opp-hz = /bits/ 64 <350000000>; 295842b4aecSRob Herring opp-microvolt = <1075000>; 296842b4aecSRob Herring }; 29751a21e0eSRob Herring opp-266000000 { 298842b4aecSRob Herring opp-hz = /bits/ 64 <266000000>; 299842b4aecSRob Herring opp-microvolt = <1025000>; 300842b4aecSRob Herring }; 30151a21e0eSRob Herring opp-160000000 { 302842b4aecSRob Herring opp-hz = /bits/ 64 <160000000>; 303842b4aecSRob Herring opp-microvolt = <925000>; 304842b4aecSRob Herring }; 30551a21e0eSRob Herring opp-100000000 { 306842b4aecSRob Herring opp-hz = /bits/ 64 <100000000>; 307842b4aecSRob Herring opp-microvolt = <912500>; 308842b4aecSRob Herring }; 309842b4aecSRob Herring }; 310842b4aecSRob Herring 311842b4aecSRob Herring... 312