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