Merge tag 'pinctrl-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-block.git] / Documentation / devicetree / bindings / soc / rockchip / grf.yaml
CommitLineData
2ed2732e
JJ
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/rockchip/grf.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Rockchip General Register Files (GRF)
8
9maintainers:
10 - Heiko Stuebner <heiko@sntech.de>
11
12properties:
13 compatible:
14 oneOf:
15 - items:
16 - enum:
17 - rockchip,rk3288-sgrf
2a872dd8 18 - rockchip,rk3566-pipe-grf
4e441643 19 - rockchip,rk3568-pcie3-phy-grf
8a1b63b1
JJ
20 - rockchip,rk3568-pipe-grf
21 - rockchip,rk3568-pipe-phy-grf
7dbb47d6 22 - rockchip,rk3568-usb2phy-grf
306f74d2
SR
23 - rockchip,rk3588-bigcore0-grf
24 - rockchip,rk3588-bigcore1-grf
738227ab 25 - rockchip,rk3588-hdptxphy-grf
306f74d2
SR
26 - rockchip,rk3588-ioc
27 - rockchip,rk3588-php-grf
ea85370d 28 - rockchip,rk3588-pipe-phy-grf
306f74d2 29 - rockchip,rk3588-sys-grf
4e441643
FW
30 - rockchip,rk3588-pcie3-phy-grf
31 - rockchip,rk3588-pcie3-pipe-grf
85a33544
SR
32 - rockchip,rk3588-usb-grf
33 - rockchip,rk3588-usbdpphy-grf
1a648f8b
AY
34 - rockchip,rk3588-vo-grf
35 - rockchip,rk3588-vop-grf
2ed2732e
JJ
36 - rockchip,rv1108-usbgrf
37 - const: syscon
38 - items:
39 - enum:
40 - rockchip,px30-grf
41 - rockchip,px30-pmugrf
42 - rockchip,px30-usb2phy-grf
43 - rockchip,rk3036-grf
44 - rockchip,rk3066-grf
adc4f190 45 - rockchip,rk3128-grf
2ed2732e
JJ
46 - rockchip,rk3188-grf
47 - rockchip,rk3228-grf
48 - rockchip,rk3288-grf
49 - rockchip,rk3308-core-grf
50 - rockchip,rk3308-detect-grf
51 - rockchip,rk3308-grf
da76290f 52 - rockchip,rk3308-usb2phy-grf
2ed2732e
JJ
53 - rockchip,rk3328-grf
54 - rockchip,rk3328-usb2phy-grf
55 - rockchip,rk3368-grf
56 - rockchip,rk3368-pmugrf
57 - rockchip,rk3399-grf
58 - rockchip,rk3399-pmugrf
59 - rockchip,rk3568-grf
60 - rockchip,rk3568-pmugrf
7224aefb 61 - rockchip,rk3588-usb2phy-grf
2ed2732e 62 - rockchip,rv1108-grf
959e131f 63 - rockchip,rv1108-pmugrf
26d8b279 64 - rockchip,rv1126-grf
614ce48b 65 - rockchip,rv1126-pmugrf
2ed2732e
JJ
66 - const: syscon
67 - const: simple-mfd
68
69 reg:
70 maxItems: 1
71
c110b7e2
SR
72 clocks:
73 maxItems: 1
74
2ed2732e
JJ
75 "#address-cells":
76 const: 1
77
78 "#size-cells":
79 const: 1
80
81required:
82 - compatible
83 - reg
84
85additionalProperties:
86 type: object
87
88allOf:
89 - if:
90 properties:
91 compatible:
92 contains:
cbfc73a3
JJ
93 enum:
94 - rockchip,px30-grf
2ed2732e
JJ
95
96 then:
97 properties:
98 lvds:
cbfc73a3
JJ
99 type: object
100
101 $ref: /schemas/display/rockchip/rockchip,lvds.yaml#
102
103 unevaluatedProperties: false
2ed2732e
JJ
104
105 - if:
106 properties:
107 compatible:
108 contains:
109 const: rockchip,rk3288-grf
110
111 then:
112 properties:
113 edp-phy:
51b20892
JJ
114 type: object
115 $ref: /schemas/phy/rockchip,rk3288-dp-phy.yaml#
116 unevaluatedProperties: false
2ed2732e
JJ
117
118 - if:
119 properties:
120 compatible:
121 contains:
122 enum:
123 - rockchip,rk3066-grf
124 - rockchip,rk3188-grf
125 - rockchip,rk3288-grf
126
127 then:
128 properties:
129 usbphy:
130 type: object
131
0d36b50e 132 $ref: /schemas/phy/rockchip-usb-phy.yaml#
2ed2732e
JJ
133
134 unevaluatedProperties: false
135
136 - if:
137 properties:
138 compatible:
139 contains:
140 const: rockchip,rk3328-grf
141
142 then:
143 properties:
144 gpio:
145 type: object
146
0d36b50e 147 $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml#
2ed2732e
JJ
148
149 unevaluatedProperties: false
150
151 power-controller:
152 type: object
153
0d36b50e 154 $ref: /schemas/power/rockchip,power-controller.yaml#
2ed2732e
JJ
155
156 unevaluatedProperties: false
157
158 - if:
159 properties:
160 compatible:
161 contains:
162 const: rockchip,rk3399-grf
163
164 then:
165 properties:
166 mipi-dphy-rx0:
167 type: object
168
0d36b50e 169 $ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml#
2ed2732e
JJ
170
171 unevaluatedProperties: false
172
173 pcie-phy:
d41201c9 174 type: object
2ed2732e
JJ
175 description:
176 Documentation/devicetree/bindings/phy/rockchip-pcie-phy.txt
177
178 patternProperties:
179 "phy@[0-9a-f]+$":
180 description:
181 Documentation/devicetree/bindings/phy/rockchip-emmc-phy.txt
182
183 - if:
184 properties:
185 compatible:
186 contains:
187 enum:
188 - rockchip,px30-pmugrf
189 - rockchip,rk3036-grf
190 - rockchip,rk3308-grf
191 - rockchip,rk3368-pmugrf
192
193 then:
194 properties:
195 reboot-mode:
196 type: object
197
0d36b50e 198 $ref: /schemas/power/reset/syscon-reboot-mode.yaml#
2ed2732e
JJ
199
200 unevaluatedProperties: false
201
202 - if:
203 properties:
204 compatible:
205 contains:
206 enum:
207 - rockchip,px30-usb2phy-grf
adc4f190 208 - rockchip,rk3128-grf
2ed2732e 209 - rockchip,rk3228-grf
da76290f 210 - rockchip,rk3308-usb2phy-grf
2ed2732e
JJ
211 - rockchip,rk3328-usb2phy-grf
212 - rockchip,rk3399-grf
7224aefb 213 - rockchip,rk3588-usb2phy-grf
2ed2732e
JJ
214 - rockchip,rv1108-grf
215
216 then:
217 required:
218 - "#address-cells"
219 - "#size-cells"
220
221 patternProperties:
e71ccdff 222 "usb2phy@[0-9a-f]+$":
2ed2732e
JJ
223 type: object
224
0f48b0ed 225 $ref: /schemas/phy/rockchip,inno-usb2phy.yaml#
2ed2732e
JJ
226
227 unevaluatedProperties: false
228
229 - if:
230 properties:
231 compatible:
232 contains:
233 enum:
2ed2732e 234 - rockchip,px30-grf
959e131f
JJ
235 - rockchip,px30-pmugrf
236 - rockchip,rk3188-grf
2ed2732e
JJ
237 - rockchip,rk3228-grf
238 - rockchip,rk3288-grf
239 - rockchip,rk3328-grf
2ed2732e 240 - rockchip,rk3368-grf
959e131f 241 - rockchip,rk3368-pmugrf
2ed2732e 242 - rockchip,rk3399-grf
959e131f 243 - rockchip,rk3399-pmugrf
fadbd4e7 244 - rockchip,rk3568-pmugrf
2a842c4e 245 - rockchip,rk3588-pmugrf
959e131f
JJ
246 - rockchip,rv1108-grf
247 - rockchip,rv1108-pmugrf
2ed2732e
JJ
248
249 then:
250 properties:
251 io-domains:
959e131f
JJ
252 type: object
253
0d36b50e 254 $ref: /schemas/power/rockchip-io-domain.yaml#
959e131f
JJ
255
256 unevaluatedProperties: false
2ed2732e 257
c110b7e2
SR
258 - if:
259 properties:
260 compatible:
261 contains:
262 enum:
263 - rockchip,rk3588-vo-grf
264
265 then:
266 required:
267 - clocks
268
269 else:
270 properties:
271 clocks: false
272
273
2ed2732e
JJ
274examples:
275 - |
276 #include <dt-bindings/clock/rk3399-cru.h>
277 #include <dt-bindings/interrupt-controller/arm-gic.h>
278 #include <dt-bindings/power/rk3399-power.h>
279 grf: syscon@ff770000 {
280 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
281 reg = <0xff770000 0x10000>;
282 #address-cells = <1>;
283 #size-cells = <1>;
284
285 mipi_dphy_rx0: mipi-dphy-rx0 {
286 compatible = "rockchip,rk3399-mipi-dphy-rx0";
287 clocks = <&cru SCLK_MIPIDPHY_REF>,
288 <&cru SCLK_DPHY_RX0_CFG>,
289 <&cru PCLK_VIO_GRF>;
290 clock-names = "dphy-ref", "dphy-cfg", "grf";
291 power-domains = <&power RK3399_PD_VIO>;
292 #phy-cells = <0>;
293 };
294
e71ccdff 295 u2phy0: usb2phy@e450 {
2ed2732e
JJ
296 compatible = "rockchip,rk3399-usb2phy";
297 reg = <0xe450 0x10>;
298 clocks = <&cru SCLK_USB2PHY0_REF>;
299 clock-names = "phyclk";
300 #clock-cells = <0>;
301 clock-output-names = "clk_usbphy0_480m";
2ed2732e
JJ
302
303 u2phy0_host: host-port {
304 #phy-cells = <0>;
305 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
306 interrupt-names = "linestate";
307 };
308
309 u2phy0_otg: otg-port {
310 #phy-cells = <0>;
311 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
312 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
313 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
314 interrupt-names = "otg-bvalid", "otg-id",
315 "linestate";
316 };
317 };
318 };