Merge branch 'topic/nhlt' into for-next
[linux-2.6-microblaze.git] / arch / arm / boot / dts / rk3288-vyasa.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com>
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
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
41         vcc_sys: vsys-regulator {
42                 compatible = "regulator-fixed";
43                 regulator-name = "vcc_sys";
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";
54                 regulator-min-microvolt = <5000000>;
55                 regulator-max-microvolt = <5000000>;
56                 regulator-always-on;
57                 regulator-boot-on;
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>;
69         };
70
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
81         vcc50_hdmi: vcc50-hdmi {
82                 compatible = "regulator-fixed";
83                 regulator-name = "vcc50_hdmi";
84                 enable-active-high;
85                 gpio = <&gpio7 RK_PB4 GPIO_ACTIVE_HIGH>; /* HDMI_EN */
86                 pinctrl-names = "default";
87                 pinctrl-0 = <&vcc50_hdmi_en>;
88                 regulator-always-on;
89                 regulator-boot-on;
90                 vin-supply = <&vsus_5v>;
91         };
92
93         vusb1_5v: vusb1-5v {
94                 compatible = "regulator-fixed";
95                 regulator-name = "vusb1_5v";
96                 enable-active-high;
97                 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; /* OTG_VBUS_DRV */
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&otg_vbus_drv>;
100                 regulator-min-microvolt = <5000000>;
101                 regulator-max-microvolt = <5000000>;
102                 regulator-always-on;
103                 regulator-boot-on;
104                 vin-supply = <&vsus_5v>;
105         };
106
107         vusb2_5v: vusb2-5v {
108                 compatible = "regulator-fixed";
109                 regulator-name = "vusb2_5v";
110                 enable-active-high;
111                 gpio = <&gpio8 RK_PB1 GPIO_ACTIVE_HIGH>; /* USB2_PWR_EN */
112                 pinctrl-names = "default";
113                 pinctrl-0 = <&usb2_pwr_en>;
114                 regulator-min-microvolt = <5000000>;
115                 regulator-max-microvolt = <5000000>;
116                 regulator-always-on;
117                 regulator-boot-on;
118                 vin-supply = <&vsus_5v>;
119         };
120
121         ext_gmac: external-gmac-clock {
122                 compatible = "fixed-clock";
123                 #clock-cells = <0>;
124                 clock-frequency = <125000000>;
125                 clock-output-names = "ext_gmac";
126         };
127 };
128
129 &cpu0 {
130         cpu0-supply = <&vdd_cpu>;
131 };
132
133 &emmc {
134         bus-width = <8>;
135         cap-mmc-highspeed;
136         non-removable;
137         pinctrl-names = "default";
138         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
139         vmmc-supply = <&vcc_io>;
140         status = "okay";
141 };
142
143 &gmac {
144         assigned-clocks = <&cru SCLK_MAC>;
145         assigned-clock-parents = <&ext_gmac>;
146         clock_in_out = "input";
147         pinctrl-names = "default";
148         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
149         phy-supply = <&vcc_lan>;
150         phy-mode = "rgmii";
151         snps,reset-active-low;
152         snps,reset-delays-us = <0 10000 1000000>;
153         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
154         tx_delay = <0x30>;
155         rx_delay = <0x10>;
156         status = "okay";
157 };
158
159 &gpu {
160         mali-supply = <&vdd_gpu>;
161         status = "okay";
162 };
163
164 &hdmi {
165         ddc-i2c-bus = <&i2c5>;
166         status = "okay";
167 };
168
169 &i2c0 {
170         clock-frequency = <400000>;
171         status = "okay";
172
173         rk808: pmic@1b {
174                 compatible = "rockchip,rk808";
175                 reg = <0x1b>;
176                 interrupt-parent = <&gpio0>;
177                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
178                 #clock-cells = <1>;
179                 clock-output-names = "xin32k", "rk808-clkout2";
180                 pinctrl-names = "default";
181                 pinctrl-0 = <&pmic_int &global_pwroff>;
182                 rockchip,system-power-controller;
183                 wakeup-source;
184
185                 vcc1-supply = <&vcc_sys>;
186                 vcc2-supply = <&vcc_sys>;
187                 vcc3-supply = <&vcc_sys>;
188                 vcc4-supply = <&vcc_sys>;
189                 vcc6-supply = <&vcc_sys>;
190                 vcc7-supply = <&vcc_sys>;
191                 vcc8-supply = <&vcc_io>;
192                 vcc9-supply = <&vcc_sys>;
193                 vcc10-supply = <&vcc_sys>;
194                 vcc11-supply = <&vcc_sys>;
195                 vcc12-supply = <&vcc_io>;
196
197                 regulators {
198                         vdd_cpu: DCDC_REG1 {
199                                 regulator-name = "vdd_arm";
200                                 regulator-min-microvolt = <750000>;
201                                 regulator-max-microvolt = <1350000>;
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-state-mem {
205                                         regulator-off-in-suspend;
206                                 };
207                         };
208
209                         vdd_gpu: DCDC_REG2 {
210                                 regulator-name = "vdd_gpu";
211                                 regulator-min-microvolt = <850000>;
212                                 regulator-max-microvolt = <1250000>;
213                                 regulator-always-on;
214                                 regulator-boot-on;
215                                 regulator-state-mem {
216                                         regulator-on-in-suspend;
217                                         regulator-suspend-microvolt = <1000000>;
218                                 };
219                         };
220
221                         vcc_ddr: DCDC_REG3 {
222                                 regulator-name = "vcc_ddr";
223                                 regulator-always-on;
224                                 regulator-boot-on;
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                 };
228                         };
229
230                         vcc_io: DCDC_REG4 {
231                                 regulator-name = "vcc_io";
232                                 regulator-min-microvolt = <3300000>;
233                                 regulator-max-microvolt = <3300000>;
234                                 regulator-always-on;
235                                 regulator-boot-on;
236                                 regulator-state-mem {
237                                         regulator-on-in-suspend;
238                                         regulator-suspend-microvolt = <3300000>;
239                                 };
240                         };
241
242                         vcca_tp: LDO_REG1 {
243                                 regulator-name = "vcc_tp";
244                                 regulator-min-microvolt = <3300000>;
245                                 regulator-max-microvolt = <3300000>;
246                                 regulator-always-on;
247                                 regulator-boot-on;
248                                 regulator-state-mem {
249                                         regulator-on-in-suspend;
250                                         regulator-suspend-microvolt = <3300000>;
251                                 };
252                         };
253
254                         vcc_codec: LDO_REG2 {
255                                 regulator-name = "vcc_codec";
256                                 regulator-min-microvolt = <3300000>;
257                                 regulator-max-microvolt = <3300000>;
258                                 regulator-always-on;
259                                 regulator-boot-on;
260                                 regulator-state-mem {
261                                         regulator-off-in-suspend;
262                                 };
263                         };
264
265                         vdd_10: LDO_REG3 {
266                                 regulator-name = "vdd_10";
267                                 regulator-min-microvolt = <1000000>;
268                                 regulator-max-microvolt = <1000000>;
269                                 regulator-always-on;
270                                 regulator-boot-on;
271                                 regulator-state-mem {
272                                         regulator-on-in-suspend;
273                                         regulator-suspend-microvolt = <1000000>;
274                                 };
275                         };
276
277                         vcc_gps: LDO_REG4 {
278                                 regulator-name = "vcc_gps";
279                                 regulator-min-microvolt = <1800000>;
280                                 regulator-max-microvolt = <1800000>;
281                                 regulator-always-on;
282                                 regulator-boot-on;
283                                 regulator-state-mem {
284                                         regulator-on-in-suspend;
285                                         regulator-suspend-microvolt = <1800000>;
286                                 };
287                         };
288
289                         vccio_sd: LDO_REG5 {
290                                 regulator-name = "vccio_sd";
291                                 regulator-min-microvolt = <1800000>;
292                                 regulator-max-microvolt = <3300000>;
293                                 regulator-always-on;
294                                 regulator-boot-on;
295                                 regulator-state-mem {
296                                         regulator-on-in-suspend;
297                                         regulator-suspend-microvolt = <3300000>;
298                                 };
299                         };
300
301                         vdd10_lcd: LDO_REG6 {
302                                 regulator-name = "vdd10_lcd";
303                                 regulator-min-microvolt = <1000000>;
304                                 regulator-max-microvolt = <1000000>;
305                                 regulator-always-on;
306                                 regulator-boot-on;
307                                 regulator-state-mem {
308                                         regulator-on-in-suspend;
309                                         regulator-suspend-microvolt = <1000000>;
310                                 };
311                         };
312
313                         vcc_18: LDO_REG7 {
314                                 regulator-name = "vcc_18";
315                                 regulator-min-microvolt = <1800000>;
316                                 regulator-max-microvolt = <1800000>;
317                                 regulator-always-on;
318                                 regulator-boot-on;
319                                 regulator-state-mem {
320                                         regulator-on-in-suspend;
321                                         regulator-suspend-microvolt = <1800000>;
322                                 };
323                         };
324
325                         vcc18_lcd: LDO_REG8 {
326                                 regulator-name = "vcc18_lcd";
327                                 regulator-min-microvolt = <1800000>;
328                                 regulator-max-microvolt = <1800000>;
329                                 regulator-always-on;
330                                 regulator-boot-on;
331                                 regulator-state-mem {
332                                         regulator-on-in-suspend;
333                                         regulator-suspend-microvolt = <1800000>;
334                                 };
335                         };
336
337                         vcc_sd: SWITCH_REG1 {
338                                 regulator-name = "vcc_sd";
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                         vcc_lan: SWITCH_REG2 {
349                                 regulator-name = "vcc_lan";
350                                 regulator-min-microvolt = <3300000>;
351                                 regulator-max-microvolt = <3300000>;
352                                 regulator-always-on;
353                                 regulator-boot-on;
354                                 regulator-state-mem {
355                                         regulator-on-in-suspend;
356                                 };
357                         };
358                 };
359         };
360 };
361
362 &i2c5 {
363         status = "okay";
364 };
365
366 &io_domains {
367         status = "okay";
368
369         audio-supply = <&vcc_18>;
370         bb-supply = <&vcc_io>;
371         dvp-supply = <&vcc_io>;
372         flash0-suuply = <&vcc_18>;
373         flash1-supply = <&vcc_lan>;
374         gpio30-supply = <&vcc_io>;
375         gpio1830 = <&vcc_io>;
376         lcdc-supply = <&vcc_io>;
377         sdcard-supply = <&vccio_sd>;
378         wifi-supply = <&vcc_18>;
379 };
380
381 &sdmmc {
382         bus-width = <4>;
383         cap-mmc-highspeed;
384         cap-sd-highspeed;
385         card-detect-delay = <200>;
386         disable-wp;
387         pinctrl-names = "default";
388         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
389         vmmc-supply = <&vcc_sd>;
390         vqmmc-supply = <&vccio_sd>;
391         status = "okay";
392 };
393
394 &tsadc {
395         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
396         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
397         status = "okay";
398 };
399
400 &uart2 {
401         status = "okay";
402 };
403
404 &usbphy {
405         status = "okay";
406 };
407
408 &usb_host0_ehci {
409         status = "okay";
410 };
411
412 &usb_host1 {
413         pinctrl-names = "default";
414         pinctrl-0 = <&phy_pwr_en>;
415         status = "okay";
416 };
417
418 &usb_otg {
419         status = "okay";
420 };
421
422 &vopb {
423         status = "okay";
424 };
425
426 &vopb_mmu {
427         status = "okay";
428 };
429
430 &vopl {
431         status = "okay";
432 };
433
434 &vopl_mmu {
435         status = "okay";
436 };
437
438 &wdt {
439         status = "okay";
440 };
441
442 &pinctrl {
443         pcfg_output_high: pcfg-output-high {
444                 output-high;
445         };
446
447         gmac {
448                 phy_int: phy-int {
449                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
450                 };
451
452                 phy_pmeb: phy-pmeb {
453                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
454                 };
455
456                 phy_rst: phy-rst {
457                         rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
458                 };
459         };
460
461         hdmi {
462                 vcc50_hdmi_en: vcc50-hdmi-en {
463                         rockchip,pins = <7 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
464                 };
465         };
466
467         pmic {
468                 pmic_int: pmic-int {
469                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
470                 };
471         };
472
473         usb_host {
474                 phy_pwr_en: phy-pwr-en {
475                         rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
476                 };
477
478                 usb2_pwr_en: usb2-pwr-en {
479                         rockchip,pins = <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
480                 };
481         };
482
483         usb_otg {
484                 otg_vbus_drv: otg-vbus-drv {
485                         rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
486
487                 };
488         };
489 };