Commit | Line | Data |
---|---|---|
fce152a6 | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
15306b75 JT |
2 | /* |
3 | * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com> | |
15306b75 JT |
4 | */ |
5 | ||
6 | /dts-v1/; | |
7 | #include "rk3288.dtsi" | |
8 | ||
9 | / { | |
10 | model = "Amarula Vyasa-RK3288"; | |
11 | compatible = "amarula,vyasa-rk3288", "rockchip,rk3288"; | |
12 | ||
13 | chosen { | |
14 | stdout-path = &uart2; | |
15 | }; | |
16 | ||
17 | memory { | |
18 | reg = <0x0 0x0 0x0 0x80000000>; | |
19 | device_type = "memory"; | |
20 | }; | |
21 | ||
8f6fc824 JT |
22 | dc12_vbat: dc12-vbat { |
23 | compatible = "regulator-fixed"; | |
24 | regulator-name = "dc12_vbat"; | |
25 | regulator-min-microvolt = <12000000>; | |
26 | regulator-max-microvolt = <12000000>; | |
27 | regulator-always-on; | |
28 | regulator-boot-on; | |
29 | }; | |
30 | ||
31 | vboot_3v3: vboot-3v3 { | |
32 | compatible = "regulator-fixed"; | |
33 | regulator-name = "vboot_3v3"; | |
34 | regulator-min-microvolt = <3300000>; | |
35 | regulator-max-microvolt = <3300000>; | |
36 | regulator-always-on; | |
37 | regulator-boot-on; | |
38 | vin-supply = <&dc12_vbat>; | |
39 | }; | |
40 | ||
15306b75 JT |
41 | vcc_sys: vsys-regulator { |
42 | compatible = "regulator-fixed"; | |
43 | regulator-name = "vcc_sys"; | |
8f6fc824 JT |
44 | regulator-min-microvolt = <3700000>; |
45 | regulator-max-microvolt = <3700000>; | |
46 | regulator-always-on; | |
47 | regulator-boot-on; | |
48 | vin-supply = <&dc12_vbat>; | |
49 | }; | |
50 | ||
51 | vboot_5v: vboot-5v { | |
52 | compatible = "regulator-fixed"; | |
53 | regulator-name = "vboot_sv"; | |
15306b75 JT |
54 | regulator-min-microvolt = <5000000>; |
55 | regulator-max-microvolt = <5000000>; | |
56 | regulator-always-on; | |
57 | regulator-boot-on; | |
8f6fc824 JT |
58 | vin-supply = <&dc12_vbat>; |
59 | }; | |
60 | ||
61 | v3g_3v3: v3g-3v3 { | |
62 | compatible = "regulator-fixed"; | |
63 | regulator-name = "v3g_3v3"; | |
64 | regulator-min-microvolt = <3300000>; | |
65 | regulator-max-microvolt = <3300000>; | |
66 | regulator-always-on; | |
67 | regulator-boot-on; | |
68 | vin-supply = <&dc12_vbat>; | |
15306b75 | 69 | }; |
c09cd253 | 70 | |
ba736024 JT |
71 | vsus_5v: vsus-5v { |
72 | compatible = "regulator-fixed"; | |
73 | regulator-name = "vsus_5v"; | |
74 | regulator-min-microvolt = <5000000>; | |
75 | regulator-max-microvolt = <5000000>; | |
76 | regulator-always-on; | |
77 | regulator-boot-on; | |
78 | vin-supply = <&vcc_io>; | |
79 | }; | |
80 | ||
4ed1bc39 JT |
81 | vusb1_5v: vusb1-5v { |
82 | compatible = "regulator-fixed"; | |
83 | regulator-name = "vusb1_5v"; | |
84 | enable-active-high; | |
85 | gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; /* OTG_VBUS_DRV */ | |
86 | pinctrl-names = "default"; | |
87 | pinctrl-0 = <&otg_vbus_drv>; | |
88 | regulator-min-microvolt = <5000000>; | |
89 | regulator-max-microvolt = <5000000>; | |
90 | regulator-always-on; | |
91 | regulator-boot-on; | |
92 | vin-supply = <&vsus_5v>; | |
93 | }; | |
94 | ||
ba736024 JT |
95 | vusb2_5v: vusb2-5v { |
96 | compatible = "regulator-fixed"; | |
97 | regulator-name = "vusb2_5v"; | |
98 | enable-active-high; | |
99 | gpio = <&gpio8 RK_PB1 GPIO_ACTIVE_HIGH>; /* USB2_PWR_EN */ | |
100 | pinctrl-names = "default"; | |
101 | pinctrl-0 = <&usb2_pwr_en>; | |
102 | regulator-min-microvolt = <5000000>; | |
103 | regulator-max-microvolt = <5000000>; | |
104 | regulator-always-on; | |
105 | regulator-boot-on; | |
106 | vin-supply = <&vsus_5v>; | |
107 | }; | |
108 | ||
c09cd253 JT |
109 | ext_gmac: external-gmac-clock { |
110 | compatible = "fixed-clock"; | |
111 | #clock-cells = <0>; | |
112 | clock-frequency = <125000000>; | |
113 | clock-output-names = "ext_gmac"; | |
114 | }; | |
15306b75 JT |
115 | }; |
116 | ||
117 | &cpu0 { | |
118 | cpu0-supply = <&vdd_cpu>; | |
119 | }; | |
120 | ||
f9bc50c7 JT |
121 | &emmc { |
122 | bus-width = <8>; | |
123 | cap-mmc-highspeed; | |
124 | disable-wp; | |
125 | non-removable; | |
126 | pinctrl-names = "default"; | |
127 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; | |
128 | vmmc-supply = <&vcc_io>; | |
129 | status = "okay"; | |
130 | }; | |
131 | ||
c09cd253 JT |
132 | &gmac { |
133 | assigned-clocks = <&cru SCLK_MAC>; | |
134 | assigned-clock-parents = <&ext_gmac>; | |
135 | clock_in_out = "input"; | |
136 | pinctrl-names = "default"; | |
137 | pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; | |
138 | phy-supply = <&vcc_lan>; | |
139 | phy-mode = "rgmii"; | |
140 | snps,reset-active-low; | |
141 | snps,reset-delays-us = <0 10000 1000000>; | |
142 | snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>; | |
143 | tx_delay = <0x30>; | |
144 | rx_delay = <0x10>; | |
145 | status = "okay"; | |
146 | }; | |
147 | ||
c4d6204f JT |
148 | &gpu { |
149 | mali-supply = <&vdd_gpu>; | |
150 | status = "okay"; | |
151 | }; | |
152 | ||
7d705c2a JT |
153 | &hdmi { |
154 | ddc-i2c-bus = <&i2c2>; | |
155 | status = "okay"; | |
156 | }; | |
157 | ||
15306b75 JT |
158 | &i2c0 { |
159 | clock-frequency = <400000>; | |
160 | status = "okay"; | |
161 | ||
162 | rk808: pmic@1b { | |
163 | compatible = "rockchip,rk808"; | |
164 | reg = <0x1b>; | |
165 | interrupt-parent = <&gpio0>; | |
166 | interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>; | |
167 | #clock-cells = <1>; | |
168 | clock-output-names = "xin32k", "rk808-clkout2"; | |
169 | pinctrl-names = "default"; | |
170 | pinctrl-0 = <&pmic_int &global_pwroff>; | |
171 | rockchip,system-power-controller; | |
172 | wakeup-source; | |
173 | ||
174 | vcc1-supply = <&vcc_sys>; | |
175 | vcc2-supply = <&vcc_sys>; | |
176 | vcc3-supply = <&vcc_sys>; | |
177 | vcc4-supply = <&vcc_sys>; | |
178 | vcc6-supply = <&vcc_sys>; | |
179 | vcc7-supply = <&vcc_sys>; | |
180 | vcc8-supply = <&vcc_io>; | |
181 | vcc9-supply = <&vcc_sys>; | |
182 | vcc10-supply = <&vcc_sys>; | |
183 | vcc11-supply = <&vcc_sys>; | |
184 | vcc12-supply = <&vcc_io>; | |
185 | ||
186 | regulators { | |
598ed15f JT |
187 | vdd_cpu: DCDC_REG1 { |
188 | regulator-name = "vdd_arm"; | |
15306b75 JT |
189 | regulator-min-microvolt = <750000>; |
190 | regulator-max-microvolt = <1350000>; | |
191 | regulator-always-on; | |
192 | regulator-boot-on; | |
193 | regulator-state-mem { | |
194 | regulator-off-in-suspend; | |
195 | }; | |
196 | }; | |
197 | ||
198 | vdd_gpu: DCDC_REG2 { | |
199 | regulator-name = "vdd_gpu"; | |
200 | regulator-min-microvolt = <850000>; | |
201 | regulator-max-microvolt = <1250000>; | |
202 | regulator-always-on; | |
203 | regulator-boot-on; | |
204 | regulator-state-mem { | |
205 | regulator-on-in-suspend; | |
206 | regulator-suspend-microvolt = <1000000>; | |
207 | }; | |
208 | }; | |
209 | ||
210 | vcc_ddr: DCDC_REG3 { | |
211 | regulator-name = "vcc_ddr"; | |
212 | regulator-always-on; | |
213 | regulator-boot-on; | |
214 | regulator-state-mem { | |
215 | regulator-on-in-suspend; | |
216 | }; | |
217 | }; | |
218 | ||
219 | vcc_io: DCDC_REG4 { | |
220 | regulator-name = "vcc_io"; | |
221 | regulator-min-microvolt = <3300000>; | |
222 | regulator-max-microvolt = <3300000>; | |
223 | regulator-always-on; | |
224 | regulator-boot-on; | |
225 | regulator-state-mem { | |
226 | regulator-on-in-suspend; | |
227 | regulator-suspend-microvolt = <3300000>; | |
228 | }; | |
229 | }; | |
230 | ||
231 | vcca_tp: LDO_REG1 { | |
232 | regulator-name = "vcc_tp"; | |
233 | regulator-min-microvolt = <3300000>; | |
234 | regulator-max-microvolt = <3300000>; | |
235 | regulator-always-on; | |
236 | regulator-boot-on; | |
237 | regulator-state-mem { | |
238 | regulator-on-in-suspend; | |
239 | regulator-suspend-microvolt = <3300000>; | |
240 | }; | |
241 | }; | |
242 | ||
243 | vcc_codec: LDO_REG2 { | |
244 | regulator-name = "vcc_codec"; | |
245 | regulator-min-microvolt = <3300000>; | |
246 | regulator-max-microvolt = <3300000>; | |
247 | regulator-always-on; | |
248 | regulator-boot-on; | |
249 | regulator-state-mem { | |
250 | regulator-off-in-suspend; | |
251 | }; | |
252 | }; | |
253 | ||
254 | vdd_10: LDO_REG3 { | |
255 | regulator-name = "vdd_10"; | |
256 | regulator-min-microvolt = <1000000>; | |
257 | regulator-max-microvolt = <1000000>; | |
258 | regulator-always-on; | |
259 | regulator-boot-on; | |
260 | regulator-state-mem { | |
261 | regulator-on-in-suspend; | |
262 | regulator-suspend-microvolt = <1000000>; | |
263 | }; | |
264 | }; | |
265 | ||
266 | vcc_gps: LDO_REG4 { | |
267 | regulator-name = "vcc_gps"; | |
268 | regulator-min-microvolt = <1800000>; | |
269 | regulator-max-microvolt = <1800000>; | |
270 | regulator-always-on; | |
271 | regulator-boot-on; | |
272 | regulator-state-mem { | |
273 | regulator-on-in-suspend; | |
274 | regulator-suspend-microvolt = <1800000>; | |
275 | }; | |
276 | }; | |
277 | ||
278 | vccio_sd: LDO_REG5 { | |
279 | regulator-name = "vccio_sd"; | |
280 | regulator-min-microvolt = <1800000>; | |
281 | regulator-max-microvolt = <3300000>; | |
282 | regulator-always-on; | |
283 | regulator-boot-on; | |
284 | regulator-state-mem { | |
285 | regulator-on-in-suspend; | |
286 | regulator-suspend-microvolt = <3300000>; | |
287 | }; | |
288 | }; | |
289 | ||
290 | vcc10_lcd: LDO_REG6 { | |
291 | regulator-name = "vcc10_lcd"; | |
292 | regulator-min-microvolt = <1000000>; | |
293 | regulator-max-microvolt = <1000000>; | |
294 | regulator-always-on; | |
295 | regulator-boot-on; | |
296 | regulator-state-mem { | |
297 | regulator-on-in-suspend; | |
298 | regulator-suspend-microvolt = <1800000>; | |
299 | }; | |
300 | }; | |
301 | ||
302 | vcc_18: LDO_REG7 { | |
303 | regulator-name = "vcc_18"; | |
304 | regulator-min-microvolt = <1800000>; | |
305 | regulator-max-microvolt = <1800000>; | |
306 | regulator-always-on; | |
307 | regulator-boot-on; | |
308 | regulator-state-mem { | |
309 | regulator-on-in-suspend; | |
310 | regulator-suspend-microvolt = <1800000>; | |
311 | }; | |
312 | }; | |
313 | ||
314 | vcc18_lcd: LDO_REG8 { | |
315 | regulator-name = "vcc18_lcd"; | |
316 | regulator-min-microvolt = <1800000>; | |
317 | regulator-max-microvolt = <1800000>; | |
318 | regulator-always-on; | |
319 | regulator-boot-on; | |
320 | regulator-state-mem { | |
321 | regulator-on-in-suspend; | |
322 | regulator-suspend-microvolt = <1800000>; | |
323 | }; | |
324 | }; | |
325 | ||
32739f15 JT |
326 | vcc_sd: SWITCH_REG1 { |
327 | regulator-name = "vcc_sd"; | |
15306b75 JT |
328 | regulator-min-microvolt = <3300000>; |
329 | regulator-max-microvolt = <3300000>; | |
330 | regulator-always-on; | |
331 | regulator-boot-on; | |
332 | regulator-state-mem { | |
333 | regulator-on-in-suspend; | |
334 | }; | |
335 | }; | |
336 | ||
337 | vcc_lan: SWITCH_REG2 { | |
338 | regulator-name = "vcc_lan"; | |
339 | regulator-min-microvolt = <3300000>; | |
340 | regulator-max-microvolt = <3300000>; | |
341 | regulator-always-on; | |
342 | regulator-boot-on; | |
343 | regulator-state-mem { | |
344 | regulator-on-in-suspend; | |
345 | }; | |
346 | }; | |
347 | }; | |
348 | }; | |
349 | }; | |
350 | ||
7d705c2a JT |
351 | &i2c2 { |
352 | status = "okay"; | |
353 | }; | |
354 | ||
f6ffcaa6 JT |
355 | &io_domains { |
356 | status = "okay"; | |
357 | ||
358 | audio-supply = <&vcc_18>; | |
359 | bb-supply = <&vcc_io>; | |
360 | dvp-supply = <&vcc_io>; | |
361 | flash0-suuply = <&vcc_18>; | |
362 | flash1-supply = <&vcc_lan>; | |
363 | gpio30-supply = <&vcc_io>; | |
364 | gpio1830 = <&vcc_io>; | |
365 | lcdc-supply = <&vcc_io>; | |
366 | sdcard-supply = <&vccio_sd>; | |
367 | wifi-supply = <&vcc_18>; | |
368 | }; | |
369 | ||
15306b75 JT |
370 | &sdmmc { |
371 | bus-width = <4>; | |
372 | cap-mmc-highspeed; | |
373 | cap-sd-highspeed; | |
374 | card-detect-delay = <200>; | |
375 | disable-wp; | |
376 | pinctrl-names = "default"; | |
377 | pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; | |
378 | vmmc-supply = <&vcc_sd>; | |
379 | vqmmc-supply = <&vccio_sd>; | |
380 | status = "okay"; | |
381 | }; | |
382 | ||
345b40f1 MT |
383 | &tsadc { |
384 | rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ | |
385 | rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ | |
386 | status = "okay"; | |
387 | }; | |
388 | ||
15306b75 JT |
389 | &uart2 { |
390 | status = "okay"; | |
391 | }; | |
392 | ||
ba736024 JT |
393 | &usbphy { |
394 | status = "okay"; | |
395 | }; | |
396 | ||
397 | &usb_host0_ehci { | |
398 | status = "okay"; | |
399 | }; | |
400 | ||
401 | &usb_host1 { | |
402 | pinctrl-names = "default"; | |
403 | pinctrl-0 = <&phy_pwr_en>; | |
404 | status = "okay"; | |
405 | }; | |
406 | ||
4ed1bc39 JT |
407 | &usb_otg { |
408 | status = "okay"; | |
409 | }; | |
410 | ||
7d705c2a JT |
411 | &vopb { |
412 | status = "okay"; | |
413 | }; | |
414 | ||
415 | &vopb_mmu { | |
416 | status = "okay"; | |
417 | }; | |
418 | ||
419 | &vopl { | |
420 | status = "okay"; | |
421 | }; | |
422 | ||
423 | &vopl_mmu { | |
424 | status = "okay"; | |
425 | }; | |
426 | ||
15306b75 JT |
427 | &wdt { |
428 | status = "okay"; | |
429 | }; | |
430 | ||
431 | &pinctrl { | |
c09cd253 JT |
432 | pcfg_output_high: pcfg-output-high { |
433 | output-high; | |
434 | }; | |
435 | ||
436 | gmac { | |
437 | phy_int: phy-int { | |
438 | rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; | |
439 | }; | |
440 | ||
441 | phy_pmeb: phy-pmeb { | |
442 | rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; | |
443 | }; | |
444 | ||
445 | phy_rst: phy-rst { | |
446 | rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>; | |
447 | }; | |
448 | }; | |
449 | ||
15306b75 JT |
450 | pmic { |
451 | pmic_int: pmic-int { | |
452 | rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; | |
453 | }; | |
454 | }; | |
ba736024 JT |
455 | |
456 | usb_host { | |
457 | phy_pwr_en: phy-pwr-en { | |
458 | rockchip,pins = <RK_GPIO2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>; | |
459 | }; | |
460 | ||
461 | usb2_pwr_en: usb2-pwr-en { | |
462 | rockchip,pins = <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; | |
463 | }; | |
464 | }; | |
4ed1bc39 JT |
465 | |
466 | usb_otg { | |
467 | otg_vbus_drv: otg-vbus-drv { | |
468 | rockchip,pins = <RK_GPIO0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; | |
469 | ||
470 | }; | |
471 | }; | |
15306b75 | 472 | }; |