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