arm64: dts: rockchip: fix the px30-evb power tree
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / rockchip / px30-evb.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4  */
5
6 /dts-v1/;
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/pinctrl/rockchip.h>
10 #include "px30.dtsi"
11
12 / {
13         model = "Rockchip PX30 EVB";
14         compatible = "rockchip,px30-evb", "rockchip,px30";
15
16         chosen {
17                 stdout-path = "serial2:1500000n8";
18         };
19
20         adc-keys {
21                 compatible = "adc-keys";
22                 io-channels = <&saradc 2>;
23                 io-channel-names = "buttons";
24                 keyup-threshold-microvolt = <1800000>;
25                 poll-interval = <100>;
26
27                 esc-key {
28                         label = "esc";
29                         linux,code = <KEY_ESC>;
30                         press-threshold-microvolt = <1310000>;
31                 };
32
33                 home-key {
34                         label = "home";
35                         linux,code = <KEY_HOME>;
36                         press-threshold-microvolt = <624000>;
37                 };
38
39                 menu-key {
40                         label = "menu";
41                         linux,code = <KEY_MENU>;
42                         press-threshold-microvolt = <987000>;
43                 };
44
45                 vol-down-key {
46                         label = "volume down";
47                         linux,code = <KEY_VOLUMEDOWN>;
48                         press-threshold-microvolt = <300000>;
49                 };
50
51                 vol-up-key {
52                         label = "volume up";
53                         linux,code = <KEY_VOLUMEUP>;
54                         press-threshold-microvolt = <17000>;
55                 };
56         };
57
58         backlight: backlight {
59                 compatible = "pwm-backlight";
60                 pwms = <&pwm1 0 25000 0>;
61                 power-supply = <&vcc3v3_lcd>;
62         };
63
64         sdio_pwrseq: sdio-pwrseq {
65                 compatible = "mmc-pwrseq-simple";
66                 pinctrl-names = "default";
67                 pinctrl-0 = <&wifi_enable_h>;
68
69                 /*
70                  * On the module itself this is one of these (depending
71                  * on the actual card populated):
72                  * - SDIO_RESET_L_WL_REG_ON
73                  * - PDN (power down when low)
74                  */
75                 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
76         };
77
78         vcc5v0_sys: vccsys {
79                 compatible = "regulator-fixed";
80                 regulator-name = "vcc5v0_sys";
81                 regulator-always-on;
82                 regulator-boot-on;
83                 regulator-min-microvolt = <5000000>;
84                 regulator-max-microvolt = <5000000>;
85         };
86 };
87
88 &cpu0 {
89         cpu-supply = <&vdd_arm>;
90 };
91
92 &cpu1 {
93         cpu-supply = <&vdd_arm>;
94 };
95
96 &cpu2 {
97         cpu-supply = <&vdd_arm>;
98 };
99
100 &cpu3 {
101         cpu-supply = <&vdd_arm>;
102 };
103
104 &display_subsystem {
105         status = "okay";
106 };
107
108 &emmc {
109         bus-width = <8>;
110         cap-mmc-highspeed;
111         mmc-hs200-1_8v;
112         non-removable;
113         vmmc-supply = <&vcc_3v0>;
114         vqmmc-supply = <&vccio_flash>;
115         status = "okay";
116 };
117
118 &gmac {
119         clock_in_out = "output";
120         phy-supply = <&vcc_rmii>;
121         snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
122         snps,reset-active-low;
123         snps,reset-delays-us = <0 50000 50000>;
124         status = "okay";
125 };
126
127 &i2c0 {
128         status = "okay";
129
130         rk809: pmic@20 {
131                 compatible = "rockchip,rk809";
132                 reg = <0x20>;
133                 interrupt-parent = <&gpio0>;
134                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
135                 pinctrl-names = "default";
136                 pinctrl-0 = <&pmic_int>;
137                 rockchip,system-power-controller;
138                 wakeup-source;
139                 #clock-cells = <0>;
140                 clock-output-names = "xin32k";
141
142                 vcc1-supply = <&vcc5v0_sys>;
143                 vcc2-supply = <&vcc5v0_sys>;
144                 vcc3-supply = <&vcc5v0_sys>;
145                 vcc4-supply = <&vcc5v0_sys>;
146                 vcc5-supply = <&vcc3v3_sys>;
147                 vcc6-supply = <&vcc3v3_sys>;
148                 vcc7-supply = <&vcc3v3_sys>;
149                 vcc8-supply = <&vcc3v3_sys>;
150                 vcc9-supply = <&vcc5v0_sys>;
151
152                 regulators {
153                         vdd_log: DCDC_REG1 {
154                                 regulator-name = "vdd_log";
155                                 regulator-min-microvolt = <950000>;
156                                 regulator-max-microvolt = <1350000>;
157                                 regulator-ramp-delay = <6001>;
158                                 regulator-always-on;
159                                 regulator-boot-on;
160
161                                 regulator-state-mem {
162                                         regulator-on-in-suspend;
163                                         regulator-suspend-microvolt = <950000>;
164                                 };
165                         };
166
167                         vdd_arm: DCDC_REG2 {
168                                 regulator-name = "vdd_arm";
169                                 regulator-min-microvolt = <950000>;
170                                 regulator-max-microvolt = <1350000>;
171                                 regulator-ramp-delay = <6001>;
172                                 regulator-always-on;
173                                 regulator-boot-on;
174
175                                 regulator-state-mem {
176                                         regulator-off-in-suspend;
177                                         regulator-suspend-microvolt = <950000>;
178                                 };
179                         };
180
181                         vcc_ddr: DCDC_REG3 {
182                                 regulator-name = "vcc_ddr";
183                                 regulator-always-on;
184                                 regulator-boot-on;
185
186                                 regulator-state-mem {
187                                         regulator-on-in-suspend;
188                                 };
189                         };
190
191                         vcc_3v0: vcc_rmii: DCDC_REG4 {
192                                 regulator-name = "vcc_3v0";
193                                 regulator-min-microvolt = <3000000>;
194                                 regulator-max-microvolt = <3000000>;
195                                 regulator-always-on;
196                                 regulator-boot-on;
197
198                                 regulator-state-mem {
199                                         regulator-on-in-suspend;
200                                         regulator-suspend-microvolt = <3000000>;
201                                 };
202                         };
203
204                         vcc3v3_sys: DCDC_REG5 {
205                                 regulator-name = "vcc3v3_sys";
206                                 regulator-min-microvolt = <3300000>;
207                                 regulator-max-microvolt = <3300000>;
208                                 regulator-always-on;
209                                 regulator-boot-on;
210
211                                 regulator-state-mem {
212                                         regulator-on-in-suspend;
213                                         regulator-suspend-microvolt = <3300000>;
214                                 };
215                         };
216
217                         vcc_1v0: LDO_REG1 {
218                                 regulator-name = "vcc_1v0";
219                                 regulator-min-microvolt = <1000000>;
220                                 regulator-max-microvolt = <1000000>;
221                                 regulator-always-on;
222                                 regulator-boot-on;
223
224                                 regulator-state-mem {
225                                         regulator-on-in-suspend;
226                                         regulator-suspend-microvolt = <1000000>;
227                                 };
228                         };
229
230                         vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
231                                 regulator-name = "vcc_1v8";
232                                 regulator-min-microvolt = <1800000>;
233                                 regulator-max-microvolt = <1800000>;
234                                 regulator-always-on;
235                                 regulator-boot-on;
236
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <1800000>;
240                                 };
241                         };
242
243                         vdd_1v0: LDO_REG3 {
244                                 regulator-name = "vdd_1v0";
245                                 regulator-min-microvolt = <1000000>;
246                                 regulator-max-microvolt = <1000000>;
247                                 regulator-always-on;
248                                 regulator-boot-on;
249
250                                 regulator-state-mem {
251                                         regulator-on-in-suspend;
252                                         regulator-suspend-microvolt = <1000000>;
253                                 };
254                         };
255
256                         vcc3v0_pmu: LDO_REG4 {
257                                 regulator-name = "vcc3v0_pmu";
258                                 regulator-min-microvolt = <3000000>;
259                                 regulator-max-microvolt = <3000000>;
260                                 regulator-always-on;
261                                 regulator-boot-on;
262
263                                 regulator-state-mem {
264                                         regulator-on-in-suspend;
265                                         regulator-suspend-microvolt = <3000000>;
266                                 };
267                         };
268
269                         vccio_sd: LDO_REG5 {
270                                 regulator-name = "vccio_sd";
271                                 regulator-min-microvolt = <1800000>;
272                                 regulator-max-microvolt = <3300000>;
273                                 regulator-always-on;
274                                 regulator-boot-on;
275
276                                 regulator-state-mem {
277                                         regulator-on-in-suspend;
278                                         regulator-suspend-microvolt = <3300000>;
279                                 };
280                         };
281
282                         vcc_sd: LDO_REG6 {
283                                 regulator-name = "vcc_sd";
284                                 regulator-min-microvolt = <3300000>;
285                                 regulator-max-microvolt = <3300000>;
286                                 regulator-boot-on;
287
288                                 regulator-state-mem {
289                                         regulator-on-in-suspend;
290                                         regulator-suspend-microvolt = <3300000>;
291                                 };
292                         };
293
294                         vcc2v8_dvp: LDO_REG7 {
295                                 regulator-name = "vcc2v8_dvp";
296                                 regulator-min-microvolt = <2800000>;
297                                 regulator-max-microvolt = <2800000>;
298                                 regulator-boot-on;
299
300                                 regulator-state-mem {
301                                         regulator-off-in-suspend;
302                                         regulator-suspend-microvolt = <2800000>;
303                                 };
304                         };
305
306                         vcc1v8_dvp: LDO_REG8 {
307                                 regulator-name = "vcc1v8_dvp";
308                                 regulator-min-microvolt = <1800000>;
309                                 regulator-max-microvolt = <1800000>;
310                                 regulator-boot-on;
311
312                                 regulator-state-mem {
313                                         regulator-on-in-suspend;
314                                         regulator-suspend-microvolt = <1800000>;
315                                 };
316                         };
317
318                         vcc1v5_dvp: LDO_REG9 {
319                                 regulator-name = "vcc1v5_dvp";
320                                 regulator-min-microvolt = <1500000>;
321                                 regulator-max-microvolt = <1500000>;
322                                 regulator-boot-on;
323
324                                 regulator-state-mem {
325                                         regulator-off-in-suspend;
326                                         regulator-suspend-microvolt = <1500000>;
327                                 };
328                         };
329
330                         vcc3v3_lcd: SWITCH_REG1 {
331                                 regulator-name = "vcc3v3_lcd";
332                                 regulator-boot-on;
333                         };
334
335                         vcc5v0_host: SWITCH_REG2 {
336                                 regulator-name = "vcc5v0_host";
337                                 regulator-always-on;
338                                 regulator-boot-on;
339                         };
340                 };
341         };
342 };
343
344 &i2s1_2ch {
345         status = "okay";
346 };
347
348 &io_domains {
349         status = "okay";
350
351         vccio1-supply = <&vccio_sdio>;
352         vccio2-supply = <&vccio_sd>;
353         vccio3-supply = <&vcc_3v0>;
354         vccio4-supply = <&vcc3v0_pmu>;
355         vccio5-supply = <&vcc_3v0>;
356         vccio6-supply = <&vccio_flash>;
357 };
358
359 &pinctrl {
360         headphone {
361                 hp_det: hp-det {
362                         rockchip,pins =
363                                 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
364                 };
365         };
366
367         pmic {
368                 pmic_int: pmic_int {
369                         rockchip,pins =
370                                 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
371                 };
372
373                 soc_slppin_gpio: soc_slppin_gpio {
374                         rockchip,pins =
375                                 <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
376                 };
377
378                 soc_slppin_slp: soc_slppin_slp {
379                         rockchip,pins =
380                                 <0 RK_PA4 1 &pcfg_pull_none>;
381                 };
382
383                 soc_slppin_rst: soc_slppin_rst {
384                         rockchip,pins =
385                                 <0 RK_PA4 2 &pcfg_pull_none>;
386                 };
387         };
388
389         sdio-pwrseq {
390                 wifi_enable_h: wifi-enable-h {
391                         rockchip,pins =
392                                 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
393                 };
394         };
395 };
396
397 &pmu_io_domains {
398         status = "okay";
399
400         pmuio1-supply = <&vcc3v0_pmu>;
401         pmuio2-supply = <&vcc3v0_pmu>;
402 };
403
404 &pwm1 {
405         status = "okay";
406 };
407
408 &saradc {
409         vref-supply = <&vcc_1v8>;
410         status = "okay";
411 };
412
413 &sdmmc {
414         bus-width = <4>;
415         cap-mmc-highspeed;
416         cap-sd-highspeed;
417         card-detect-delay = <800>;
418         sd-uhs-sdr12;
419         sd-uhs-sdr25;
420         sd-uhs-sdr50;
421         sd-uhs-sdr104;
422         vmmc-supply = <&vcc_sd>;
423         vqmmc-supply = <&vccio_sd>;
424         status = "okay";
425 };
426
427 &sdio {
428         bus-width = <4>;
429         cap-sd-highspeed;
430         keep-power-in-suspend;
431         non-removable;
432         mmc-pwrseq = <&sdio_pwrseq>;
433         sd-uhs-sdr104;
434         status = "okay";
435 };
436
437 &uart1 {
438         pinctrl-names = "default";
439         pinctrl-0 = <&uart1_xfer &uart1_cts>;
440         status = "okay";
441 };
442
443 &uart2 {
444         status = "okay";
445 };
446
447 &usb20_otg {
448         status = "okay";
449 };
450
451 &usb_host0_ehci {
452         status = "okay";
453 };
454
455 &usb_host0_ohci {
456         status = "okay";
457 };
458
459 &vopb {
460         status = "okay";
461 };
462
463 &vopb_mmu {
464         status = "okay";
465 };
466
467 &vopl {
468         status = "okay";
469 };
470
471 &vopl_mmu {
472         status = "okay";
473 };