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