summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
blob: a5b4e00217587c5d1f889094e2fff7b76e6148eb (plain)
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
# 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:
              - 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
      - const: coregroup
      - const: stacks

  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
  - mali-supply

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3588-mali
    then:
      properties:
        clocks:
          minItems: 3
        power-domains:
          maxItems: 1
        power-domain-names: false

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>;
            };
        };
    };

...