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