1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/gpu/arm,mali-bifrost.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: ARM Mali Bifrost GPU 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Rob Herring <robh@kernel.org> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotproperties: 13c66ec88fSEmmanuel Vadot $nodename: 14c66ec88fSEmmanuel Vadot pattern: '^gpu@[a-f0-9]+$' 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot compatible: 17b97ee269SEmmanuel Vadot oneOf: 18b97ee269SEmmanuel Vadot - items: 19c66ec88fSEmmanuel Vadot - enum: 20c66ec88fSEmmanuel Vadot - amlogic,meson-g12a-mali 215956d97fSEmmanuel Vadot - mediatek,mt8183-mali 22fac71e4eSEmmanuel Vadot - mediatek,mt8183b-mali 23fac71e4eSEmmanuel Vadot - mediatek,mt8186-mali 24c66ec88fSEmmanuel Vadot - realtek,rtd1619-mali 25e67e8565SEmmanuel Vadot - renesas,r9a07g044-mali 26c9ccf3a3SEmmanuel Vadot - renesas,r9a07g054-mali 27c66ec88fSEmmanuel Vadot - rockchip,px30-mali 28354d7675SEmmanuel Vadot - rockchip,rk3568-mali 29c66ec88fSEmmanuel Vadot - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable 30b97ee269SEmmanuel Vadot - items: 31b97ee269SEmmanuel Vadot - enum: 32fac71e4eSEmmanuel Vadot - mediatek,mt8195-mali 33fac71e4eSEmmanuel Vadot - const: mediatek,mt8192-mali 34fac71e4eSEmmanuel Vadot - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 35fac71e4eSEmmanuel Vadot - items: 36fac71e4eSEmmanuel Vadot - enum: 37*0e8011faSEmmanuel Vadot - mediatek,mt8188-mali 38b97ee269SEmmanuel Vadot - mediatek,mt8192-mali 39b97ee269SEmmanuel Vadot - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot reg: 42c66ec88fSEmmanuel Vadot maxItems: 1 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot interrupts: 45e67e8565SEmmanuel Vadot minItems: 3 46c66ec88fSEmmanuel Vadot items: 47c66ec88fSEmmanuel Vadot - description: Job interrupt 48c66ec88fSEmmanuel Vadot - description: MMU interrupt 49c66ec88fSEmmanuel Vadot - description: GPU interrupt 50e67e8565SEmmanuel Vadot - description: Event interrupt 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot interrupt-names: 53e67e8565SEmmanuel Vadot minItems: 3 54c66ec88fSEmmanuel Vadot items: 55c66ec88fSEmmanuel Vadot - const: job 56c66ec88fSEmmanuel Vadot - const: mmu 57c66ec88fSEmmanuel Vadot - const: gpu 58e67e8565SEmmanuel Vadot - const: event 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel Vadot clocks: 61e67e8565SEmmanuel Vadot minItems: 1 62e67e8565SEmmanuel Vadot maxItems: 3 63e67e8565SEmmanuel Vadot 64e67e8565SEmmanuel Vadot clock-names: true 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel Vadot mali-supply: true 67c66ec88fSEmmanuel Vadot 685956d97fSEmmanuel Vadot sram-supply: true 695956d97fSEmmanuel Vadot 70c66ec88fSEmmanuel Vadot operating-points-v2: true 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel Vadot power-domains: 735956d97fSEmmanuel Vadot minItems: 1 74fac71e4eSEmmanuel Vadot maxItems: 5 75fac71e4eSEmmanuel Vadot 76fac71e4eSEmmanuel Vadot power-domain-names: 77fac71e4eSEmmanuel Vadot minItems: 2 78fac71e4eSEmmanuel Vadot maxItems: 5 79c66ec88fSEmmanuel Vadot 80c66ec88fSEmmanuel Vadot resets: 81e67e8565SEmmanuel Vadot minItems: 1 82e67e8565SEmmanuel Vadot maxItems: 3 83e67e8565SEmmanuel Vadot 84e67e8565SEmmanuel Vadot reset-names: true 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot "#cooling-cells": 87c66ec88fSEmmanuel Vadot const: 2 88c66ec88fSEmmanuel Vadot 895def4c47SEmmanuel Vadot dynamic-power-coefficient: 90f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 915def4c47SEmmanuel Vadot description: 925def4c47SEmmanuel Vadot A u32 value that represents the running time dynamic 935def4c47SEmmanuel Vadot power coefficient in units of uW/MHz/V^2. The 945def4c47SEmmanuel Vadot coefficient can either be calculated from power 955def4c47SEmmanuel Vadot measurements or derived by analysis. 965def4c47SEmmanuel Vadot 975def4c47SEmmanuel Vadot The dynamic power consumption of the GPU is 985def4c47SEmmanuel Vadot proportional to the square of the Voltage (V) and 995def4c47SEmmanuel Vadot the clock frequency (f). The coefficient is used to 1005def4c47SEmmanuel Vadot calculate the dynamic power as below - 1015def4c47SEmmanuel Vadot 1025def4c47SEmmanuel Vadot Pdyn = dynamic-power-coefficient * V^2 * f 1035def4c47SEmmanuel Vadot 1045def4c47SEmmanuel Vadot where voltage is in V, frequency is in MHz. 1055def4c47SEmmanuel Vadot 1062eb4d8dcSEmmanuel Vadot dma-coherent: true 1072eb4d8dcSEmmanuel Vadot 108fac71e4eSEmmanuel Vadot nvmem-cell-names: 109fac71e4eSEmmanuel Vadot items: 110fac71e4eSEmmanuel Vadot - const: speed-bin 111fac71e4eSEmmanuel Vadot 112fac71e4eSEmmanuel Vadot nvmem-cells: 113fac71e4eSEmmanuel Vadot maxItems: 1 114fac71e4eSEmmanuel Vadot 115c66ec88fSEmmanuel Vadotrequired: 116c66ec88fSEmmanuel Vadot - compatible 117c66ec88fSEmmanuel Vadot - reg 118c66ec88fSEmmanuel Vadot - interrupts 119c66ec88fSEmmanuel Vadot - interrupt-names 120c66ec88fSEmmanuel Vadot - clocks 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel VadotadditionalProperties: false 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel VadotallOf: 125c66ec88fSEmmanuel Vadot - if: 126c66ec88fSEmmanuel Vadot properties: 127c66ec88fSEmmanuel Vadot compatible: 128c66ec88fSEmmanuel Vadot contains: 129c66ec88fSEmmanuel Vadot const: amlogic,meson-g12a-mali 130c66ec88fSEmmanuel Vadot then: 131fac71e4eSEmmanuel Vadot properties: 132fac71e4eSEmmanuel Vadot power-domains: 133fac71e4eSEmmanuel Vadot maxItems: 1 134fac71e4eSEmmanuel Vadot power-domain-names: false 135c66ec88fSEmmanuel Vadot required: 136c66ec88fSEmmanuel Vadot - resets 1375956d97fSEmmanuel Vadot - if: 1385956d97fSEmmanuel Vadot properties: 1395956d97fSEmmanuel Vadot compatible: 1405956d97fSEmmanuel Vadot contains: 141c9ccf3a3SEmmanuel Vadot enum: 142c9ccf3a3SEmmanuel Vadot - renesas,r9a07g044-mali 143c9ccf3a3SEmmanuel Vadot - renesas,r9a07g054-mali 144e67e8565SEmmanuel Vadot then: 145e67e8565SEmmanuel Vadot properties: 146e67e8565SEmmanuel Vadot interrupts: 147e67e8565SEmmanuel Vadot minItems: 4 148e67e8565SEmmanuel Vadot interrupt-names: 149e67e8565SEmmanuel Vadot minItems: 4 150e67e8565SEmmanuel Vadot clocks: 151e67e8565SEmmanuel Vadot minItems: 3 152e67e8565SEmmanuel Vadot clock-names: 153e67e8565SEmmanuel Vadot items: 154e67e8565SEmmanuel Vadot - const: gpu 155e67e8565SEmmanuel Vadot - const: bus 156e67e8565SEmmanuel Vadot - const: bus_ace 157fac71e4eSEmmanuel Vadot power-domains: 158fac71e4eSEmmanuel Vadot maxItems: 1 159fac71e4eSEmmanuel Vadot power-domain-names: false 160e67e8565SEmmanuel Vadot resets: 161e67e8565SEmmanuel Vadot minItems: 3 162e67e8565SEmmanuel Vadot reset-names: 163e67e8565SEmmanuel Vadot items: 164e67e8565SEmmanuel Vadot - const: rst 165e67e8565SEmmanuel Vadot - const: axi_rst 166e67e8565SEmmanuel Vadot - const: ace_rst 167e67e8565SEmmanuel Vadot required: 168e67e8565SEmmanuel Vadot - clock-names 169e67e8565SEmmanuel Vadot - power-domains 170e67e8565SEmmanuel Vadot - resets 171e67e8565SEmmanuel Vadot - reset-names 172e67e8565SEmmanuel Vadot - if: 173e67e8565SEmmanuel Vadot properties: 174e67e8565SEmmanuel Vadot compatible: 175e67e8565SEmmanuel Vadot contains: 1765956d97fSEmmanuel Vadot const: mediatek,mt8183-mali 1775956d97fSEmmanuel Vadot then: 1785956d97fSEmmanuel Vadot properties: 1795956d97fSEmmanuel Vadot power-domains: 1805956d97fSEmmanuel Vadot minItems: 3 181fac71e4eSEmmanuel Vadot maxItems: 3 1825956d97fSEmmanuel Vadot power-domain-names: 1835956d97fSEmmanuel Vadot items: 1845956d97fSEmmanuel Vadot - const: core0 1855956d97fSEmmanuel Vadot - const: core1 1865956d97fSEmmanuel Vadot - const: core2 1875956d97fSEmmanuel Vadot 1885956d97fSEmmanuel Vadot required: 1895956d97fSEmmanuel Vadot - sram-supply 1905956d97fSEmmanuel Vadot - power-domains 1915956d97fSEmmanuel Vadot - power-domain-names 1925956d97fSEmmanuel Vadot else: 1935956d97fSEmmanuel Vadot properties: 1945956d97fSEmmanuel Vadot sram-supply: false 195c9ccf3a3SEmmanuel Vadot - if: 196c9ccf3a3SEmmanuel Vadot properties: 197c9ccf3a3SEmmanuel Vadot compatible: 198c9ccf3a3SEmmanuel Vadot contains: 199*0e8011faSEmmanuel Vadot enum: 200*0e8011faSEmmanuel Vadot - mediatek,mt8183b-mali 201*0e8011faSEmmanuel Vadot - mediatek,mt8188-mali 202fac71e4eSEmmanuel Vadot then: 203fac71e4eSEmmanuel Vadot properties: 204fac71e4eSEmmanuel Vadot power-domains: 205fac71e4eSEmmanuel Vadot minItems: 3 206fac71e4eSEmmanuel Vadot maxItems: 3 207fac71e4eSEmmanuel Vadot power-domain-names: 208fac71e4eSEmmanuel Vadot items: 209fac71e4eSEmmanuel Vadot - const: core0 210fac71e4eSEmmanuel Vadot - const: core1 211fac71e4eSEmmanuel Vadot - const: core2 212fac71e4eSEmmanuel Vadot required: 213fac71e4eSEmmanuel Vadot - power-domains 214fac71e4eSEmmanuel Vadot - power-domain-names 215fac71e4eSEmmanuel Vadot - if: 216fac71e4eSEmmanuel Vadot properties: 217fac71e4eSEmmanuel Vadot compatible: 218fac71e4eSEmmanuel Vadot contains: 219fac71e4eSEmmanuel Vadot const: mediatek,mt8186-mali 220fac71e4eSEmmanuel Vadot then: 221fac71e4eSEmmanuel Vadot properties: 222fac71e4eSEmmanuel Vadot power-domains: 223fac71e4eSEmmanuel Vadot minItems: 2 224fac71e4eSEmmanuel Vadot maxItems: 2 225fac71e4eSEmmanuel Vadot power-domain-names: 226fac71e4eSEmmanuel Vadot items: 227fac71e4eSEmmanuel Vadot - const: core0 228fac71e4eSEmmanuel Vadot - const: core1 229fac71e4eSEmmanuel Vadot required: 230fac71e4eSEmmanuel Vadot - power-domains 231fac71e4eSEmmanuel Vadot - power-domain-names 232fac71e4eSEmmanuel Vadot - if: 233fac71e4eSEmmanuel Vadot properties: 234fac71e4eSEmmanuel Vadot compatible: 235fac71e4eSEmmanuel Vadot contains: 236fac71e4eSEmmanuel Vadot const: mediatek,mt8192-mali 237fac71e4eSEmmanuel Vadot then: 238fac71e4eSEmmanuel Vadot properties: 239fac71e4eSEmmanuel Vadot power-domains: 240fac71e4eSEmmanuel Vadot minItems: 5 241fac71e4eSEmmanuel Vadot power-domain-names: 242fac71e4eSEmmanuel Vadot items: 243fac71e4eSEmmanuel Vadot - const: core0 244fac71e4eSEmmanuel Vadot - const: core1 245fac71e4eSEmmanuel Vadot - const: core2 246fac71e4eSEmmanuel Vadot - const: core3 247fac71e4eSEmmanuel Vadot - const: core4 248fac71e4eSEmmanuel Vadot required: 249fac71e4eSEmmanuel Vadot - power-domains 250fac71e4eSEmmanuel Vadot - power-domain-names 251fac71e4eSEmmanuel Vadot - if: 252fac71e4eSEmmanuel Vadot properties: 253fac71e4eSEmmanuel Vadot compatible: 254fac71e4eSEmmanuel Vadot contains: 255c9ccf3a3SEmmanuel Vadot const: rockchip,rk3568-mali 256c9ccf3a3SEmmanuel Vadot then: 257c9ccf3a3SEmmanuel Vadot properties: 258c9ccf3a3SEmmanuel Vadot clocks: 259c9ccf3a3SEmmanuel Vadot minItems: 2 260c9ccf3a3SEmmanuel Vadot clock-names: 261c9ccf3a3SEmmanuel Vadot items: 262c9ccf3a3SEmmanuel Vadot - const: gpu 263c9ccf3a3SEmmanuel Vadot - const: bus 264fac71e4eSEmmanuel Vadot power-domains: 265fac71e4eSEmmanuel Vadot maxItems: 1 266fac71e4eSEmmanuel Vadot power-domain-names: false 267c9ccf3a3SEmmanuel Vadot required: 268c9ccf3a3SEmmanuel Vadot - clock-names 269c66ec88fSEmmanuel Vadot 270c66ec88fSEmmanuel Vadotexamples: 271c66ec88fSEmmanuel Vadot - | 272c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 273c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 274c66ec88fSEmmanuel Vadot 275c66ec88fSEmmanuel Vadot gpu@ffe40000 { 276c66ec88fSEmmanuel Vadot compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost"; 277c66ec88fSEmmanuel Vadot reg = <0xffe40000 0x10000>; 278c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 279c66ec88fSEmmanuel Vadot <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>, 280c66ec88fSEmmanuel Vadot <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>; 281c66ec88fSEmmanuel Vadot interrupt-names = "job", "mmu", "gpu"; 282c66ec88fSEmmanuel Vadot clocks = <&clk 1>; 283c66ec88fSEmmanuel Vadot mali-supply = <&vdd_gpu>; 284c66ec88fSEmmanuel Vadot operating-points-v2 = <&gpu_opp_table>; 285c66ec88fSEmmanuel Vadot resets = <&reset 0>, <&reset 1>; 286c66ec88fSEmmanuel Vadot }; 287c66ec88fSEmmanuel Vadot 288354d7675SEmmanuel Vadot gpu_opp_table: opp-table { 289c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 290c66ec88fSEmmanuel Vadot 291c66ec88fSEmmanuel Vadot opp-533000000 { 292c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <533000000>; 293c66ec88fSEmmanuel Vadot opp-microvolt = <1250000>; 294c66ec88fSEmmanuel Vadot }; 295c66ec88fSEmmanuel Vadot opp-450000000 { 296c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <450000000>; 297c66ec88fSEmmanuel Vadot opp-microvolt = <1150000>; 298c66ec88fSEmmanuel Vadot }; 299c66ec88fSEmmanuel Vadot opp-400000000 { 300c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <400000000>; 301c66ec88fSEmmanuel Vadot opp-microvolt = <1125000>; 302c66ec88fSEmmanuel Vadot }; 303c66ec88fSEmmanuel Vadot opp-350000000 { 304c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <350000000>; 305c66ec88fSEmmanuel Vadot opp-microvolt = <1075000>; 306c66ec88fSEmmanuel Vadot }; 307c66ec88fSEmmanuel Vadot opp-266000000 { 308c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <266000000>; 309c66ec88fSEmmanuel Vadot opp-microvolt = <1025000>; 310c66ec88fSEmmanuel Vadot }; 311c66ec88fSEmmanuel Vadot opp-160000000 { 312c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <160000000>; 313c66ec88fSEmmanuel Vadot opp-microvolt = <925000>; 314c66ec88fSEmmanuel Vadot }; 315c66ec88fSEmmanuel Vadot opp-100000000 { 316c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <100000000>; 317c66ec88fSEmmanuel Vadot opp-microvolt = <912500>; 318c66ec88fSEmmanuel Vadot }; 319c66ec88fSEmmanuel Vadot }; 320c66ec88fSEmmanuel Vadot 321c66ec88fSEmmanuel Vadot... 322