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