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