1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (c) 2023 Imagination Technologies Ltd.
3# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
4%YAML 1.2
5---
6$id: http://devicetree.org/schemas/gpu/img,powervr-sgx.yaml#
7$schema: http://devicetree.org/meta-schemas/core.yaml#
8
9title: Imagination Technologies PowerVR SGX GPUs
10
11maintainers:
12  - Frank Binns <frank.binns@imgtec.com>
13
14properties:
15  compatible:
16    oneOf:
17      - items:
18          - enum:
19              - ti,omap3430-gpu # Rev 121
20              - ti,omap3630-gpu # Rev 125
21          - const: img,powervr-sgx530
22      - items:
23          - enum:
24              - ingenic,jz4780-gpu # Rev 130
25              - ti,omap4430-gpu # Rev 120
26          - const: img,powervr-sgx540
27      - items:
28          - enum:
29              - allwinner,sun6i-a31-gpu # MP2 Rev 115
30              - ti,omap4470-gpu # MP1 Rev 112
31              - ti,omap5432-gpu # MP2 Rev 105
32              - ti,am5728-gpu # MP2 Rev 116
33              - ti,am6548-gpu # MP1 Rev 117
34          - const: img,powervr-sgx544
35
36  reg:
37    maxItems: 1
38
39  interrupts:
40    maxItems: 1
41
42  clocks:
43    minItems: 1
44    maxItems: 3
45
46  clock-names:
47    minItems: 1
48    items:
49      - const: core
50      - const: mem
51      - const: sys
52
53  power-domains:
54    maxItems: 1
55
56required:
57  - compatible
58  - reg
59  - interrupts
60
61allOf:
62  - if:
63      properties:
64        compatible:
65          contains:
66            const: ti,am6548-gpu
67    then:
68      required:
69        - power-domains
70    else:
71      properties:
72        power-domains: false
73  - if:
74      properties:
75        compatible:
76          contains:
77            enum:
78              - allwinner,sun6i-a31-gpu
79              - ingenic,jz4780-gpu
80    then:
81      required:
82        - clocks
83        - clock-names
84    else:
85      properties:
86        clocks: false
87        clock-names: false
88  - if:
89      properties:
90        compatible:
91          contains:
92            const: allwinner,sun6i-a31-gpu
93    then:
94      properties:
95        clocks:
96          minItems: 2
97          maxItems: 2
98        clock-names:
99          minItems: 2
100          maxItems: 2
101  - if:
102      properties:
103        compatible:
104          contains:
105            const: ingenic,jz4780-gpu
106    then:
107      properties:
108        clocks:
109          maxItems: 1
110        clock-names:
111          maxItems: 1
112
113additionalProperties: false
114
115examples:
116  - |
117    #include <dt-bindings/interrupt-controller/irq.h>
118    #include <dt-bindings/interrupt-controller/arm-gic.h>
119    #include <dt-bindings/soc/ti,sci_pm_domain.h>
120
121    gpu@7000000 {
122        compatible = "ti,am6548-gpu", "img,powervr-sgx544";
123        reg = <0x7000000 0x10000>;
124        interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
125        power-domains = <&k3_pds 65 TI_SCI_PD_EXCLUSIVE>;
126    };
127
128  - |
129    #include <dt-bindings/interrupt-controller/irq.h>
130    #include <dt-bindings/interrupt-controller/arm-gic.h>
131
132    gpu: gpu@1c40000 {
133        compatible = "allwinner,sun6i-a31-gpu", "img,powervr-sgx544";
134        reg = <0x01c40000 0x10000>;
135        interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
136        clocks = <&ccu 1>, <&ccu 2>;
137        clock-names = "core", "mem";
138    };
139