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