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