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