arm64: dts: rk3399-tve1205g: deploy audio configurations
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-tve1205g.dts
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
43 /dts-v1/;
44 #include <dt-bindings/pinctrl/rk.h>
45 #include "rk3399.dtsi"
46 #include "rk3399-android-next.dtsi"
47 #include "rk3399-opp.dtsi"
48 #include <dt-bindings/sensor-dev.h>
49 #include <dt-bindings/pwm/pwm.h>
50
51 / {
52         compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
53
54         edp_panel: edp-panel {
55                 compatible = "simple-panel";
56                 backlight = <&backlight>;
57                 power-supply = <&vcc3v3_s0>;
58                 enable-gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
59                 bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
60                 ports {
61                         panel_in_edp: endpoint {
62                                 remote-endpoint = <&edp_out_panel>;
63                         };
64                 };
65         };
66
67         usb_cam_gpio: usb-cam-gpio {
68                 compatible = "usb-cam-gpio";
69                 pinctrl-names = "default";
70                 pinctrl-0 = <&usb_cam_on_gpio>;
71                 hd-cam-gpios = <&gpio3 GPIO_A1 GPIO_ACTIVE_HIGH>;
72                 ir-cam-gpios = <&gpio3 GPIO_A2 GPIO_ACTIVE_HIGH>;
73                 status = "okay";
74         };
75
76         vcc_sys: vcc-sys {
77                 compatible = "regulator-fixed";
78                 regulator-name = "vcc_sys";
79                 regulator-always-on;
80                 regulator-boot-on;
81                 regulator-min-microvolt = <3900000>;
82                 regulator-max-microvolt = <3900000>;
83         };
84
85         vcc3v3_sys: vcc3v3-sys {
86                 compatible = "regulator-fixed";
87                 regulator-name = "vcc3v3_sys";
88                 regulator-always-on;
89                 regulator-boot-on;
90                 regulator-min-microvolt = <3300000>;
91                 regulator-max-microvolt = <3300000>;
92         };
93
94         vcc5v0_host: vcc5v0-host-regulator {
95                 compatible = "regulator-fixed";
96                 enable-active-high;
97                 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&host_vbus_drv>;
100                 regulator-name = "vcc5v0_host";
101                 regulator-always-on;
102         };
103
104         vdd_log: vdd-log {
105                 compatible = "pwm-regulator";
106                 pwms = <&pwm2 0 25000 0>;
107                 rockchip,pwm_id= <2>;
108                 rockchip,pwm_voltage = <1000000>;
109                 regulator-name = "vdd_log";
110                 regulator-min-microvolt = <750000>;
111                 regulator-max-microvolt = <1350000>;
112                 regulator-always-on;
113                 regulator-boot-on;
114         };
115
116         backlight: backlight {
117                 compatible = "pwm-backlight";
118                 pwms = <&pwm0 0 25000 0>;
119                 brightness-levels = <
120                         0   1   51  52  52  53  53  54
121                         54  55  55  56  56  57  57  58
122                         58  59  59  60  61  61  62  63
123                         63  64  65  65  66  67  67  68
124                         69  69  70  71  71  72  73  73
125                         74  75  75  76  77  77  78  79
126                         79  80  80  81  81  82  83  83
127                         84  85  86  86  87  88  89  89
128                         90  91  92  92  93  94  95  95
129                         96  97  98  98  99 100 101  101
130                         102 103 104 104 105 106 107 107
131                         108 109 110 110 111 112 113 113
132                         114 115 116 116 117 118 119 119
133                         120 121 122 122 123 124 125 125
134                         126 127 128 128 129 130 131 131
135                         132 133 134 134 135 136 137 137
136                         138 139 140 140 141 142 143 143
137                         144 145 146 146 147 148 149 149
138                         150 151 152 152 153 154 155 155
139                         156 157 158 158 159 160 161 161
140                         162 163 164 164 165 166 167 167
141                         168 169 170 170 171 172 173 173
142                         174 175 176 176 177 178 179 179
143                         180 181 182 182 183 184 185 185
144                         186 187 188 188 189 190 191 191
145                         216 217 218 218 219 220 221 221
146                         222 223 224 224 225 226 227 227
147                         228 229 230 230 231 232 233 233
148                         234 235 236 236 237 238 239 239
149                         240 241 242 242 243 244 245 245
150                         246 247 248 248 249 250 251 251
151                         252 253 254 254 255 255 255 255>;
152                 default-brightness-level = <200>;
153                 enable-gpios = <&gpio3 GPIO_A4 GPIO_ACTIVE_HIGH>;
154         };
155
156         vcc_phy: vcc-phy-regulator {
157                 compatible = "regulator-fixed";
158                 regulator-name = "vcc_phy";
159                 regulator-always-on;
160                 regulator-boot-on;
161         };
162
163         cx2072x-sound {
164                 compatible = "simple-audio-card";
165                 simple-audio-card,format = "i2s";
166                 simple-audio-card,name = "rockchip,cx2072x-codec";
167                 simple-audio-card,mclk-fs = <256>;
168                 simple-audio-card,widgets =
169                         "Microphone", "Microphone Jack",
170                         "Line", "Microphone Headset",
171                         "Headphone", "Headphone Jack",
172                         "Speaker", "Speaker External";
173                 simple-audio-card,routing =
174                         "PORTC", "Microphone Jack",
175                         "PortD Mic Bias", "Microphone Headset",
176                         "Headphone Jack", "PORTA",
177                         "Speaker External", "PORTG";
178                 simple-audio-card,cpu {
179                         sound-dai = <&i2s0>;
180                 };
181                 simple-audio-card,codec {
182                         sound-dai = <&cx2072x>;
183                 };
184         };
185
186         spdif-sound {
187                 compatible = "simple-audio-card";
188                 simple-audio-card,name = "rockchip,spdif";
189                 simple-audio-card,cpu {
190                         sound-dai = <&spdif>;
191                 };
192                 simple-audio-card,codec {
193                         sound-dai = <&spdif_out>;
194                 };
195         };
196
197         spdif_out: spdif-out {
198                 compatible = "linux,spdif-dit";
199                 #sound-dai-cells = <0>;
200         };
201
202         sdio_pwrseq: sdio-pwrseq {
203                 compatible = "mmc-pwrseq-simple";
204                 clocks = <&rk808 1>;
205                 clock-names = "ext_clock";
206                 pinctrl-names = "default";
207                 pinctrl-0 = <&wifi_enable_h>;
208
209                 /*
210                  * On the module itself this is one of these (depending
211                  * on the actual card populated):
212                  * - SDIO_RESET_L_WL_REG_ON
213                  * - PDN (power down when low)
214                  */
215                 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
216         };
217
218         leds: gpio-leds {
219                 compatible = "gpio-leds";
220                 pinctrl-names = "default";
221                 pinctrl-0 =<&leds_gpio>;
222
223                 led@1 {
224                         gpios = <&gpio1 GPIO_C6 GPIO_ACTIVE_HIGH>;
225                         label = "battery_led_amber";
226                 };
227
228                 led@2 {
229                         gpios = <&gpio1 GPIO_D0 GPIO_ACTIVE_HIGH>;
230                         label = "battery_led_white";
231                 };
232
233                 led@3 {
234                         gpios = <&gpio3 GPIO_A5 GPIO_ACTIVE_HIGH>;
235                         label = "call_answer_led";
236                 };
237
238                 led@4 {
239                         gpios = <&gpio3 GPIO_B1 GPIO_ACTIVE_HIGH>;
240                         label = "call_decline_led";
241                 };
242
243                 led@5 {
244                         gpios = <&gpio2 GPIO_D3 GPIO_ACTIVE_HIGH>;
245                         label = "rec_mute_led";
246                 };
247
248                 led@6 {
249                         gpios = <&gpio2 GPIO_D4 GPIO_ACTIVE_HIGH>;
250                         label = "play_mute_led";
251                 };
252
253                 led@7 {
254                         gpios = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
255                         label = "wl_led";
256                 };
257         };
258
259         wireless-wlan {
260                 compatible = "wlan-platdata";
261                 rockchip,grf = <&grf>;
262                 wifi_chip_type = "ap6354";
263                 sdio_vref = <1800>;
264                 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
265                 status = "okay";
266         };
267
268         wireless-bluetooth {
269                 compatible = "bluetooth-platdata";
270                 clocks = <&rk808 1>;
271                 clock-names = "ext_clock";
272                 //wifi-bt-power-toggle;
273                 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
274                 pinctrl-names = "default", "rts_gpio";
275                 pinctrl-0 = <&uart0_rts>;
276                 pinctrl-1 = <&uart0_gpios>;
277                 //BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
278                 BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
279                 BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
280                 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
281                 status = "okay";
282         };
283
284         uboot-charge {
285                 compatible = "rockchip,uboot-charge";
286                 rockchip,uboot-charge-on = <0>;
287                 rockchip,android-charge-on = <1>;
288         };
289
290         vibrator {
291                 compatible = "rk-vibrator-gpio";
292                 vibrator-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>;
293                 status = "okay";
294         };
295
296         rk_headset {
297                 compatible = "rockchip_headset";
298                 headset_gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
299                 pinctrl-names = "default";
300                 pinctrl-0 = <&hp_det>;
301                 io-channels = <&saradc 2>;
302         };
303
304         hall_sensor: hall-mh248 {
305                 compatible = "hall-mh248";
306                 pinctrl-names = "default";
307                 pinctrl-0 = <&mh248_irq_gpio>;
308                 irq-gpio = <&gpio0 GPIO_A1 IRQ_TYPE_EDGE_BOTH>;
309                 hall-active = <1>;
310                 status = "okay";
311         };
312 };
313
314 &rk_key {
315         compatible = "rockchip,key";
316         status = "okay";
317
318         io-channels = <&saradc 1>;
319
320         vol-up-key {
321                 linux,code = <114>;
322                 label = "volume up";
323                 rockchip,adc_value = <1>;
324         };
325
326         vol-down-key {
327                 linux,code = <115>;
328                 label = "volume down";
329                 rockchip,adc_value = <170>;
330         };
331
332         power-key {
333                 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
334                 linux,code = <116>;
335                 label = "power";
336                 gpio-key,wakeup;
337         };
338
339         menu-key {
340                 linux,code = <59>;
341                 label = "menu";
342                 rockchip,adc_value = <746>;
343         };
344
345         home-key {
346                 linux,code = <102>;
347                 label = "home";
348                 rockchip,adc_value = <355>;
349         };
350
351         back-key {
352                 linux,code = <158>;
353                 label = "back";
354                 rockchip,adc_value = <560>;
355         };
356
357         camera-key {
358                 linux,code = <212>;
359                 label = "camera";
360                 rockchip,adc_value = <450>;
361         };
362 };
363
364 &cpu_l0 {
365         cpu-supply = <&vdd_cpu_l>;
366 };
367
368 &cpu_l1 {
369         cpu-supply = <&vdd_cpu_l>;
370 };
371
372 &cpu_l2 {
373         cpu-supply = <&vdd_cpu_l>;
374 };
375
376 &cpu_l3 {
377         cpu-supply = <&vdd_cpu_l>;
378 };
379
380 &cpu_b0 {
381         cpu-supply = <&vdd_cpu_b>;
382 };
383
384 &cpu_b1 {
385         cpu-supply = <&vdd_cpu_b>;
386 };
387
388 &edp {
389         status = "okay";
390
391         ports {
392                 edp_out: port@1 {
393                         reg = <1>;
394                         #address-cells = <1>;
395                         #size-cells = <0>;
396                         edp_out_panel: endpoint@0 {
397                                 reg = <0>;
398                                 remote-endpoint = <&panel_in_edp>;
399                         };
400                 };
401         };
402 };
403
404 &emmc_phy {
405         status = "okay";
406 };
407
408 &gpu {
409         status = "okay";
410         mali-supply = <&vdd_gpu>;
411 };
412
413 &hdmi {
414         status = "disabled";
415 };
416
417 &i2s0 {
418         status = "okay";
419         rockchip,i2s-broken-burst-len;
420         rockchip,playback-channels = <8>;
421         rockchip,capture-channels = <8>;
422         rockchip,bclk-fs = <32>;
423         #sound-dai-cells = <0>;
424 };
425
426 &i2s2 {
427         #sound-dai-cells = <0>;
428 };
429
430 &i2c0 {
431         status = "okay";
432         i2c-scl-rising-time-ns = <180>;
433         i2c-scl-falling-time-ns = <30>;
434         clock-frequency = <400000>;
435
436         vdd_cpu_b: syr837@40 {
437                 compatible = "silergy,syr827";
438                 reg = <0x40>;
439                 vin-supply = <&vcc_sys>;
440                 regulator-compatible = "fan53555-reg";
441                 pinctrl-0 = <&vsel1_gpio>;
442                 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
443                 regulator-name = "vdd_cpu_b";
444                 regulator-min-microvolt = <712500>;
445                 regulator-max-microvolt = <1500000>;
446                 regulator-ramp-delay = <1000>;
447                 fcs,suspend-voltage-selector = <1>;
448                 regulator-always-on;
449                 regulator-initial-state = <3>;
450                 regulator-state-mem {
451                         regulator-off-in-suspend;
452                 };
453         };
454
455         vdd_gpu: syr828@41 {
456                 compatible = "silergy,syr828";
457                 status = "okay";
458                 reg = <0x41>;
459                 vin-supply = <&vcc_sys>;
460                 regulator-compatible = "fan53555-reg";
461                 pinctrl-0 = <&vsel2_gpio>;
462                 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
463                 regulator-name = "vdd_gpu";
464                 regulator-min-microvolt = <735000>;
465                 regulator-max-microvolt = <1400000>;
466                 regulator-ramp-delay = <1000>;
467                 fcs,suspend-voltage-selector = <1>;
468                 regulator-boot-on;
469                 regulator-state-mem {
470                         regulator-off-in-suspend;
471                 };
472         };
473
474         rk808: pmic@1b {
475                 compatible = "rockchip,rk808";
476                 reg = <0x1b>;
477                 interrupt-parent = <&gpio1>;
478                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
479                 pinctrl-0 = <&pmic_int_l>;
480                 rockchip,system-power-controller;
481                 wakeup-source;
482                 #clock-cells = <1>;
483                 clock-output-names = "xin32k", "rk808-clkout2";
484
485                 vcc1-supply = <&vcc3v3_sys>;
486                 vcc2-supply = <&vcc3v3_sys>;
487                 vcc3-supply = <&vcc3v3_sys>;
488                 vcc4-supply = <&vcc3v3_sys>;
489                 vcc6-supply = <&vcc3v3_sys>;
490                 vcc7-supply = <&vcc3v3_sys>;
491                 vcc8-supply = <&vcc3v3_sys>;
492                 vcc9-supply = <&vcc3v3_sys>;
493                 vcc10-supply = <&vcc3v3_sys>;
494                 vcc11-supply = <&vcc3v3_sys>;
495                 vcc12-supply = <&vcc3v3_sys>;
496                 vddio-supply = <&vcc1v8_pmu>;
497
498                 regulators {
499                         vdd_center: DCDC_REG1 {
500                                 regulator-always-on;
501                                 regulator-boot-on;
502                                 regulator-min-microvolt = <750000>;
503                                 regulator-max-microvolt = <1350000>;
504                                 regulator-ramp-delay = <6001>;
505                                 regulator-name = "vdd_center";
506                                 regulator-state-mem {
507                                         regulator-off-in-suspend;
508                                 };
509                         };
510
511                         vdd_cpu_l: DCDC_REG2 {
512                                 regulator-always-on;
513                                 regulator-boot-on;
514                                 regulator-min-microvolt = <750000>;
515                                 regulator-max-microvolt = <1350000>;
516                                 regulator-ramp-delay = <6001>;
517                                 regulator-name = "vdd_cpu_l";
518                                 regulator-state-mem {
519                                         regulator-off-in-suspend;
520                                 };
521                         };
522
523                         vcc_ddr: DCDC_REG3 {
524                                 regulator-always-on;
525                                 regulator-boot-on;
526                                 regulator-name = "vcc_ddr";
527                                 regulator-state-mem {
528                                         regulator-on-in-suspend;
529                                 };
530                         };
531
532                         vcc_1v8: DCDC_REG4 {
533                                 regulator-always-on;
534                                 regulator-boot-on;
535                                 regulator-min-microvolt = <1800000>;
536                                 regulator-max-microvolt = <1800000>;
537                                 regulator-name = "vcc_1v8";
538                                 regulator-state-mem {
539                                         regulator-on-in-suspend;
540                                         regulator-suspend-microvolt = <1800000>;
541                                 };
542                         };
543
544                         vcc1v8_dvp: LDO_REG1 {
545                                 regulator-always-on;
546                                 regulator-boot-on;
547                                 regulator-min-microvolt = <1800000>;
548                                 regulator-max-microvolt = <1800000>;
549                                 regulator-name = "vcc1v8_dvp";
550                                 regulator-state-mem {
551                                         regulator-off-in-suspend;
552                                 };
553                         };
554
555                         vcc3v0_tp: LDO_REG2 {
556                                 regulator-always-on;
557                                 regulator-boot-on;
558                                 regulator-min-microvolt = <3000000>;
559                                 regulator-max-microvolt = <3000000>;
560                                 regulator-name = "vcc3v0_tp";
561                                 regulator-state-mem {
562                                         regulator-off-in-suspend;
563                                 };
564                         };
565
566                         vcc1v8_pmu: LDO_REG3 {
567                                 regulator-always-on;
568                                 regulator-boot-on;
569                                 regulator-min-microvolt = <1800000>;
570                                 regulator-max-microvolt = <1800000>;
571                                 regulator-name = "vcc1v8_pmu";
572                                 regulator-state-mem {
573                                         regulator-on-in-suspend;
574                                         regulator-suspend-microvolt = <1800000>;
575                                 };
576                         };
577
578                         vcc_sd: LDO_REG4 {
579                                 regulator-always-on;
580                                 regulator-boot-on;
581                                 regulator-min-microvolt = <1800000>;
582                                 regulator-max-microvolt = <3300000>;
583                                 regulator-name = "vcc_sd";
584                                 regulator-state-mem {
585                                         regulator-on-in-suspend;
586                                         regulator-suspend-microvolt = <3300000>;
587                                 };
588                         };
589
590                         vcca3v0_codec: LDO_REG5 {
591                                 regulator-always-on;
592                                 regulator-boot-on;
593                                 regulator-min-microvolt = <3000000>;
594                                 regulator-max-microvolt = <3000000>;
595                                 regulator-name = "vcca3v0_codec";
596                                 regulator-state-mem {
597                                         regulator-on-in-suspend;
598                                         regulator-suspend-microvolt = <3000000>;
599                                 };
600                         };
601
602                         vcc_1v5: LDO_REG6 {
603                                 regulator-always-on;
604                                 regulator-boot-on;
605                                 regulator-min-microvolt = <1500000>;
606                                 regulator-max-microvolt = <1500000>;
607                                 regulator-name = "vcc_1v5";
608                                 regulator-state-mem {
609                                         regulator-on-in-suspend;
610                                         regulator-suspend-microvolt = <1500000>;
611                                 };
612                         };
613
614                         vcca1v8_codec: LDO_REG7 {
615                                 regulator-always-on;
616                                 regulator-boot-on;
617                                 regulator-min-microvolt = <1800000>;
618                                 regulator-max-microvolt = <1800000>;
619                                 regulator-name = "vcca1v8_codec";
620                                 regulator-state-mem {
621                                         regulator-on-in-suspend;
622                                         regulator-suspend-microvolt = <1800000>;
623                                 };
624                         };
625
626                         vcc_3v0: LDO_REG8 {
627                                 regulator-always-on;
628                                 regulator-boot-on;
629                                 regulator-min-microvolt = <3000000>;
630                                 regulator-max-microvolt = <3000000>;
631                                 regulator-name = "vcc_3v0";
632                                 regulator-state-mem {
633                                         regulator-on-in-suspend;
634                                         regulator-suspend-microvolt = <3000000>;
635                                 };
636                         };
637
638                         vcc3v3_s3: SWITCH_REG1 {
639                                 regulator-always-on;
640                                 regulator-boot-on;
641                                 regulator-name = "vcc3v3_s3";
642                                 regulator-state-mem {
643                                         regulator-off-in-suspend;
644                                 };
645                         };
646
647                         vcc3v3_s0: SWITCH_REG2 {
648                                 regulator-always-on;
649                                 regulator-boot-on;
650                                 regulator-name = "vcc3v3_s0";
651                                 regulator-state-mem {
652                                         regulator-off-in-suspend;
653                                 };
654                         };
655                 };
656         };
657 };
658
659 &i2c1 {
660         status = "okay";
661         i2c-scl-rising-time-ns = <140>;
662         i2c-scl-falling-time-ns = <30>;
663
664         cx2072x:cx2072x@33 {
665                 status = "okay";
666                 #sound-dai-cells = <0>;
667                 compatible = "cnxt,cx20723";
668                 reg = <0x33>;
669                 clocks = <&cru SCLK_I2S_8CH_OUT>;
670                 clock-names = "mclk";
671                 spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
672         };
673 };
674
675 &i2c3 {
676         status="okay";
677
678         hidkey@68 {
679                 clock-frequency = <100000>;
680                 compatible = "hid-over-i2c";
681                 interrupt-parent = <&gpio0>;
682                 interrupts = <GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
683                 pinctrl-names = "default";
684                 pinctrl-0 = <&hidkey_irq_gpio>;
685                 reg = <0x68>;
686                 hid-descr-addr = <0x0001>;
687                 hid-support-wakeup;
688         };
689
690         ec_battery@76 {
691                 compatible = "rockchip,ec-battery";
692                 reg = <0x76>;
693                 virtual_power = <0>;
694                 monitor_sec = <5>;
695                 ec-notify-gpios = <&gpio1 GPIO_C4 GPIO_ACTIVE_HIGH>;
696         };
697 };
698
699 &i2c2 {
700         status = "okay";
701         i2c-scl-rising-time-ns = <345>;
702         i2c-scl-falling-time-ns = <11>;
703         clock-frequency = <400000>;
704
705         touchpad: touchpad@2c {
706                 compatible = "hid-over-i2c";
707                 interrupt-parent = <&gpio1>;
708                 interrupts = <GPIO_C2 IRQ_TYPE_LEVEL_LOW>;
709                 pinctrl-names = "default";
710                 pinctrl-0 = <&touchpad_irq_gpio>;
711                 reg = <0x2c>;
712                 hid-descr-addr = <0x002c>;
713         };
714 };
715
716 &i2c4 {
717         status = "okay";
718         clock-frequency = <100000>;
719         bq25700: bq25700@09 {//6a
720                 compatible = "ti,bq25700";
721                 reg = <0x09>;
722                 extcon = <&fusb0>, <&fusb1>;
723
724                 interrupt-parent = <&gpio1>;
725                 interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
726                 pinctrl-names = "default";
727                 pinctrl-0 = <&charger_ok>;
728                 ti,charge-current = <2500000>;
729                 ti,max-input-voltage = <20000000>;
730                 ti,max-input-current = <6000000>;
731                 ti,max-charge-voltage = <8750000>;
732                 ti,input-current = <500000>;
733                 ti,input-current-sdp = <500000>;
734                 ti,input-current-dcp = <2000000>;
735                 ti,input-current-cdp = <2000000>;
736                 ti,minimum-sys-voltage = <7400000>;
737                 ti,otg-voltage = <5000000>;
738                 ti,otg-current = <500000>;
739                 pd-charge-only = <1>;
740                 typec0-enable-gpios = <&gpio1 GPIO_A3 GPIO_ACTIVE_HIGH>;
741                 typec1-enable-gpios = <&gpio1 GPIO_A4 GPIO_ACTIVE_HIGH>;
742                 typec0-discharge-gpios = <&gpio0 GPIO_B4 GPIO_ACTIVE_HIGH>;
743                 typec1-discharge-gpios = <&gpio0 GPIO_B5 GPIO_ACTIVE_HIGH>;
744         };
745 };
746
747 &i2c6 {
748         status = "okay";
749         i2c-scl-rising-time-ns = <345>;
750         i2c-scl-falling-time-ns = <11>;
751         clock-frequency = <400000>;
752
753         fusb1: fusb30x@22 {
754                 compatible = "fairchild,fusb302";
755                 reg = <0x22>;
756                 pinctrl-names = "default";
757                 pinctrl-0 = <&fusb1_int>;
758                 vbus-5v-gpios = <&gpio4 GPIO_D6 GPIO_ACTIVE_LOW>;
759                 int-n-gpios = <&gpio1 GPIO_B5 GPIO_ACTIVE_HIGH>;
760                 charge-dev = <&bq25700>;
761                 status = "okay";
762         };
763 };
764
765 &i2c7 {
766         status = "okay";
767         i2c-scl-rising-time-ns = <345>;
768         i2c-scl-falling-time-ns = <11>;
769         clock-frequency = <400000>;
770
771         fusb0: fusb30x@22 {
772                 compatible = "fairchild,fusb302";
773                 reg = <0x22>;
774                 pinctrl-names = "default";
775                 pinctrl-0 = <&fusb0_int>;
776                 vbus-5v-gpios = <&gpio4 GPIO_D5 GPIO_ACTIVE_LOW>;
777                 int-n-gpios = <&gpio1 GPIO_A2 GPIO_ACTIVE_HIGH>;
778                 charge-dev = <&bq25700>;
779                 status = "okay";
780         };
781 };
782
783 &io_domains {
784         status = "okay";
785         bt656-supply = <&vcc_3v0>;
786         audio-supply = <&vcca1v8_codec>;
787         sdmmc-supply = <&vcc_sd>;
788         gpio1830-supply = <&vcc_3v0>;
789 };
790
791 &mipi_dsi {
792         status = "disabled";
793 };
794
795 &pmu_io_domains {
796         status = "okay";
797         pmu1830-supply = <&vcc_1v8>;
798 };
799
800 &pwm0 {
801         status = "okay";
802 };
803
804 &pwm2 {
805         status = "okay";
806 };
807
808 &rkvdec {
809         status = "okay";
810 };
811
812 &route_edp {
813         status = "okay";
814         logo,mode = "center";
815 };
816
817 &rga {
818         status = "okay";
819 };
820
821 &saradc {
822         status = "okay";
823 };
824
825 &sdmmc {
826         clock-frequency = <50000000>;
827         clock-freq-min-max = <400000 150000000>;
828         supports-sd;
829         bus-width = <4>;
830         cap-mmc-highspeed;
831         cap-sd-highspeed;
832         disable-wp;
833         num-slots = <1>;
834         //sd-uhs-sdr104;
835         vqmmc-supply = <&vcc_sd>;
836         pinctrl-names = "default";
837         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
838         status = "okay";
839 };
840
841 &sdio0 {
842         clock-frequency = <150000000>;
843         clock-freq-min-max = <200000 150000000>;
844         supports-sdio;
845         bus-width = <4>;
846         disable-wp;
847         cap-sd-highspeed;
848         cap-sdio-irq;
849         keep-power-in-suspend;
850         mmc-pwrseq = <&sdio_pwrseq>;
851         non-removable;
852         num-slots = <1>;
853         pinctrl-names = "default";
854         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
855         sd-uhs-sdr104;
856         status = "okay";
857 };
858
859 &sdhci {
860         bus-width = <8>;
861         mmc-hs400-1_8v;
862         supports-emmc;
863         non-removable;
864         keep-power-in-suspend;
865         mmc-hs400-enhanced-strobe;
866         status = "okay";
867 };
868
869 &spdif {
870         status = "okay";
871         #sound-dai-cells = <0>;
872 };
873
874 &spi1 {
875         status = "disabled";
876 };
877
878 &tcphy0 {
879         extcon = <&fusb0>;
880         status = "okay";
881 };
882
883 &tcphy1 {
884         extcon = <&fusb1>;
885         status = "okay";
886 };
887
888 &tsadc {
889         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
890         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
891         status = "okay";
892 };
893
894 &u2phy0 {
895         status = "okay";
896         extcon = <&fusb0>;
897
898         u2phy0_otg: otg-port {
899                 status = "okay";
900         };
901
902         u2phy0_host: host-port {
903                 phy-supply = <&vcc5v0_host>;
904                 status = "okay";
905         };
906 };
907
908 &u2phy1 {
909         status = "okay";
910         extcon = <&fusb1>;
911
912         u2phy1_otg: otg-port {
913                 status = "okay";
914         };
915
916         u2phy1_host: host-port {
917                 phy-supply = <&vcc5v0_host>;
918                 status = "okay";
919         };
920 };
921
922 &uart0 {
923         pinctrl-names = "default";
924         pinctrl-0 = <&uart0_xfer &uart0_cts>;
925         status = "okay";
926 };
927
928 &uart2 {
929         status = "okay";
930 };
931
932 &usb_host0_ehci {
933         status = "okay";
934 };
935
936 &usb_host0_ohci {
937         status = "okay";
938 };
939
940 &usbdrd3_0 {
941         extcon = <&fusb0>;
942         status = "okay";
943 };
944
945 &usbdrd_dwc3_0 {
946         status = "okay";
947 };
948
949 &usb_host1_ehci {
950         status = "okay";
951 };
952
953 &usb_host1_ohci {
954         status = "okay";
955 };
956
957 &usbdrd3_1 {
958         extcon = <&fusb1>;
959         status = "okay";
960 };
961
962 &usbdrd_dwc3_1 {
963         status = "okay";
964 };
965
966 &vpu {
967         status = "okay";
968 };
969
970 &pinctrl {
971         sdio-pwrseq {
972                 wifi_enable_h: wifi-enable-h {
973                         rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
974                 };
975         };
976
977         wireless-bluetooth {
978                 uart0_gpios: uart0-gpios {
979                         rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
980                 };
981         };
982
983         pmic {
984                 pmic_int_l: pmic-int-l {
985                         rockchip,pins =
986                                 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
987                 };
988                 vsel1_gpio: vsel1-gpio {
989                         rockchip,pins =
990                                 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
991                 };
992                 vsel2_gpio: vsel2-gpio {
993                         rockchip,pins =
994                                 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
995                 };
996         };
997
998         headphone {
999                 hp_det: hp-det {
1000                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>;
1001                 };
1002         };
1003
1004         hallsensor {
1005                 mh248_irq_gpio: mh248-irq-gpio {
1006                         rockchip,pins = <0 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>;
1007                 };
1008         };
1009
1010         hidkey {
1011                 hidkey_irq_gpio: hidkey-irq-gpio {
1012                         rockchip,pins = <0 GPIO_B0 RK_FUNC_GPIO &pcfg_pull_up>;
1013                 };
1014         };
1015
1016         touchpad {
1017                 touchpad_irq_gpio: touchpad-irq-gpio {
1018                         rockchip,pins = <1 GPIO_C2 RK_FUNC_GPIO &pcfg_pull_up>;
1019                 };
1020         };
1021
1022         charger {
1023                 charger_ok: charge-ok {
1024                         rockchip,pins =
1025                                 <1 23 RK_FUNC_GPIO &pcfg_pull_up>;
1026                 };
1027         };
1028
1029         gpio-leds {
1030                 leds_gpio: leds-gpio {
1031                         rockchip,pins =
1032                                 <1 GPIO_C6 RK_FUNC_GPIO &pcfg_pull_up>,
1033                                 <1 GPIO_D0 RK_FUNC_GPIO &pcfg_pull_up>,
1034                                 <3 GPIO_A5 RK_FUNC_GPIO &pcfg_pull_up>,
1035                                 <3 GPIO_B1 RK_FUNC_GPIO &pcfg_pull_up>,
1036                                 <2 GPIO_D3 RK_FUNC_GPIO &pcfg_pull_up>,
1037                                 <2 GPIO_D4 RK_FUNC_GPIO &pcfg_pull_up>,
1038                                 <4 GPIO_D2 RK_FUNC_GPIO &pcfg_pull_up>;
1039                 };
1040         };
1041
1042         usb2 {
1043                 host_vbus_drv: host-vbus-drv {
1044                         rockchip,pins =
1045                                 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
1046                 };
1047         };
1048
1049         usb_camera {
1050                 usb_cam_on_gpio: usb-cam-on-gpio {
1051                         rockchip,pins =
1052                                 <3 GPIO_A1 RK_FUNC_GPIO &pcfg_pull_up>,
1053                                 <3 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>;
1054                 };
1055         };
1056
1057         fusb30x {
1058                 fusb0_int: fusb0-int {
1059                         rockchip,pins =
1060                                 <1 GPIO_A2 RK_FUNC_GPIO &pcfg_pull_up>;
1061                 };
1062                 fusb1_int: fusb1-int {
1063                         rockchip,pins =
1064                                 <1 GPIO_B5 RK_FUNC_GPIO &pcfg_pull_up>;
1065                 };
1066         };
1067 };