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 23*0b2cf514SAngeloGioacchino 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: 325d82e74aSAlyssa Rosenzweig - mediatek,mt8192-mali 335d82e74aSAlyssa Rosenzweig - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 34842b4aecSRob Herring 35842b4aecSRob Herring reg: 36842b4aecSRob Herring maxItems: 1 37842b4aecSRob Herring 38842b4aecSRob Herring interrupts: 39570df0a5SBiju Das minItems: 3 40842b4aecSRob Herring items: 41842b4aecSRob Herring - description: Job interrupt 42842b4aecSRob Herring - description: MMU interrupt 43842b4aecSRob Herring - description: GPU interrupt 44570df0a5SBiju Das - description: Event interrupt 45842b4aecSRob Herring 46842b4aecSRob Herring interrupt-names: 47570df0a5SBiju Das minItems: 3 48842b4aecSRob Herring items: 49842b4aecSRob Herring - const: job 50842b4aecSRob Herring - const: mmu 51842b4aecSRob Herring - const: gpu 52570df0a5SBiju Das - const: event 53842b4aecSRob Herring 54842b4aecSRob Herring clocks: 55570df0a5SBiju Das minItems: 1 56570df0a5SBiju Das maxItems: 3 57570df0a5SBiju Das 58570df0a5SBiju Das clock-names: true 59842b4aecSRob Herring 60f3dde260SRob Herring mali-supply: true 61842b4aecSRob Herring 62a7a596cdSNicolas Boichat sram-supply: true 63a7a596cdSNicolas Boichat 64842b4aecSRob Herring operating-points-v2: true 65842b4aecSRob Herring 662c905f6cSJohan Jonker power-domains: 67a7a596cdSNicolas Boichat minItems: 1 68eccda274SAngeloGioacchino Del Regno maxItems: 5 692c905f6cSJohan Jonker 70aeb73790SAngeloGioacchino Del Regno power-domain-names: 71aeb73790SAngeloGioacchino Del Regno minItems: 2 72aeb73790SAngeloGioacchino Del Regno maxItems: 5 73aeb73790SAngeloGioacchino Del Regno 740d9a302dSRob Herring resets: 75570df0a5SBiju Das minItems: 1 76570df0a5SBiju Das maxItems: 3 77570df0a5SBiju Das 78570df0a5SBiju Das reset-names: true 790d9a302dSRob Herring 802c905f6cSJohan Jonker "#cooling-cells": 812c905f6cSJohan Jonker const: 2 822c905f6cSJohan Jonker 83e33dc2f3SLukasz Luba dynamic-power-coefficient: 84e33dc2f3SLukasz Luba $ref: '/schemas/types.yaml#/definitions/uint32' 85e33dc2f3SLukasz Luba description: 86e33dc2f3SLukasz Luba A u32 value that represents the running time dynamic 87e33dc2f3SLukasz Luba power coefficient in units of uW/MHz/V^2. The 88e33dc2f3SLukasz Luba coefficient can either be calculated from power 89e33dc2f3SLukasz Luba measurements or derived by analysis. 90e33dc2f3SLukasz Luba 91e33dc2f3SLukasz Luba The dynamic power consumption of the GPU is 92e33dc2f3SLukasz Luba proportional to the square of the Voltage (V) and 93e33dc2f3SLukasz Luba the clock frequency (f). The coefficient is used to 94e33dc2f3SLukasz Luba calculate the dynamic power as below - 95e33dc2f3SLukasz Luba 96e33dc2f3SLukasz Luba Pdyn = dynamic-power-coefficient * V^2 * f 97e33dc2f3SLukasz Luba 98e33dc2f3SLukasz Luba where voltage is in V, frequency is in MHz. 99e33dc2f3SLukasz Luba 1003f9a3345SKevin Hilman dma-coherent: true 1013f9a3345SKevin Hilman 102842b4aecSRob Herringrequired: 103842b4aecSRob Herring - compatible 104842b4aecSRob Herring - reg 105842b4aecSRob Herring - interrupts 106842b4aecSRob Herring - interrupt-names 107842b4aecSRob Herring - clocks 108842b4aecSRob Herring 1097f464532SRob HerringadditionalProperties: false 1107f464532SRob Herring 111842b4aecSRob HerringallOf: 112842b4aecSRob Herring - if: 113842b4aecSRob Herring properties: 114842b4aecSRob Herring compatible: 115842b4aecSRob Herring contains: 116842b4aecSRob Herring const: amlogic,meson-g12a-mali 117842b4aecSRob Herring then: 118e82b8453SAngeloGioacchino Del Regno properties: 119e82b8453SAngeloGioacchino Del Regno power-domains: 120e82b8453SAngeloGioacchino Del Regno maxItems: 1 121aeb73790SAngeloGioacchino Del Regno power-domain-names: false 122842b4aecSRob Herring required: 123842b4aecSRob Herring - resets 124a7a596cdSNicolas Boichat - if: 125a7a596cdSNicolas Boichat properties: 126a7a596cdSNicolas Boichat compatible: 127a7a596cdSNicolas Boichat contains: 1285dc6ce76SLad Prabhakar enum: 1295dc6ce76SLad Prabhakar - renesas,r9a07g044-mali 1305dc6ce76SLad Prabhakar - renesas,r9a07g054-mali 131570df0a5SBiju Das then: 132570df0a5SBiju Das properties: 133570df0a5SBiju Das interrupts: 134570df0a5SBiju Das minItems: 4 135570df0a5SBiju Das interrupt-names: 136570df0a5SBiju Das minItems: 4 137570df0a5SBiju Das clocks: 138570df0a5SBiju Das minItems: 3 139570df0a5SBiju Das clock-names: 140570df0a5SBiju Das items: 141570df0a5SBiju Das - const: gpu 142570df0a5SBiju Das - const: bus 143570df0a5SBiju Das - const: bus_ace 144e82b8453SAngeloGioacchino Del Regno power-domains: 145e82b8453SAngeloGioacchino Del Regno maxItems: 1 146aeb73790SAngeloGioacchino Del Regno power-domain-names: false 147570df0a5SBiju Das resets: 148570df0a5SBiju Das minItems: 3 149570df0a5SBiju Das reset-names: 150570df0a5SBiju Das items: 151570df0a5SBiju Das - const: rst 152570df0a5SBiju Das - const: axi_rst 153570df0a5SBiju Das - const: ace_rst 154570df0a5SBiju Das required: 155570df0a5SBiju Das - clock-names 156570df0a5SBiju Das - power-domains 157570df0a5SBiju Das - resets 158570df0a5SBiju Das - reset-names 159570df0a5SBiju Das - if: 160570df0a5SBiju Das properties: 161570df0a5SBiju Das compatible: 162570df0a5SBiju Das contains: 163a7a596cdSNicolas Boichat const: mediatek,mt8183-mali 164a7a596cdSNicolas Boichat then: 165a7a596cdSNicolas Boichat properties: 166a7a596cdSNicolas Boichat power-domains: 167a7a596cdSNicolas Boichat minItems: 3 168eccda274SAngeloGioacchino Del Regno maxItems: 3 169a7a596cdSNicolas Boichat power-domain-names: 170a7a596cdSNicolas Boichat items: 171a7a596cdSNicolas Boichat - const: core0 172a7a596cdSNicolas Boichat - const: core1 173a7a596cdSNicolas Boichat - const: core2 174a7a596cdSNicolas Boichat 175a7a596cdSNicolas Boichat required: 176a7a596cdSNicolas Boichat - sram-supply 177a7a596cdSNicolas Boichat - power-domains 178a7a596cdSNicolas Boichat - power-domain-names 179a7a596cdSNicolas Boichat else: 180a7a596cdSNicolas Boichat properties: 181a7a596cdSNicolas Boichat sram-supply: false 182f1775c26SAlex Bee - if: 183f1775c26SAlex Bee properties: 184f1775c26SAlex Bee compatible: 185f1775c26SAlex Bee contains: 1861f03cb1bSAngeloGioacchino Del Regno const: mediatek,mt8183b-mali 1871f03cb1bSAngeloGioacchino Del Regno then: 1881f03cb1bSAngeloGioacchino Del Regno properties: 1891f03cb1bSAngeloGioacchino Del Regno power-domains: 1901f03cb1bSAngeloGioacchino Del Regno minItems: 3 1911f03cb1bSAngeloGioacchino Del Regno maxItems: 3 1921f03cb1bSAngeloGioacchino Del Regno power-domain-names: 1931f03cb1bSAngeloGioacchino Del Regno items: 1941f03cb1bSAngeloGioacchino Del Regno - const: core0 1951f03cb1bSAngeloGioacchino Del Regno - const: core1 1961f03cb1bSAngeloGioacchino Del Regno - const: core2 1971f03cb1bSAngeloGioacchino Del Regno required: 1981f03cb1bSAngeloGioacchino Del Regno - power-domains 1991f03cb1bSAngeloGioacchino Del Regno - power-domain-names 2001f03cb1bSAngeloGioacchino Del Regno - if: 2011f03cb1bSAngeloGioacchino Del Regno properties: 2021f03cb1bSAngeloGioacchino Del Regno compatible: 2031f03cb1bSAngeloGioacchino Del Regno contains: 204*0b2cf514SAngeloGioacchino Del Regno const: mediatek,mt8186-mali 205*0b2cf514SAngeloGioacchino Del Regno then: 206*0b2cf514SAngeloGioacchino Del Regno properties: 207*0b2cf514SAngeloGioacchino Del Regno power-domains: 208*0b2cf514SAngeloGioacchino Del Regno minItems: 2 209*0b2cf514SAngeloGioacchino Del Regno maxItems: 2 210*0b2cf514SAngeloGioacchino Del Regno power-domain-names: 211*0b2cf514SAngeloGioacchino Del Regno items: 212*0b2cf514SAngeloGioacchino Del Regno - const: core0 213*0b2cf514SAngeloGioacchino Del Regno - const: core1 214*0b2cf514SAngeloGioacchino Del Regno required: 215*0b2cf514SAngeloGioacchino Del Regno - power-domains 216*0b2cf514SAngeloGioacchino Del Regno - power-domain-names 217*0b2cf514SAngeloGioacchino Del Regno - if: 218*0b2cf514SAngeloGioacchino Del Regno properties: 219*0b2cf514SAngeloGioacchino Del Regno compatible: 220*0b2cf514SAngeloGioacchino Del Regno contains: 22113a8fc8aSAngeloGioacchino Del Regno const: mediatek,mt8192-mali 22213a8fc8aSAngeloGioacchino Del Regno then: 22313a8fc8aSAngeloGioacchino Del Regno properties: 22413a8fc8aSAngeloGioacchino Del Regno power-domains: 22513a8fc8aSAngeloGioacchino Del Regno minItems: 5 22613a8fc8aSAngeloGioacchino Del Regno power-domain-names: 22713a8fc8aSAngeloGioacchino Del Regno items: 22813a8fc8aSAngeloGioacchino Del Regno - const: core0 22913a8fc8aSAngeloGioacchino Del Regno - const: core1 23013a8fc8aSAngeloGioacchino Del Regno - const: core2 23113a8fc8aSAngeloGioacchino Del Regno - const: core3 23213a8fc8aSAngeloGioacchino Del Regno - const: core4 23313a8fc8aSAngeloGioacchino Del Regno required: 23413a8fc8aSAngeloGioacchino Del Regno - power-domains 23513a8fc8aSAngeloGioacchino Del Regno - power-domain-names 23613a8fc8aSAngeloGioacchino Del Regno - if: 23713a8fc8aSAngeloGioacchino Del Regno properties: 23813a8fc8aSAngeloGioacchino Del Regno compatible: 23913a8fc8aSAngeloGioacchino Del Regno contains: 240f1775c26SAlex Bee const: rockchip,rk3568-mali 241f1775c26SAlex Bee then: 242f1775c26SAlex Bee properties: 243f1775c26SAlex Bee clocks: 244f1775c26SAlex Bee minItems: 2 245f1775c26SAlex Bee clock-names: 246f1775c26SAlex Bee items: 247f1775c26SAlex Bee - const: gpu 248f1775c26SAlex Bee - const: bus 249e82b8453SAngeloGioacchino Del Regno power-domains: 250e82b8453SAngeloGioacchino Del Regno maxItems: 1 251aeb73790SAngeloGioacchino Del Regno power-domain-names: false 252f1775c26SAlex Bee required: 253f1775c26SAlex Bee - clock-names 254842b4aecSRob Herring 255842b4aecSRob Herringexamples: 256842b4aecSRob Herring - | 257842b4aecSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 258842b4aecSRob Herring #include <dt-bindings/interrupt-controller/arm-gic.h> 259842b4aecSRob Herring 260842b4aecSRob Herring gpu@ffe40000 { 261842b4aecSRob Herring compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 262842b4aecSRob Herring reg = <0xffe40000 0x10000>; 263842b4aecSRob Herring interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 264842b4aecSRob Herring <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 265842b4aecSRob Herring <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 266842b4aecSRob Herring interrupt-names = "job", "mmu", "gpu"; 267842b4aecSRob Herring clocks = <&clk 1>; 268842b4aecSRob Herring mali-supply = <&vdd_gpu>; 269842b4aecSRob Herring operating-points-v2 = <&gpu_opp_table>; 270842b4aecSRob Herring resets = <&reset 0>, <&reset 1>; 271842b4aecSRob Herring }; 272842b4aecSRob Herring 27329fc7695SRob Herring gpu_opp_table: opp-table { 274842b4aecSRob Herring compatible = "operating-points-v2"; 275842b4aecSRob Herring 27651a21e0eSRob Herring opp-533000000 { 277842b4aecSRob Herring opp-hz = /bits/ 64 <533000000>; 278842b4aecSRob Herring opp-microvolt = <1250000>; 279842b4aecSRob Herring }; 28051a21e0eSRob Herring opp-450000000 { 281842b4aecSRob Herring opp-hz = /bits/ 64 <450000000>; 282842b4aecSRob Herring opp-microvolt = <1150000>; 283842b4aecSRob Herring }; 28451a21e0eSRob Herring opp-400000000 { 285842b4aecSRob Herring opp-hz = /bits/ 64 <400000000>; 286842b4aecSRob Herring opp-microvolt = <1125000>; 287842b4aecSRob Herring }; 28851a21e0eSRob Herring opp-350000000 { 289842b4aecSRob Herring opp-hz = /bits/ 64 <350000000>; 290842b4aecSRob Herring opp-microvolt = <1075000>; 291842b4aecSRob Herring }; 29251a21e0eSRob Herring opp-266000000 { 293842b4aecSRob Herring opp-hz = /bits/ 64 <266000000>; 294842b4aecSRob Herring opp-microvolt = <1025000>; 295842b4aecSRob Herring }; 29651a21e0eSRob Herring opp-160000000 { 297842b4aecSRob Herring opp-hz = /bits/ 64 <160000000>; 298842b4aecSRob Herring opp-microvolt = <925000>; 299842b4aecSRob Herring }; 30051a21e0eSRob Herring opp-100000000 { 301842b4aecSRob Herring opp-hz = /bits/ 64 <100000000>; 302842b4aecSRob Herring opp-microvolt = <912500>; 303842b4aecSRob Herring }; 304842b4aecSRob Herring }; 305842b4aecSRob Herring 306842b4aecSRob Herring... 307