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