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