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