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