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