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