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