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