summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
blob: 53708fe9e0047abec626cd680e3ae02566ecc8e6 (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
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
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpu/arm,mali-utgard.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ARM Mali Utgard GPU

maintainers:
  - Rob Herring <robh@kernel.org>
  - Maxime Ripard <mripard@kernel.org>
  - Heiko Stuebner <heiko@sntech.de>

properties:
  $nodename:
    pattern: '^gpu@[a-f0-9]+$'
  compatible:
    oneOf:
      - items:
          - const: allwinner,sun8i-a23-mali
          - const: allwinner,sun7i-a20-mali
          - const: arm,mali-400
      - items:
          - enum:
              - allwinner,sun4i-a10-mali
              - allwinner,sun7i-a20-mali
              - allwinner,sun8i-h3-mali
              - allwinner,sun50i-a64-mali
              - rockchip,rk3036-mali
              - rockchip,rk3066-mali
              - rockchip,rk3188-mali
              - rockchip,rk3228-mali
              - samsung,exynos4210-mali
              - stericsson,db8500-mali
          - const: arm,mali-400
      - items:
          - enum:
              - allwinner,sun50i-h5-mali
              - amlogic,meson8-mali
              - amlogic,meson8b-mali
              - amlogic,meson-gxbb-mali
              - amlogic,meson-gxl-mali
              - hisilicon,hi6220-mali
              - mediatek,mt7623-mali
              - rockchip,rk3328-mali
          - const: arm,mali-450

      # "arm,mali-300"

  reg:
    maxItems: 1

  interrupts:
    minItems: 4
    maxItems: 20

  interrupt-names:
    allOf:
      - additionalItems: true
        minItems: 4
        maxItems: 20
        items:
          # At least enforce the first 2 interrupts
          - const: gp
          - const: gpmmu
      - items:
          # Not ideal as any order and combination are allowed
          enum:
            - gp        # Geometry Processor interrupt
            - gpmmu     # Geometry Processor MMU interrupt
            - pp        # Pixel Processor broadcast interrupt (mali-450 only)
            - pp0       # Pixel Processor X interrupt (X from 0 to 7)
            - ppmmu0    # Pixel Processor X MMU interrupt (X from 0 to 7)
            - pp1
            - ppmmu1
            - pp2
            - ppmmu2
            - pp3
            - ppmmu3
            - pp4
            - ppmmu4
            - pp5
            - ppmmu5
            - pp6
            - ppmmu6
            - pp7
            - ppmmu7
            - pmu       # Power Management Unit interrupt (optional)
            - combined  # stericsson,db8500-mali only

  clocks:
    maxItems: 2

  clock-names:
    items:
      - const: bus
      - const: core

  memory-region: true

  mali-supply: true

  opp-table: true

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  operating-points-v2: true

  "#cooling-cells":
    const: 2

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

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - allwinner,sun4i-a10-mali
              - allwinner,sun7i-a20-mali
              - allwinner,sun50i-a64-mali
              - allwinner,sun50i-h5-mali
              - amlogic,meson8-mali
              - amlogic,meson8b-mali
              - hisilicon,hi6220-mali
              - mediatek,mt7623-mali
              - rockchip,rk3036-mali
              - rockchip,rk3066-mali
              - rockchip,rk3188-mali
              - rockchip,rk3228-mali
              - rockchip,rk3328-mali
    then:
      required:
        - resets

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    mali: gpu@1c40000 {
      compatible = "allwinner,sun7i-a20-mali", "arm,mali-400";
      reg = <0x01c40000 0x10000>;
      interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
             <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
      interrupt-names = "gp",
            "gpmmu",
            "pp0",
            "ppmmu0",
            "pp1",
            "ppmmu1",
            "pmu";
      clocks = <&ccu 1>, <&ccu 2>;
      clock-names = "bus", "core";
      resets = <&ccu 1>;
      #cooling-cells = <2>;
    };

...