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