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