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