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