arm64: dts: rockchip: add otg-port node of usb2-phy for rk3328 dwc2
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-box.dtsi
1 /*
2  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42 #include <dt-bindings/pwm/pwm.h>
43 #include <dt-bindings/input/input.h>
44 #include "rk3399.dtsi"
45 #include "rk3399-android.dtsi"
46 #include "rk3399-opp.dtsi"
47
48 / {
49         compatible = "rockchip,rk3399-box","rockchip,rk3399";
50
51         vcc1v8_s0: vcc1v8-s0 {
52                 compatible = "regulator-fixed";
53                 regulator-name = "vcc1v8_s0";
54                 regulator-min-microvolt = <1800000>;
55                 regulator-max-microvolt = <1800000>;
56                 regulator-always-on;
57         };
58
59         vcc_sys: vcc-sys {
60                 compatible = "regulator-fixed";
61                 regulator-name = "vcc_sys";
62                 regulator-min-microvolt = <5000000>;
63                 regulator-max-microvolt = <5000000>;
64                 regulator-always-on;
65         };
66
67         vcc_phy: vcc-phy-regulator {
68                 compatible = "regulator-fixed";
69                 regulator-name = "vcc_phy";
70                 regulator-always-on;
71                 regulator-boot-on;
72         };
73
74         vcc3v3_sys: vcc3v3-sys {
75                 compatible = "regulator-fixed";
76                 regulator-name = "vcc3v3_sys";
77                 regulator-min-microvolt = <3300000>;
78                 regulator-max-microvolt = <3300000>;
79                 regulator-always-on;
80                 vin-supply = <&vcc_sys>;
81         };
82
83         vcc5v0_host: vcc5v0-host-regulator {
84                 compatible = "regulator-fixed";
85                 enable-active-high;
86                 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
87                 pinctrl-names = "default";
88                 pinctrl-0 = <&host_vbus_drv>;
89                 regulator-name = "vcc5v0_host";
90                 regulator-always-on;
91         };
92
93         vdd_log: vdd-log {
94                 compatible = "pwm-regulator";
95                 pwms = <&pwm2 0 25000 0>;
96                 regulator-name = "vdd_log";
97                 regulator-min-microvolt = <800000>;
98                 regulator-max-microvolt = <1400000>;
99                 regulator-always-on;
100                 regulator-boot-on;
101
102                 /* for rockchip boot on */
103                 rockchip,pwm_id= <2>;
104                 rockchip,pwm_voltage = <900000>;
105
106                 vin-supply = <&vcc_sys>;
107         };
108
109         clkin_gmac: external-gmac-clock {
110                 compatible = "fixed-clock";
111                 clock-frequency = <125000000>;
112                 clock-output-names = "clkin_gmac";
113                 #clock-cells = <0>;
114         };
115
116         spdif-sound {
117                 status = "okay";
118                 compatible = "simple-audio-card";
119                 simple-audio-card,name = "ROCKCHIP,SPDIF";
120                 simple-audio-card,cpu {
121                         sound-dai = <&spdif>;
122                 };
123                 simple-audio-card,codec {
124                         sound-dai = <&spdif_out>;
125                 };
126         };
127
128         spdif_out: spdif-out {
129                 status = "okay";
130                 compatible = "linux,spdif-dit";
131                 #sound-dai-cells = <0>;
132         };
133
134         hdmi_sound: hdmi-sound {
135                 status = "okay";
136                 compatible = "simple-audio-card";
137                 simple-audio-card,format = "i2s";
138                 simple-audio-card,mclk-fs = <256>;
139                 simple-audio-card,name = "rockchip,hdmi";
140                 simple-audio-card,cpu {
141                         sound-dai = <&i2s2>;
142                 };
143                 simple-audio-card,codec {
144                         sound-dai = <&hdmi>;
145                 };
146         };
147
148         sdio_pwrseq: sdio-pwrseq {
149                 compatible = "mmc-pwrseq-simple";
150                 clocks = <&rk808 1>;
151                 clock-names = "ext_clock";
152                 pinctrl-names = "default";
153                 pinctrl-0 = <&wifi_enable_h>;
154
155                 /*
156                  * On the module itself this is one of these (depending
157                  * on the actual card populated):
158                  * - SDIO_RESET_L_WL_REG_ON
159                  * - PDN (power down when low)
160                  */
161                 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
162         };
163
164         wireless-wlan {
165                 compatible = "wlan-platdata";
166                 rockchip,grf = <&grf>;
167                 wifi_chip_type = "ap6354";
168                 sdio_vref = <1800>;
169                 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
170                 status = "okay";
171         };
172
173         wireless-bluetooth {
174                 compatible = "bluetooth-platdata";
175                 clocks = <&rk808 1>;
176                 clock-names = "ext_clock";
177                 /* wifi-bt-power-toggle; */
178                 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
179                 pinctrl-names = "default", "rts_gpio";
180                 pinctrl-0 = <&uart0_rts>;
181                 pinctrl-1 = <&uart0_gpios>;
182                 /* BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
183                 BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>;
184                 BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>;
185                 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
186                 status = "okay";
187         };
188
189         test-power {
190                 status = "okay";
191         };
192 };
193
194 &sdmmc {
195         clock-frequency = <100000000>;
196         clock-freq-min-max = <100000 100000000>;
197         supports-sd;
198         bus-width = <4>;
199         cap-mmc-highspeed;
200         cap-sd-highspeed;
201         disable-wp;
202         num-slots = <1>;
203         //sd-uhs-sdr104;
204         vqmmc-supply = <&vcc_sd>;
205         pinctrl-names = "default";
206         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
207         card-detect-delay = <800>;
208         status = "okay";
209 };
210
211 &sdio0 {
212         clock-frequency = <100000000>;
213         clock-freq-min-max = <200000 100000000>;
214         supports-sdio;
215         bus-width = <4>;
216         disable-wp;
217         cap-sd-highspeed;
218         cap-sdio-irq;
219         keep-power-in-suspend;
220         mmc-pwrseq = <&sdio_pwrseq>;
221         non-removable;
222         num-slots = <1>;
223         pinctrl-names = "default";
224         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
225         sd-uhs-sdr104;
226         status = "okay";
227 };
228
229 &emmc_phy {
230         status = "okay";
231 };
232
233 &sdhci {
234         bus-width = <8>;
235         mmc-hs400-1_8v;
236         supports-emmc;
237         non-removable;
238         mmc-hs400-enhanced-strobe;
239         status = "okay";
240 };
241
242 &i2s0 {
243         status = "okay";
244         rockchip,i2s-broken-burst-len;
245         rockchip,playback-channels = <8>;
246         rockchip,capture-channels = <8>;
247         #sound-dai-cells = <0>;
248 };
249
250 &i2s2 {
251         #sound-dai-cells = <0>;
252 };
253
254 &spdif {
255         pinctrl-0 = <&spdif_bus_1>;
256         status = "okay";
257         #sound-dai-cells = <0>;
258 };
259
260 &i2c0 {
261         status = "okay";
262         i2c-scl-rising-time-ns = <168>;
263         i2c-scl-falling-time-ns = <4>;
264         clock-frequency = <400000>;
265
266         vdd_cpu_b: syr827@40 {
267                 compatible = "silergy,syr827";
268                 reg = <0x40>;
269                 regulator-compatible = "fan53555-reg";
270                 pinctrl-0 = <&vsel1_gpio>;
271                 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
272                 regulator-name = "vdd_cpu_b";
273                 regulator-min-microvolt = <712500>;
274                 regulator-max-microvolt = <1500000>;
275                 regulator-ramp-delay = <1000>;
276                 fcs,suspend-voltage-selector = <1>;
277                 regulator-always-on;
278                 regulator-boot-on;
279                 vin-supply = <&vcc_sys>;
280                 regulator-state-mem {
281                         regulator-off-in-suspend;
282                 };
283         };
284
285         vdd_gpu: syr828@41 {
286                 compatible = "silergy,syr828";
287                 reg = <0x41>;
288                 regulator-compatible = "fan53555-reg";
289                 pinctrl-0 = <&vsel2_gpio>;
290                 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
291                 regulator-name = "vdd_gpu";
292                 regulator-min-microvolt = <712500>;
293                 regulator-max-microvolt = <1500000>;
294                 regulator-ramp-delay = <1000>;
295                 fcs,suspend-voltage-selector = <1>;
296                 regulator-always-on;
297                 regulator-boot-on;
298                 vin-supply = <&vcc_sys>;
299                 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
300                 regulator-state-mem {
301                         regulator-off-in-suspend;
302                 };
303         };
304
305         rk808: pmic@1b {
306                 compatible = "rockchip,rk808";
307                 reg = <0x1b>;
308                 interrupt-parent = <&gpio1>;
309                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
310                 pinctrl-names = "default";
311                 pinctrl-0 = <&pmic_int_l>;
312                 rockchip,system-power-controller;
313                 wakeup-source;
314                 #clock-cells = <1>;
315                 clock-output-names = "xin32k", "rk808-clkout2";
316
317                 vcc1-supply = <&vcc_sys>;
318                 vcc2-supply = <&vcc_sys>;
319                 vcc3-supply = <&vcc_sys>;
320                 vcc4-supply = <&vcc_sys>;
321                 vcc6-supply = <&vcc_sys>;
322                 vcc7-supply = <&vcc_sys>;
323                 vcc8-supply = <&vcc3v3_sys>;
324                 vcc9-supply = <&vcc_sys>;
325                 vcc10-supply = <&vcc_sys>;
326                 vcc11-supply = <&vcc_sys>;
327                 vcc12-supply = <&vcc3v3_sys>;
328                 vddio-supply = <&vcc_1v8>;
329
330                 regulators {
331                         vdd_center: DCDC_REG1 {
332                                 regulator-name = "vdd_center";
333                                 regulator-min-microvolt = <750000>;
334                                 regulator-max-microvolt = <1350000>;
335                                 regulator-ramp-delay = <6001>;
336                                 regulator-always-on;
337                                 regulator-boot-on;
338                                 regulator-state-mem {
339                                         regulator-off-in-suspend;
340                                 };
341                         };
342
343                         vdd_cpu_l: DCDC_REG2 {
344                                 regulator-name = "vdd_cpu_l";
345                                 regulator-min-microvolt = <750000>;
346                                 regulator-max-microvolt = <1350000>;
347                                 regulator-ramp-delay = <6001>;
348                                 regulator-always-on;
349                                 regulator-boot-on;
350                                 regulator-state-mem {
351                                         regulator-off-in-suspend;
352                                 };
353                         };
354
355                         vcc_ddr: DCDC_REG3 {
356                                 regulator-name = "vcc_ddr";
357                                 regulator-always-on;
358                                 regulator-boot-on;
359                                 regulator-state-mem {
360                                         regulator-on-in-suspend;
361                                 };
362                         };
363
364                         vcc_1v8: DCDC_REG4 {
365                                 regulator-name = "vcc_1v8";
366                                 regulator-min-microvolt = <1800000>;
367                                 regulator-max-microvolt = <1800000>;
368                                 regulator-always-on;
369                                 regulator-boot-on;
370                                 regulator-state-mem {
371                                         regulator-on-in-suspend;
372                                         regulator-suspend-microvolt = <1800000>;
373                                 };
374                         };
375
376                         vcc1v8_dvp: LDO_REG1 {
377                                 regulator-name = "vcc1v8_dvp";
378                                 regulator-min-microvolt = <1800000>;
379                                 regulator-max-microvolt = <1800000>;
380                                 regulator-always-on;
381                                 regulator-boot-on;
382                                 regulator-state-mem {
383                                         regulator-on-in-suspend;
384                                         regulator-suspend-microvolt = <1800000>;
385                                 };
386                         };
387
388                         vcca1v8_hdmi: LDO_REG2 {
389                                 regulator-name = "vcca1v8_hdmi";
390                                 regulator-min-microvolt = <1800000>;
391                                 regulator-max-microvolt = <1800000>;
392                                 regulator-always-on;
393                                 regulator-boot-on;
394                                 regulator-state-mem {
395                                         regulator-on-in-suspend;
396                                         regulator-suspend-microvolt = <1800000>;
397                                 };
398                         };
399
400                         vcca_1v8: LDO_REG3 {
401                                 regulator-name = "vcca_1v8";
402                                 regulator-min-microvolt = <1800000>;
403                                 regulator-max-microvolt = <1800000>;
404                                 regulator-always-on;
405                                 regulator-boot-on;
406                                 regulator-state-mem {
407                                         regulator-on-in-suspend;
408                                         regulator-suspend-microvolt = <1800000>;
409                                 };
410                         };
411
412                         vcc_sd: LDO_REG4 {
413                                 regulator-name = "vcc_sd";
414                                 regulator-min-microvolt = <1800000>;
415                                 regulator-max-microvolt = <3300000>;
416                                 regulator-always-on;
417                                 regulator-boot-on;
418                                 regulator-state-mem {
419                                         regulator-on-in-suspend;
420                                         regulator-suspend-microvolt = <3300000>;
421                                 };
422                         };
423
424                         vcc3v0_sd: LDO_REG5 {
425                                 regulator-name = "vcc3v0_sd";
426                                 regulator-min-microvolt = <3000000>;
427                                 regulator-max-microvolt = <3000000>;
428                                 regulator-always-on;
429                                 regulator-boot-on;
430                                 regulator-state-mem {
431                                         regulator-on-in-suspend;
432                                         regulator-suspend-microvolt = <3000000>;
433                                 };
434                         };
435
436                         vcc_1v5: LDO_REG6 {
437                                 regulator-name = "vcc_1v5";
438                                 regulator-min-microvolt = <1500000>;
439                                 regulator-max-microvolt = <1500000>;
440                                 regulator-always-on;
441                                 regulator-boot-on;
442                                 regulator-state-mem {
443                                         regulator-on-in-suspend;
444                                         regulator-suspend-microvolt = <1500000>;
445                                 };
446                         };
447
448                         vcca0v9_hdmi: LDO_REG7 {
449                                 regulator-name = "vcca0v9_hdmi";
450                                 regulator-min-microvolt = <900000>;
451                                 regulator-max-microvolt = <900000>;
452                                 regulator-always-on;
453                                 regulator-boot-on;
454                                 regulator-state-mem {
455                                         regulator-on-in-suspend;
456                                         regulator-suspend-microvolt = <900000>;
457                                 };
458                         };
459
460                         vcc_3v0: LDO_REG8 {
461                                 regulator-name = "vcc_3v0";
462                                 regulator-min-microvolt = <3000000>;
463                                 regulator-max-microvolt = <3000000>;
464                                 regulator-always-on;
465                                 regulator-boot-on;
466                                 regulator-state-mem {
467                                         regulator-on-in-suspend;
468                                         regulator-suspend-microvolt = <3000000>;
469                                 };
470                         };
471
472                         vcc3v3_s3: SWITCH_REG1 {
473                                 regulator-name = "vcc3v3_s3";
474                                 regulator-always-on;
475                                 regulator-boot-on;
476                                 regulator-state-mem {
477                                         regulator-on-in-suspend;
478                                 };
479                         };
480
481                         vcc3v3_s0: SWITCH_REG2 {
482                                 regulator-name = "vcc3v3_s0";
483                                 regulator-always-on;
484                                 regulator-boot-on;
485                                 regulator-state-mem {
486                                         regulator-on-in-suspend;
487                                 };
488                         };
489                 };
490         };
491 };
492
493 &cpu_l0 {
494         cpu-supply = <&vdd_cpu_l>;
495 };
496
497 &cpu_l1 {
498         cpu-supply = <&vdd_cpu_l>;
499 };
500
501 &cpu_l2 {
502         cpu-supply = <&vdd_cpu_l>;
503 };
504
505 &cpu_l3 {
506         cpu-supply = <&vdd_cpu_l>;
507 };
508
509 &cpu_b0 {
510         cpu-supply = <&vdd_cpu_b>;
511 };
512
513 &cpu_b1 {
514         cpu-supply = <&vdd_cpu_b>;
515 };
516
517 &gpu {
518         status = "okay";
519         mali-supply = <&vdd_gpu>;
520 };
521
522 &rga {
523         status = "okay";
524 };
525
526 &threshold {
527         temperature = <85000>;
528 };
529
530 &target {
531         temperature = <100000>;
532 };
533
534 &soc_crit {
535         temperature = <105000>;
536 };
537
538 &tcphy0 {
539         extcon = <&fusb0>;
540         status = "okay";
541 };
542
543 &tcphy1 {
544         status = "okay";
545 };
546
547 &tsadc {
548         /* tshut mode 0:CRU 1:GPIO */
549         rockchip,hw-tshut-mode = <1>;
550         /* tshut polarity 0:LOW 1:HIGH */
551         rockchip,hw-tshut-polarity = <1>;
552         rockchip,hw-tshut-temp = <110000>;
553         status = "okay";
554 };
555
556 &u2phy0 {
557         status = "okay";
558         extcon = <&fusb0>;
559
560         u2phy0_otg: otg-port {
561                 status = "okay";
562         };
563
564         u2phy0_host: host-port {
565                 phy-supply = <&vcc5v0_host>;
566                 status = "okay";
567         };
568 };
569
570 &u2phy1 {
571         status = "okay";
572
573         u2phy1_otg: otg-port {
574                 status = "okay";
575         };
576
577         u2phy1_host: host-port {
578                 phy-supply = <&vcc5v0_host>;
579                 status = "okay";
580         };
581 };
582
583 &uart0 {
584         pinctrl-names = "default";
585         pinctrl-0 = <&uart0_xfer &uart0_cts>;
586         status = "okay";
587 };
588
589 &uart2 {
590         status = "okay";
591 };
592
593 &usb_host0_ehci {
594         status = "okay";
595 };
596
597 &usb_host0_ohci {
598         status = "okay";
599 };
600
601 &usb_host1_ehci {
602         status = "okay";
603 };
604
605 &usb_host1_ohci {
606         status = "okay";
607 };
608
609 &usbdrd3_0 {
610         extcon = <&fusb0>;
611         status = "okay";
612 };
613
614 &usbdrd_dwc3_0 {
615         dr_mode = "otg";
616         status = "okay";
617 };
618
619 &usbdrd3_1 {
620         status = "okay";
621 };
622
623 &usbdrd_dwc3_1 {
624         dr_mode = "host";
625         status = "okay";
626 };
627
628 &pwm2 {
629         status = "okay";
630 };
631
632 &pwm3 {
633         status = "okay";
634
635         interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
636         compatible = "rockchip,remotectl-pwm";
637         remote_pwm_id = <3>;
638         handle_cpu_id = <0>;
639
640         ir_key1 {
641                 rockchip,usercode = <0x4040>;
642                 rockchip,key_table =
643                         <0xf2   KEY_REPLY>,
644                         <0xba   KEY_BACK>,
645                         <0xf4   KEY_UP>,
646                         <0xf1   KEY_DOWN>,
647                         <0xef   KEY_LEFT>,
648                         <0xee   KEY_RIGHT>,
649                         <0xbd   KEY_HOME>,
650                         <0xea   KEY_VOLUMEUP>,
651                         <0xe3   KEY_VOLUMEDOWN>,
652                         <0xe2   KEY_SEARCH>,
653                         <0xb2   KEY_POWER>,
654                         <0xbc   KEY_MUTE>,
655                         <0xec   KEY_MENU>,
656                         <0xbf   0x190>,
657                         <0xe0   0x191>,
658                         <0xe1   0x192>,
659                         <0xe9   183>,
660                         <0xe6   248>,
661                         <0xe8   185>,
662                         <0xe7   186>,
663                         <0xf0   388>,
664                         <0xbe   0x175>;
665         };
666
667         ir_key2 {
668                 rockchip,usercode = <0xff00>;
669                 rockchip,key_table =
670                         <0xf9   KEY_HOME>,
671                         <0xbf   KEY_BACK>,
672                         <0xfb   KEY_MENU>,
673                         <0xaa   KEY_REPLY>,
674                         <0xb9   KEY_UP>,
675                         <0xe9   KEY_DOWN>,
676                         <0xb8   KEY_LEFT>,
677                         <0xea   KEY_RIGHT>,
678                         <0xeb   KEY_VOLUMEDOWN>,
679                         <0xef   KEY_VOLUMEUP>,
680                         <0xf7   KEY_MUTE>,
681                         <0xe7   KEY_POWER>,
682                         <0xfc   KEY_POWER>,
683                         <0xa9   KEY_VOLUMEDOWN>,
684                         <0xa8   KEY_VOLUMEDOWN>,
685                         <0xe0   KEY_VOLUMEDOWN>,
686                         <0xa5   KEY_VOLUMEDOWN>,
687                         <0xab   183>,
688                         <0xb7   388>,
689                         <0xe8   388>,
690                         <0xf8   184>,
691                         <0xaf   185>,
692                         <0xed   KEY_VOLUMEDOWN>,
693                         <0xee   186>,
694                         <0xb3   KEY_VOLUMEDOWN>,
695                         <0xf1   KEY_VOLUMEDOWN>,
696                         <0xf2   KEY_VOLUMEDOWN>,
697                         <0xf3   KEY_SEARCH>,
698                         <0xb4   KEY_VOLUMEDOWN>,
699                         <0xbe   KEY_SEARCH>;
700         };
701
702         ir_key3 {
703                 rockchip,usercode = <0x1dcc>;
704                 rockchip,key_table =
705                         <0xee   KEY_REPLY>,
706                         <0xf0   KEY_BACK>,
707                         <0xf8   KEY_UP>,
708                         <0xbb   KEY_DOWN>,
709                         <0xef   KEY_LEFT>,
710                         <0xed   KEY_RIGHT>,
711                         <0xfc   KEY_HOME>,
712                         <0xf1   KEY_VOLUMEUP>,
713                         <0xfd   KEY_VOLUMEDOWN>,
714                         <0xb7   KEY_SEARCH>,
715                         <0xff   KEY_POWER>,
716                         <0xf3   KEY_MUTE>,
717                         <0xbf   KEY_MENU>,
718                         <0xf9   0x191>,
719                         <0xf5   0x192>,
720                         <0xb3   388>,
721                         <0xbe   KEY_1>,
722                         <0xba   KEY_2>,
723                         <0xb2   KEY_3>,
724                         <0xbd   KEY_4>,
725                         <0xf9   KEY_5>,
726                         <0xb1   KEY_6>,
727                         <0xfc   KEY_7>,
728                         <0xf8   KEY_8>,
729                         <0xb0   KEY_9>,
730                         <0xb6   KEY_0>,
731                         <0xb5   KEY_BACKSPACE>;
732         };
733 };
734
735 &gmac {
736         phy-supply = <&vcc_phy>;
737         phy-mode = "rgmii";
738         clock_in_out = "input";
739         snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
740         snps,reset-active-low;
741         snps,reset-delays-us = <0 10000 50000>;
742         assigned-clocks = <&cru SCLK_RMII_SRC>;
743         assigned-clock-parents = <&clkin_gmac>;
744         pinctrl-names = "default", "sleep";
745         pinctrl-0 = <&rgmii_pins>;
746         pinctrl-1 = <&rgmii_sleep_pins>;
747         tx_delay = <0x28>;
748         rx_delay = <0x11>;
749         status = "okay";
750 };
751
752 &saradc {
753         status = "okay";
754 };
755
756 &i2s2 {
757         status = "okay";
758 };
759
760 &io_domains {
761         status = "okay";
762
763         bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
764         audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
765         sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
766         gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
767 };
768
769 &pinctrl {
770         sdio-pwrseq {
771                 wifi_enable_h: wifi-enable-h {
772                         rockchip,pins =
773                                 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
774                 };
775         };
776
777         wireless-bluetooth {
778                 uart0_gpios: uart0-gpios {
779                         rockchip,pins =
780                                 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
781                 };
782         };
783
784         usb2 {
785                 host_vbus_drv: host-vbus-drv {
786                         rockchip,pins =
787                                 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
788                 };
789         };
790
791         pmic {
792                 pmic_int_l: pmic-int-l {
793                         rockchip,pins =
794                                 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
795                 };
796
797                 vsel1_gpio: vsel1-gpio {
798                         rockchip,pins =
799                                 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
800                 };
801
802                 vsel2_gpio: vsel2-gpio {
803                         rockchip,pins =
804                                 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
805                 };
806         };
807
808         gmac {
809                 rgmii_sleep_pins: rgmii-sleep-pins {
810                         rockchip,pins =
811                                 <3 15 RK_FUNC_GPIO &pcfg_output_low>;
812                 };
813         };
814 };
815
816 &pvtm {
817         status = "okay";
818 };
819
820 &pmu_pvtm {
821         status = "okay";
822 };
823
824 &pmu_io_domains {
825         status = "okay";
826         pmu1830-supply = <&vcc_1v8>;
827 };
828
829 &vpu {
830         status = "okay";
831 };
832
833 &rkvdec {
834         status = "okay";
835 };
836
837 &rockchip_suspend {
838         status = "okay";
839         rockchip,sleep-debug-en = <0>;
840         rockchip,sleep-mode-config = <
841                 (0
842                 | RKPM_SLP_ARMPD
843                 | RKPM_SLP_PERILPPD
844                 | RKPM_SLP_DDR_RET
845                 | RKPM_SLP_PLLPD
846                 | RKPM_SLP_CENTER_PD
847                 | RKPM_SLP_AP_PWROFF
848                 )
849         >;
850         rockchip,wakeup-config = <
851                 (0
852                 | RKPM_GPIO_WKUP_EN
853                 | RKPM_PWM_WKUP_EN
854                 )
855         >;
856         rockchip,pwm-regulator-config = <
857                 (0
858                 | PWM2_REGULATOR_EN
859                 )
860         >;
861         rockchip,power-ctrl =
862                 <&gpio1 17 GPIO_ACTIVE_HIGH>,
863                 <&gpio1 14 GPIO_ACTIVE_HIGH>;
864 };