arm64: dts: rockchip: modify l-sensor node for rk3399 tablet product
[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-off-in-suspend;
544                                 };
545                         };
546
547                         vcc_ddr: DCDC_REG3 {
548                                 regulator-name = "vcc_ddr";
549                                 regulator-always-on;
550                                 regulator-boot-on;
551                                 regulator-state-mem {
552                                         regulator-on-in-suspend;
553                                 };
554                         };
555
556                         vcc_1v8: DCDC_REG4 {
557                                 regulator-name = "vcc_1v8";
558                                 regulator-always-on;
559                                 regulator-boot-on;
560                                 regulator-min-microvolt = <1800000>;
561                                 regulator-max-microvolt = <1800000>;
562                                 regulator-state-mem {
563                                         regulator-on-in-suspend;
564                                         regulator-suspend-microvolt = <1800000>;
565                                 };
566                         };
567
568                         vcca3v0_codec: LDO_REG1 {
569                                 regulator-always-on;
570                                 regulator-boot-on;
571                                 regulator-min-microvolt = <3000000>;
572                                 regulator-max-microvolt = <3000000>;
573                                 regulator-name = "vcca3v0_codec";
574                                 regulator-state-mem {
575                                         regulator-off-in-suspend;
576                                 };
577                         };
578
579                         vcc3v0_tp: LDO_REG2 {
580                                 regulator-always-on;
581                                 regulator-boot-on;
582                                 regulator-min-microvolt = <3000000>;
583                                 regulator-max-microvolt = <3000000>;
584                                 regulator-name = "vcc3v0_tp";
585                                 regulator-state-mem {
586                                         regulator-off-in-suspend;
587                                 };
588                         };
589
590                         vcca1v8_codec: LDO_REG3 {
591                                 regulator-always-on;
592                                 regulator-boot-on;
593                                 regulator-min-microvolt = <1800000>;
594                                 regulator-max-microvolt = <1800000>;
595                                 regulator-name = "vcca1v8_codec";
596                                 regulator-state-mem {
597                                         regulator-off-in-suspend;
598                                 };
599                         };
600
601                         vcc_power_on: LDO_REG4 {
602                                 regulator-always-on;
603                                 regulator-boot-on;
604                                 regulator-min-microvolt = <3300000>;
605                                 regulator-max-microvolt = <3300000>;
606                                 regulator-name = "vcc_power_on";
607                                 regulator-state-mem {
608                                         regulator-on-in-suspend;
609                                         regulator-suspend-microvolt = <3300000>;
610                                 };
611                         };
612
613                         vcc_3v0: LDO_REG5 {
614                                 regulator-always-on;
615                                 regulator-boot-on;
616                                 regulator-min-microvolt = <3000000>;
617                                 regulator-max-microvolt = <3000000>;
618                                 regulator-name = "vcc_3v0";
619                                 regulator-state-mem {
620                                         regulator-off-in-suspend;
621                                 };
622                         };
623
624                         vcc_1v5: LDO_REG6 {
625                                 regulator-always-on;
626                                 regulator-boot-on;
627                                 regulator-min-microvolt = <1500000>;
628                                 regulator-max-microvolt = <1500000>;
629                                 regulator-name = "vcc_1v5";
630                                 regulator-state-mem {
631                                         regulator-off-in-suspend;
632                                 };
633                         };
634
635                         vcc1v8_dvp: LDO_REG7 {
636                                 regulator-always-on;
637                                 regulator-boot-on;
638                                 regulator-min-microvolt = <1800000>;
639                                 regulator-max-microvolt = <1800000>;
640                                 regulator-name = "vcc1v8_dvp";
641                                 regulator-state-mem {
642                                         regulator-off-in-suspend;
643                                 };
644                         };
645
646                         vcc3v3_s3: LDO_REG8 {
647                                 regulator-always-on;
648                                 regulator-boot-on;
649                                 regulator-min-microvolt = <3300000>;
650                                 regulator-max-microvolt = <3300000>;
651                                 regulator-name = "vcc3v3_s3";
652                                 regulator-state-mem {
653                                         regulator-off-in-suspend;
654                                 };
655                         };
656
657                         vcc_sd: LDO_REG9 {
658                                 regulator-always-on;
659                                 regulator-boot-on;
660                                 regulator-min-microvolt = <1800000>;
661                                 regulator-max-microvolt = <3300000>;
662                                 regulator-name = "vcc_sd";
663                                 regulator-state-mem {
664                                         regulator-on-in-suspend;
665                                         regulator-suspend-microvolt = <3300000>;
666                                 };
667                         };
668
669                         vcc3v3_s0: SWITCH_REG {
670                                 regulator-always-on;
671                                 regulator-boot-on;
672                                 regulator-name = "vcc3v3_s0";
673                                 regulator-state-mem {
674                                         regulator-on-in-suspend;
675                                 };
676                         };
677                 };
678
679                 battery {
680                         compatible = "rk818-battery";
681                         ocv_table = <3400 3675 3689 3716 3740 3756 3768 3780
682                                 3793 3807 3827 3853 3896 3937 3974 4007 4066
683                                 4110 4161 4217 4308>;
684                         design_capacity = <7916>;
685                         design_qmax = <8708>;
686                         bat_res = <65>;
687                         max_input_current = <3000>;
688                         max_chrg_current = <3000>;
689                         max_chrg_voltage = <4350>;
690                         sleep_enter_current = <300>;
691                         sleep_exit_current = <300>;
692                         power_off_thresd = <3400>;
693                         zero_algorithm_vol = <3950>;
694                         fb_temperature = <105>;
695                         sample_res = <20>;
696                         max_soc_offset = <60>;
697                         energy_mode = <0>;
698                         monitor_sec = <5>;
699                         virtual_power = <0>;
700                         power_dc2otg = <0>;
701                 };
702         };
703 };
704
705 &i2c1 {
706         status = "okay";
707         i2c-scl-rising-time-ns = <140>;
708         i2c-scl-falling-time-ns = <30>;
709
710         es8316: es8316@10 {
711                 #sound-dai-cells = <0>;
712                 compatible = "everest,es8316";
713                 reg = <0x11>;
714                 pinctrl-names = "default";
715                 pinctrl-0 = <&hp_det>;
716                 clocks = <&cru SCLK_I2S_8CH_OUT>;
717                 clock-names = "mclk";
718                 spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
719                 hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
720         };
721 };
722
723 &i2c4 {
724         status = "okay";
725         i2c-scl-rising-time-ns = <345>;
726         i2c-scl-falling-time-ns = <11>;
727         clock-frequency = <400000>;
728
729         lsm330_accel@1e {
730                 status = "okay";
731                 compatible = "lsm330_acc";
732                 pinctrl-names = "default";
733                 pinctrl-0 = <&lsm330a_irq_gpio>;
734                 reg = <0x1e>;
735                 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>;
736                 type = <SENSOR_TYPE_ACCEL>;
737                 irq_enable = <1>;
738                 poll_delay_ms = <30>;
739                 layout = <4>;
740         };
741
742         lsm330_gyro@6a {
743                 status = "okay";
744                 compatible = "lsm330_gyro";
745                 pinctrl-names = "default";
746                 pinctrl-0 = <&lsm330g_irq_gpio>;
747                 reg = <0x6a>;
748                 irq-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>;
749                 type = <SENSOR_TYPE_GYROSCOPE>;
750                 irq_enable = <0>;
751                 poll_delay_ms = <30>;
752         };
753
754         mpu6500@68 {
755                 status = "disabled";
756                 compatible = "invensense,mpu6500";
757                 pinctrl-names = "default";
758                 pinctrl-0 = <&mpu6500_irq_gpio>;
759                 reg = <0x68>;
760                 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>;
761                 mpu-int_config = <0x10>;
762                 mpu-level_shifter = <0>;
763                 mpu-orientation = <1 0 0 0 1 0 0 0 1>;
764                 orientation-x= <1>;
765                 orientation-y= <1>;
766                 orientation-z= <0>;
767                 mpu-debug = <1>;
768         };
769
770         sensor@0d {
771                 status = "okay";
772                 compatible = "ak8963";
773                 pinctrl-names = "default";
774                 pinctrl-0 = <&ak8963_irq_gpio>;
775                 reg = <0x0d>;
776                 type = <SENSOR_TYPE_COMPASS>;
777                 irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>;
778                 irq_enable = <0>;
779                 poll_delay_ms = <30>;
780                 layout = <3>;
781         };
782
783         sensor@10 {
784                 status = "okay";
785                 compatible = "capella,light_cm3218";
786                 pinctrl-names = "default";
787                 pinctrl-0 = <&cm3218_irq_gpio>;
788                 reg = <0x10>;
789                 type = <SENSOR_TYPE_LIGHT>;
790                 irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_FALLING>;
791                 irq_enable = <1>;
792                 poll_delay_ms = <30>;
793         };
794
795         fusb0: fusb30x@22 {
796                 compatible = "fairchild,fusb302";
797                 reg = <0x22>;
798                 pinctrl-names = "default";
799                 pinctrl-0 = <&fusb0_int>;
800                 int-n-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
801                 status = "okay";
802         };
803 };
804
805 &i2c5 {
806         status = "okay";
807         i2c-scl-rising-time-ns = <150>;
808         i2c-scl-falling-time-ns = <30>;
809         clock-frequency = <400000>;
810
811         gt9xx: gt9xx@14 {
812                 compatible = "goodix,gt9xx";
813                 reg = <0x14>;
814                 touch-gpio = <&gpio3 12 IRQ_TYPE_LEVEL_LOW>;
815                 reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>;
816                 max-x = <1536>;
817                 max-y = <2048>;
818                 tp-size = <970>;
819                 tp-supply = <&vcc3v0_tp>;
820         };
821 };
822
823 &isp0 {
824         status = "okay";
825 };
826
827 &isp1 {
828         status = "okay";
829 };
830
831 &cpu_l0 {
832         cpu-supply = <&vdd_cpu_l>;
833 };
834
835 &cpu_l1 {
836         cpu-supply = <&vdd_cpu_l>;
837 };
838
839 &cpu_l2 {
840         cpu-supply = <&vdd_cpu_l>;
841 };
842
843 &cpu_l3 {
844         cpu-supply = <&vdd_cpu_l>;
845 };
846
847 &cpu_b0 {
848         cpu-supply = <&vdd_cpu_b>;
849 };
850
851 &cpu_b1 {
852         cpu-supply = <&vdd_cpu_b>;
853 };
854
855 &gpu {
856         status = "okay";
857         mali-supply = <&vdd_gpu>;
858 };
859
860 &rga {
861         status = "okay";
862 };
863
864 &spi1 {
865         status = "disabled";
866         max-freq = <50000000>;
867         mpu6500@0 {
868                 status = "disabled";
869                 compatible = "inv-spi,mpu6500";
870                 pinctrl-names = "default";
871                 pinctrl-0 = <&mpu6500_irq_gpio>;
872                 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>;
873                 reg = <0>;
874                 spi-max-frequency = <1000000>;
875                 spi-cpha;
876                 spi-cpol;
877                 mpu-int_config = <0x00>;
878                 mpu-level_shifter = <0>;
879                 mpu-orientation = <1 0 0 0 1 0 0 0 1>;
880                 orientation-x= <1>;
881                 orientation-y= <0>;
882                 orientation-z= <1>;
883                 mpu-debug = <1>;
884         };
885 };
886
887 &tcphy0 {
888         extcon = <&fusb0>;
889         status = "okay";
890 };
891
892 &tsadc {
893         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
894         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
895         status = "okay";
896 };
897
898 &u2phy0 {
899         status = "okay";
900         extcon = <&fusb0>;
901
902         u2phy0_otg: otg-port {
903                 status = "okay";
904         };
905
906         u2phy0_host: host-port {
907                 phy-supply = <&vcc5v0_host>;
908                 status = "okay";
909         };
910 };
911
912 &uart0 {
913         pinctrl-names = "default";
914         pinctrl-0 = <&uart0_xfer &uart0_cts>;
915         status = "okay";
916 };
917
918 &uart2 {
919         status = "okay";
920 };
921
922 &usb_host0_ehci {
923         status = "okay";
924 };
925
926 &usb_host0_ohci {
927         status = "okay";
928 };
929
930 &usbdrd3_0 {
931         extcon = <&fusb0>;
932         status = "okay";
933 };
934
935 &usbdrd_dwc3_0 {
936         status = "okay";
937 };
938
939 &vop0_pwm {
940         assigned-clocks = <&cru SCLK_VOP0_PWM>;
941         assigned-clock-rates = <50000000>;
942         status = "okay";
943 };
944
945 &pwm2 {
946         status = "okay";
947 };
948
949 &saradc {
950         status = "okay";
951 };
952
953 &pinctrl {
954         sdio-pwrseq {
955                 wifi_enable_h: wifi-enable-h {
956                         rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
957                 };
958         };
959
960         wireless-bluetooth {
961                 uart0_gpios: uart0-gpios {
962                         rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
963                 };
964         };
965
966         pmic {
967                 pmic_int_l: pmic-int-l {
968                         rockchip,pins =
969                                 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
970                 };
971
972                 pmic_dvs2: pmic-dvs2 {
973                         rockchip,pins =
974                                 <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
975                 };
976         };
977
978         headphone {
979                 hp_det: hp-det {
980                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>;
981                 };
982         };
983
984         lcdpwr-enable {
985                 lcdpwr_enable_h: lcdpwr-enable-h {
986                         rockchip,pins = <3 8 RK_FUNC_GPIO &pcfg_pull_up>;
987                 };
988         };
989
990         lsm330_a {
991                 lsm330a_irq_gpio: lsm330a-irq-gpio {
992                         rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
993                 };
994         };
995
996         lsm330_g {
997                 lsm330g_irq_gpio: lsm330g-irq-gpio {
998                         rockchip,pins = <1 20 RK_FUNC_GPIO &pcfg_pull_none>;
999                 };
1000         };
1001
1002         mpu6500 {
1003                 mpu6500_irq_gpio: mpu6500-irq-gpio {
1004                         rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
1005                 };
1006         };
1007
1008         ak8963 {
1009                 ak8963_irq_gpio: ak8963-irq-gpio {
1010                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
1011                 };
1012         };
1013
1014         cm3218 {
1015                 cm3218_irq_gpio: cm3218-irq-gpio {
1016                         rockchip,pins = <4 24 RK_FUNC_GPIO &pcfg_pull_up>;
1017                 };
1018         };
1019
1020         usb2 {
1021                 host_vbus_drv: host-vbus-drv {
1022                         rockchip,pins =
1023                                 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
1024                 };
1025         };
1026
1027         fusb30x {
1028                 fusb0_int: fusb0-int {
1029                         rockchip,pins =
1030                                 <1 1 RK_FUNC_GPIO &pcfg_pull_up>;
1031                 };
1032         };
1033 };
1034
1035 &rk_screen {
1036         #include <dt-bindings/display/screen-timing/lcd-LP097Qx2.dtsi>
1037 };
1038
1039 &vopb_rk_fb {
1040         status = "okay";
1041         rockchip,cabc_mode = <1>;
1042         power_ctr: power_ctr {
1043                 rockchip,debug = <0>;
1044
1045                 lcd_en: lcd-en {
1046                         rockchip,power_type = <GPIO>;
1047                         pinctrl-names = "default";
1048                         pinctrl-0 = <&lcdpwr_enable_h>;
1049                         gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
1050                         rockchip,delay = <10>;
1051                 };
1052         };
1053 };
1054
1055 &vopl_rk_fb {
1056         status = "okay";
1057 };
1058
1059 &edp_rk_fb {
1060         status = "okay";
1061 };