Documentation / devicetree / bindings / gpu / arm,mali-valhall-csf.yaml


Based on kernel version 7.0. Page generated on 2026-04-23 09:48 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpu/arm,mali-valhall-csf.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ARM Mali Valhall GPU

maintainers:
  - Liviu Dudau <liviu.dudau@arm.com>
  - Boris Brezillon <boris.brezillon@collabora.com>

properties:
  $nodename:
    pattern: '^gpu@[a-f0-9]+$'

  compatible:
    oneOf:
      - items:
          - enum:
              - mediatek,mt8196-mali
              - nxp,imx95-mali            # G310
              - rockchip,rk3588-mali
          - const: arm,mali-valhall-csf   # Mali Valhall GPU model/revision is fully discoverable

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: Job interrupt
      - description: MMU interrupt
      - description: GPU interrupt

  interrupt-names:
    items:
      - const: job
      - const: mmu
      - const: gpu

  clocks:
    minItems: 1
    maxItems: 3

  clock-names:
    minItems: 1
    items:
      - const: core
      - enum:
          - coregroup
          - stacks
      - const: stacks

  nvmem-cells:
    items:
      - description: bitmask of functional shader cores

  nvmem-cell-names:
    items:
      - const: shader-present

  mali-supply: true

  operating-points-v2: true
  opp-table:
    type: object

  power-domains:
    minItems: 1
    maxItems: 5

  power-domain-names:
    minItems: 1
    maxItems: 5

  sram-supply: true
 
  "#cooling-cells":
    const: 2

  dynamic-power-coefficient:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      A u32 value that represents the running time dynamic
      power coefficient in units of uW/MHz/V^2. The
      coefficient can either be calculated from power
      measurements or derived by analysis.
 
      The dynamic power consumption of the GPU is
      proportional to the square of the Voltage (V) and
      the clock frequency (f). The coefficient is used to
      calculate the dynamic power as below -
 
      Pdyn = dynamic-power-coefficient * V^2 * f
 
      where voltage is in V, frequency is in MHz.

  dma-coherent: true

required:
  - compatible
  - reg
  - interrupts
  - interrupt-names
  - clocks

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3588-mali
    then:
      properties:
        clocks:
          minItems: 3
        nvmem-cells: false
        nvmem-cell-names: false
        power-domains:
          maxItems: 1
        power-domain-names: false
      required:
        - mali-supply
  - if:
      properties:
        compatible:
          contains:
            const: mediatek,mt8196-mali
    then:
      properties:
        mali-supply: false
        sram-supply: false
        operating-points-v2: false
        power-domains:
          maxItems: 1
        power-domain-names: false
        clocks:
          maxItems: 2
        clock-names:
          items:
            - const: core
            - const: stacks
      required:
        - nvmem-cells
        - nvmem-cell-names
        - power-domains

examples:
  - |
    #include <dt-bindings/clock/rockchip,rk3588-cru.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/rk3588-power.h>
 
    gpu: gpu@fb000000 {
        compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf";
        reg = <0xfb000000 0x200000>;
        interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH 0>,
                     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH 0>,
                     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH 0>;
        interrupt-names = "job", "mmu", "gpu";
        clock-names = "core", "coregroup", "stacks";
        clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
                 <&cru CLK_GPU_STACKS>;
        power-domains = <&power RK3588_PD_GPU>;
        operating-points-v2 = <&gpu_opp_table>;
        mali-supply = <&vdd_gpu_s0>;
        sram-supply = <&vdd_gpu_mem_s0>;
 
        gpu_opp_table: opp-table {
            compatible = "operating-points-v2";
            opp-300000000 {
                opp-hz = /bits/ 64 <300000000>;
                opp-microvolt = <675000 675000 850000>;
            };
            opp-400000000 {
                opp-hz = /bits/ 64 <400000000>;
                opp-microvolt = <675000 675000 850000>;
            };
        };
    };
  - |
    gpu@48000000 {
        compatible = "mediatek,mt8196-mali", "arm,mali-valhall-csf";
        reg = <0x48000000 0x480000>;
        clocks = <&gpufreq 0>, <&gpufreq 1>;
        clock-names = "core", "stacks";
        interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH 0>,
                     <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH 0>,
                     <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH 0>;
        interrupt-names = "job", "mmu", "gpu";
        nvmem-cells = <&shader_present>;
        nvmem-cell-names = "shader-present";
        power-domains = <&gpufreq>;
    };

...