685a32629c21c86d99fe1c55b8f255bcb555c115
[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 = "disabled";
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 = <&dw_hdmi_audio>;
145                 };
146         };
147
148         dw_hdmi_audio: dw-hdmi-audio {
149                 status = "okay";
150                 compatible = "rockchip,dw-hdmi-audio";
151                 #sound-dai-cells = <0>;
152         };
153
154         sdio_pwrseq: sdio-pwrseq {
155                 compatible = "mmc-pwrseq-simple";
156                 clocks = <&rk808 1>;
157                 clock-names = "ext_clock";
158                 pinctrl-names = "default";
159                 pinctrl-0 = <&wifi_enable_h>;
160
161                 /*
162                  * On the module itself this is one of these (depending
163                  * on the actual card populated):
164                  * - SDIO_RESET_L_WL_REG_ON
165                  * - PDN (power down when low)
166                  */
167                 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
168         };
169
170         wireless-wlan {
171                 compatible = "wlan-platdata";
172                 rockchip,grf = <&grf>;
173                 wifi_chip_type = "ap6354";
174                 sdio_vref = <1800>;
175                 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
176                 status = "okay";
177         };
178
179         wireless-bluetooth {
180                 compatible = "bluetooth-platdata";
181                 clocks = <&rk808 1>;
182                 clock-names = "ext_clock";
183                 /* wifi-bt-power-toggle; */
184                 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
185                 pinctrl-names = "default", "rts_gpio";
186                 pinctrl-0 = <&uart0_rts>;
187                 pinctrl-1 = <&uart0_gpios>;
188                 /* BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
189                 BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>;
190                 BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>;
191                 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
192                 status = "okay";
193         };
194
195         test-power {
196                 status = "okay";
197         };
198 };
199
200 &sdmmc {
201         clock-frequency = <100000000>;
202         clock-freq-min-max = <100000 100000000>;
203         supports-sd;
204         bus-width = <4>;
205         cap-mmc-highspeed;
206         cap-sd-highspeed;
207         disable-wp;
208         num-slots = <1>;
209         //sd-uhs-sdr104;
210         vqmmc-supply = <&vcc_sd>;
211         pinctrl-names = "default";
212         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
213         card-detect-delay = <800>;
214         status = "okay";
215 };
216
217 &sdio0 {
218         clock-frequency = <100000000>;
219         clock-freq-min-max = <200000 100000000>;
220         supports-sdio;
221         bus-width = <4>;
222         disable-wp;
223         cap-sd-highspeed;
224         cap-sdio-irq;
225         keep-power-in-suspend;
226         mmc-pwrseq = <&sdio_pwrseq>;
227         non-removable;
228         num-slots = <1>;
229         pinctrl-names = "default";
230         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
231         sd-uhs-sdr104;
232         status = "okay";
233 };
234
235 &emmc_phy {
236         status = "okay";
237 };
238
239 &sdhci {
240         bus-width = <8>;
241         mmc-hs400-1_8v;
242         supports-emmc;
243         non-removable;
244         mmc-hs400-enhanced-strobe;
245         status = "okay";
246 };
247
248 &i2s0 {
249         status = "okay";
250         rockchip,i2s-broken-burst-len;
251         rockchip,playback-channels = <8>;
252         rockchip,capture-channels = <8>;
253         #sound-dai-cells = <0>;
254 };
255
256 &i2s2 {
257         #sound-dai-cells = <0>;
258 };
259
260 &spdif {
261         pinctrl-0 = <&spdif_bus_1>;
262         status = "okay";
263         #sound-dai-cells = <0>;
264 };
265
266 &i2c0 {
267         status = "okay";
268         i2c-scl-rising-time-ns = <168>;
269         i2c-scl-falling-time-ns = <4>;
270         clock-frequency = <400000>;
271
272         vdd_cpu_b: syr827@40 {
273                 compatible = "silergy,syr827";
274                 reg = <0x40>;
275                 regulator-compatible = "fan53555-reg";
276                 pinctrl-0 = <&vsel1_gpio>;
277                 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
278                 regulator-name = "vdd_cpu_b";
279                 regulator-min-microvolt = <712500>;
280                 regulator-max-microvolt = <1500000>;
281                 regulator-ramp-delay = <1000>;
282                 fcs,suspend-voltage-selector = <1>;
283                 regulator-always-on;
284                 regulator-boot-on;
285                 vin-supply = <&vcc_sys>;
286                 regulator-state-mem {
287                         regulator-off-in-suspend;
288                 };
289         };
290
291         vdd_gpu: syr828@41 {
292                 compatible = "silergy,syr828";
293                 reg = <0x41>;
294                 regulator-compatible = "fan53555-reg";
295                 pinctrl-0 = <&vsel2_gpio>;
296                 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
297                 regulator-name = "vdd_gpu";
298                 regulator-min-microvolt = <712500>;
299                 regulator-max-microvolt = <1500000>;
300                 regulator-ramp-delay = <1000>;
301                 fcs,suspend-voltage-selector = <1>;
302                 regulator-always-on;
303                 regulator-boot-on;
304                 vin-supply = <&vcc_sys>;
305                 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
306                 regulator-state-mem {
307                         regulator-off-in-suspend;
308                 };
309         };
310
311         rk808: pmic@1b {
312                 compatible = "rockchip,rk808";
313                 reg = <0x1b>;
314                 interrupt-parent = <&gpio1>;
315                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
316                 pinctrl-names = "default";
317                 pinctrl-0 = <&pmic_int_l>;
318                 rockchip,system-power-controller;
319                 wakeup-source;
320                 #clock-cells = <1>;
321                 clock-output-names = "xin32k", "rk808-clkout2";
322
323                 vcc1-supply = <&vcc_sys>;
324                 vcc2-supply = <&vcc_sys>;
325                 vcc3-supply = <&vcc_sys>;
326                 vcc4-supply = <&vcc_sys>;
327                 vcc6-supply = <&vcc_sys>;
328                 vcc7-supply = <&vcc_sys>;
329                 vcc8-supply = <&vcc3v3_sys>;
330                 vcc9-supply = <&vcc_sys>;
331                 vcc10-supply = <&vcc_sys>;
332                 vcc11-supply = <&vcc_sys>;
333                 vcc12-supply = <&vcc3v3_sys>;
334                 vddio-supply = <&vcc_1v8>;
335
336                 regulators {
337                         vdd_center: DCDC_REG1 {
338                                 regulator-name = "vdd_center";
339                                 regulator-min-microvolt = <750000>;
340                                 regulator-max-microvolt = <1350000>;
341                                 regulator-ramp-delay = <6001>;
342                                 regulator-always-on;
343                                 regulator-boot-on;
344                                 regulator-state-mem {
345                                         regulator-off-in-suspend;
346                                 };
347                         };
348
349                         vdd_cpu_l: DCDC_REG2 {
350                                 regulator-name = "vdd_cpu_l";
351                                 regulator-min-microvolt = <750000>;
352                                 regulator-max-microvolt = <1350000>;
353                                 regulator-ramp-delay = <6001>;
354                                 regulator-always-on;
355                                 regulator-boot-on;
356                                 regulator-state-mem {
357                                         regulator-off-in-suspend;
358                                 };
359                         };
360
361                         vcc_ddr: DCDC_REG3 {
362                                 regulator-name = "vcc_ddr";
363                                 regulator-always-on;
364                                 regulator-boot-on;
365                                 regulator-state-mem {
366                                         regulator-on-in-suspend;
367                                 };
368                         };
369
370                         vcc_1v8: DCDC_REG4 {
371                                 regulator-name = "vcc_1v8";
372                                 regulator-min-microvolt = <1800000>;
373                                 regulator-max-microvolt = <1800000>;
374                                 regulator-always-on;
375                                 regulator-boot-on;
376                                 regulator-state-mem {
377                                         regulator-on-in-suspend;
378                                         regulator-suspend-microvolt = <1800000>;
379                                 };
380                         };
381
382                         vcc1v8_dvp: LDO_REG1 {
383                                 regulator-name = "vcc1v8_dvp";
384                                 regulator-min-microvolt = <1800000>;
385                                 regulator-max-microvolt = <1800000>;
386                                 regulator-always-on;
387                                 regulator-boot-on;
388                                 regulator-state-mem {
389                                         regulator-on-in-suspend;
390                                         regulator-suspend-microvolt = <1800000>;
391                                 };
392                         };
393
394                         vcca1v8_hdmi: LDO_REG2 {
395                                 regulator-name = "vcca1v8_hdmi";
396                                 regulator-min-microvolt = <1800000>;
397                                 regulator-max-microvolt = <1800000>;
398                                 regulator-always-on;
399                                 regulator-boot-on;
400                                 regulator-state-mem {
401                                         regulator-on-in-suspend;
402                                         regulator-suspend-microvolt = <1800000>;
403                                 };
404                         };
405
406                         vcca_1v8: LDO_REG3 {
407                                 regulator-name = "vcca_1v8";
408                                 regulator-min-microvolt = <1800000>;
409                                 regulator-max-microvolt = <1800000>;
410                                 regulator-always-on;
411                                 regulator-boot-on;
412                                 regulator-state-mem {
413                                         regulator-on-in-suspend;
414                                         regulator-suspend-microvolt = <1800000>;
415                                 };
416                         };
417
418                         vcc_sd: LDO_REG4 {
419                                 regulator-name = "vcc_sd";
420                                 regulator-min-microvolt = <1800000>;
421                                 regulator-max-microvolt = <3300000>;
422                                 regulator-always-on;
423                                 regulator-boot-on;
424                                 regulator-state-mem {
425                                         regulator-on-in-suspend;
426                                         regulator-suspend-microvolt = <3300000>;
427                                 };
428                         };
429
430                         vcc3v0_sd: LDO_REG5 {
431                                 regulator-name = "vcc3v0_sd";
432                                 regulator-min-microvolt = <3000000>;
433                                 regulator-max-microvolt = <3000000>;
434                                 regulator-always-on;
435                                 regulator-boot-on;
436                                 regulator-state-mem {
437                                         regulator-on-in-suspend;
438                                         regulator-suspend-microvolt = <3000000>;
439                                 };
440                         };
441
442                         vcc_1v5: LDO_REG6 {
443                                 regulator-name = "vcc_1v5";
444                                 regulator-min-microvolt = <1500000>;
445                                 regulator-max-microvolt = <1500000>;
446                                 regulator-always-on;
447                                 regulator-boot-on;
448                                 regulator-state-mem {
449                                         regulator-on-in-suspend;
450                                         regulator-suspend-microvolt = <1500000>;
451                                 };
452                         };
453
454                         vcca0v9_hdmi: LDO_REG7 {
455                                 regulator-name = "vcca0v9_hdmi";
456                                 regulator-min-microvolt = <900000>;
457                                 regulator-max-microvolt = <900000>;
458                                 regulator-always-on;
459                                 regulator-boot-on;
460                                 regulator-state-mem {
461                                         regulator-on-in-suspend;
462                                         regulator-suspend-microvolt = <900000>;
463                                 };
464                         };
465
466                         vcc_3v0: LDO_REG8 {
467                                 regulator-name = "vcc_3v0";
468                                 regulator-min-microvolt = <3000000>;
469                                 regulator-max-microvolt = <3000000>;
470                                 regulator-always-on;
471                                 regulator-boot-on;
472                                 regulator-state-mem {
473                                         regulator-on-in-suspend;
474                                         regulator-suspend-microvolt = <3000000>;
475                                 };
476                         };
477
478                         vcc3v3_s3: SWITCH_REG1 {
479                                 regulator-name = "vcc3v3_s3";
480                                 regulator-always-on;
481                                 regulator-boot-on;
482                                 regulator-state-mem {
483                                         regulator-on-in-suspend;
484                                 };
485                         };
486
487                         vcc3v3_s0: SWITCH_REG2 {
488                                 regulator-name = "vcc3v3_s0";
489                                 regulator-always-on;
490                                 regulator-boot-on;
491                                 regulator-state-mem {
492                                         regulator-on-in-suspend;
493                                 };
494                         };
495                 };
496         };
497 };
498
499 &cpu_l0 {
500         cpu-supply = <&vdd_cpu_l>;
501 };
502
503 &cpu_l1 {
504         cpu-supply = <&vdd_cpu_l>;
505 };
506
507 &cpu_l2 {
508         cpu-supply = <&vdd_cpu_l>;
509 };
510
511 &cpu_l3 {
512         cpu-supply = <&vdd_cpu_l>;
513 };
514
515 &cpu_b0 {
516         cpu-supply = <&vdd_cpu_b>;
517 };
518
519 &cpu_b1 {
520         cpu-supply = <&vdd_cpu_b>;
521 };
522
523 &gpu {
524         status = "okay";
525         mali-supply = <&vdd_gpu>;
526 };
527
528 &rga {
529         status = "okay";
530 };
531
532 &threshold {
533         temperature = <85000>;
534 };
535
536 &target {
537         temperature = <100000>;
538 };
539
540 &soc_crit {
541         temperature = <105000>;
542 };
543
544 &tcphy0 {
545         extcon = <&fusb0>;
546         status = "okay";
547 };
548
549 &tcphy1 {
550         status = "okay";
551 };
552
553 &tsadc {
554         /* tshut mode 0:CRU 1:GPIO */
555         rockchip,hw-tshut-mode = <1>;
556         /* tshut polarity 0:LOW 1:HIGH */
557         rockchip,hw-tshut-polarity = <1>;
558         rockchip,hw-tshut-temp = <110000>;
559         status = "okay";
560 };
561
562 &u2phy0 {
563         status = "okay";
564         extcon = <&fusb0>;
565
566         u2phy0_otg: otg-port {
567                 status = "okay";
568         };
569
570         u2phy0_host: host-port {
571                 phy-supply = <&vcc5v0_host>;
572                 status = "okay";
573         };
574 };
575
576 &u2phy1 {
577         status = "okay";
578
579         u2phy1_otg: otg-port {
580                 status = "okay";
581         };
582
583         u2phy1_host: host-port {
584                 phy-supply = <&vcc5v0_host>;
585                 status = "okay";
586         };
587 };
588
589 &uart0 {
590         pinctrl-names = "default";
591         pinctrl-0 = <&uart0_xfer &uart0_cts>;
592         status = "okay";
593 };
594
595 &uart2 {
596         status = "okay";
597 };
598
599 &usb_host0_ehci {
600         status = "okay";
601 };
602
603 &usb_host0_ohci {
604         status = "okay";
605 };
606
607 &usb_host1_ehci {
608         status = "okay";
609 };
610
611 &usb_host1_ohci {
612         status = "okay";
613 };
614
615 &usbdrd3_0 {
616         extcon = <&fusb0>;
617         status = "okay";
618 };
619
620 &usbdrd_dwc3_0 {
621         dr_mode = "otg";
622         status = "okay";
623 };
624
625 &usbdrd3_1 {
626         status = "okay";
627 };
628
629 &usbdrd_dwc3_1 {
630         dr_mode = "host";
631         status = "okay";
632 };
633
634 &pwm2 {
635         status = "okay";
636 };
637
638 &pwm3 {
639         status = "okay";
640
641         interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
642         compatible = "rockchip,remotectl-pwm";
643         remote_pwm_id = <3>;
644         handle_cpu_id = <0>;
645
646         ir_key1 {
647                 rockchip,usercode = <0x4040>;
648                 rockchip,key_table =
649                         <0xf2   KEY_REPLY>,
650                         <0xba   KEY_BACK>,
651                         <0xf4   KEY_UP>,
652                         <0xf1   KEY_DOWN>,
653                         <0xef   KEY_LEFT>,
654                         <0xee   KEY_RIGHT>,
655                         <0xbd   KEY_HOME>,
656                         <0xea   KEY_VOLUMEUP>,
657                         <0xe3   KEY_VOLUMEDOWN>,
658                         <0xe2   KEY_SEARCH>,
659                         <0xb2   KEY_POWER>,
660                         <0xbc   KEY_MUTE>,
661                         <0xec   KEY_MENU>,
662                         <0xbf   0x190>,
663                         <0xe0   0x191>,
664                         <0xe1   0x192>,
665                         <0xe9   183>,
666                         <0xe6   248>,
667                         <0xe8   185>,
668                         <0xe7   186>,
669                         <0xf0   388>,
670                         <0xbe   0x175>;
671         };
672
673         ir_key2 {
674                 rockchip,usercode = <0xff00>;
675                 rockchip,key_table =
676                         <0xf9   KEY_HOME>,
677                         <0xbf   KEY_BACK>,
678                         <0xfb   KEY_MENU>,
679                         <0xaa   KEY_REPLY>,
680                         <0xb9   KEY_UP>,
681                         <0xe9   KEY_DOWN>,
682                         <0xb8   KEY_LEFT>,
683                         <0xea   KEY_RIGHT>,
684                         <0xeb   KEY_VOLUMEDOWN>,
685                         <0xef   KEY_VOLUMEUP>,
686                         <0xf7   KEY_MUTE>,
687                         <0xe7   KEY_POWER>,
688                         <0xfc   KEY_POWER>,
689                         <0xa9   KEY_VOLUMEDOWN>,
690                         <0xa8   KEY_VOLUMEDOWN>,
691                         <0xe0   KEY_VOLUMEDOWN>,
692                         <0xa5   KEY_VOLUMEDOWN>,
693                         <0xab   183>,
694                         <0xb7   388>,
695                         <0xf8   184>,
696                         <0xaf   185>,
697                         <0xed   KEY_VOLUMEDOWN>,
698                         <0xee   186>,
699                         <0xb3   KEY_VOLUMEDOWN>,
700                         <0xf1   KEY_VOLUMEDOWN>,
701                         <0xf2   KEY_VOLUMEDOWN>,
702                         <0xf3   KEY_SEARCH>,
703                         <0xb4   KEY_VOLUMEDOWN>,
704                         <0xbe   KEY_SEARCH>;
705         };
706
707         ir_key3 {
708                 rockchip,usercode = <0x1dcc>;
709                 rockchip,key_table =
710                         <0xee   KEY_REPLY>,
711                         <0xf0   KEY_BACK>,
712                         <0xf8   KEY_UP>,
713                         <0xbb   KEY_DOWN>,
714                         <0xef   KEY_LEFT>,
715                         <0xed   KEY_RIGHT>,
716                         <0xfc   KEY_HOME>,
717                         <0xf1   KEY_VOLUMEUP>,
718                         <0xfd   KEY_VOLUMEDOWN>,
719                         <0xb7   KEY_SEARCH>,
720                         <0xff   KEY_POWER>,
721                         <0xf3   KEY_MUTE>,
722                         <0xbf   KEY_MENU>,
723                         <0xf9   0x191>,
724                         <0xf5   0x192>,
725                         <0xb3   388>,
726                         <0xbe   KEY_1>,
727                         <0xba   KEY_2>,
728                         <0xb2   KEY_3>,
729                         <0xbd   KEY_4>,
730                         <0xf9   KEY_5>,
731                         <0xb1   KEY_6>,
732                         <0xfc   KEY_7>,
733                         <0xf8   KEY_8>,
734                         <0xb0   KEY_9>,
735                         <0xb6   KEY_0>,
736                         <0xb5   KEY_BACKSPACE>;
737         };
738 };
739
740 &gmac {
741         phy-supply = <&vcc_phy>;
742         phy-mode = "rgmii";
743         clock_in_out = "input";
744         snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
745         snps,reset-active-low;
746         snps,reset-delays-us = <0 10000 50000>;
747         assigned-clocks = <&cru SCLK_RMII_SRC>;
748         assigned-clock-parents = <&clkin_gmac>;
749         pinctrl-names = "default", "sleep";
750         pinctrl-0 = <&rgmii_pins>;
751         pinctrl-1 = <&rgmii_sleep_pins>;
752         tx_delay = <0x28>;
753         rx_delay = <0x11>;
754         status = "okay";
755 };
756
757 &saradc {
758         status = "okay";
759 };
760
761 &rk_screen {
762         #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
763 };
764
765 &disp_timings {
766         native-mode = <&timing1>; /* 1080p */
767 };
768
769 &vopb_rk_fb {
770         status = "okay";
771 };
772
773 &vopl_rk_fb {
774         status = "okay";
775 };
776
777 &fb {
778         rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
779 };
780
781 &hdmi_rk_fb {
782         status = "okay";
783         rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
784         rockchip,phy_table =
785                 <165000000 0 0 17 18 18 18>,
786                 <340000000 0 2 17 14 14 14>,
787                 <594000000 0 2 17  9  9  9>;
788 };
789
790 &cdn_dp_sound {
791         status = "okay";
792 };
793
794 &cdn_dp_fb {
795         status = "okay";
796         extcon = <&fusb0>;
797         phys = <&tcphy0_dp>;
798         dp_vop_sel = <DISPLAY_SOURCE_LCDC1>;
799 };
800
801 &i2s2 {
802         status = "okay";
803 };
804
805 &io_domains {
806         status = "okay";
807
808         bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
809         audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
810         sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
811         gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
812 };
813
814 &pinctrl {
815         sdio-pwrseq {
816                 wifi_enable_h: wifi-enable-h {
817                         rockchip,pins =
818                                 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
819                 };
820         };
821
822         wireless-bluetooth {
823                 uart0_gpios: uart0-gpios {
824                         rockchip,pins =
825                                 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
826                 };
827         };
828
829         usb2 {
830                 host_vbus_drv: host-vbus-drv {
831                         rockchip,pins =
832                                 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
833                 };
834         };
835
836         pmic {
837                 pmic_int_l: pmic-int-l {
838                         rockchip,pins =
839                                 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
840                 };
841
842                 vsel1_gpio: vsel1-gpio {
843                         rockchip,pins =
844                                 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
845                 };
846
847                 vsel2_gpio: vsel2-gpio {
848                         rockchip,pins =
849                                 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
850                 };
851         };
852
853         gmac {
854                 rgmii_sleep_pins: rgmii-sleep-pins {
855                         rockchip,pins =
856                                 <3 15 RK_FUNC_GPIO &pcfg_output_low>;
857                 };
858         };
859 };
860
861 &pvtm {
862         status = "okay";
863 };
864
865 &pmu_pvtm {
866         status = "okay";
867 };
868
869 &pmu_io_domains {
870         status = "okay";
871         pmu1830-supply = <&vcc_1v8>;
872 };
873
874 &rockchip_suspend {
875         status = "okay";
876         rockchip,sleep-debug-en = <0>;
877         rockchip,sleep-mode-config = <
878                 (0
879                 | RKPM_SLP_ARMPD
880                 | RKPM_SLP_PERILPPD
881                 | RKPM_SLP_DDR_RET
882                 | RKPM_SLP_PLLPD
883                 | RKPM_SLP_CENTER_PD
884                 | RKPM_SLP_AP_PWROFF
885                 )
886         >;
887         rockchip,wakeup-config = <
888                 (0
889                 | RKPM_GPIO_WKUP_EN
890                 | RKPM_PWM_WKUP_EN
891                 )
892         >;
893         rockchip,pwm-regulator-config = <
894                 (0
895                 | PWM2_REGULATOR_EN
896                 )
897         >;
898         rockchip,power-ctrl =
899                 <&gpio1 17 GPIO_ACTIVE_HIGH>,
900                 <&gpio1 14 GPIO_ACTIVE_HIGH>;
901 };