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