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