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