eefd8fd5df084c7e972a1c903957ab482cb1af7e
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-mid-818-android.dts
1 /*
2  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 /dts-v1/;
44
45 #include "rk3399.dtsi"
46 #include "rk3399-android.dtsi"
47 #include <dt-bindings/sensor-dev.h>
48
49 / {
50         compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
51
52         vcc_sys: vcc-sys {
53                 compatible = "regulator-fixed";
54                 regulator-name = "vcc_sys";
55                 regulator-always-on;
56                 regulator-boot-on;
57                 regulator-min-microvolt = <3900000>;
58                 regulator-max-microvolt = <3900000>;
59         };
60
61         vcc3v3_sys: vcc3v3-sys {
62                 compatible = "regulator-fixed";
63                 regulator-name = "vcc3v3_sys";
64                 regulator-always-on;
65                 regulator-boot-on;
66                 regulator-min-microvolt = <3300000>;
67                 regulator-max-microvolt = <3300000>;
68         };
69
70         vcc5v0_host: vcc5v0-host-regulator {
71                 compatible = "regulator-fixed";
72                 enable-active-high;
73                 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
74                 pinctrl-names = "default";
75                 pinctrl-0 = <&host_vbus_drv>;
76                 regulator-name = "vcc5v0_host";
77         };
78
79         vdd_log: vdd-log {
80                 compatible = "pwm-regulator";
81                 pwms = <&pwm2 0 25000 0>;
82                 rockchip,pwm_id= <2>;
83                 rockchip,pwm_voltage = <900000>;
84                 regulator-name = "vdd_log";
85                 regulator-min-microvolt = <750000>;
86                 regulator-max-microvolt = <1350000>;
87                 regulator-always-on;
88                 regulator-boot-on;
89         };
90
91         backlight: backlight {
92                 compatible = "pwm-backlight";
93                 pwms = <&pwm0 0 25000 0>;
94                 brightness-levels = <
95                         255 254 253 252 251 250 249 248 247 246 245 244
96                         243 242 241 240 239 238 237 236 235 234 233 232
97                         231 230 229 228 227 226 225 224 223 222 221 220
98                         219 218 217 216 215 214 213 212 211 210 209 208
99                         207 206 205 204 203 202 201 200 199 198 197 196
100                         195 194 193 192 191 190 189 188 187 186 185 184
101                         183 182 181 180 179 178 177 176 175 174 173 172
102                         171 170 169 168 167 166 165 164 163 162 161 160
103                         159 158 157 156 155 154 153 152 151 150 149 148
104                         147 146 145 144 143 142 141 140 139 138 137 136
105                         135 134 133 132 131 130 129 128 127 126 125 124
106                         123 122 121 120 119 118 117 116 115 114 113 112
107                         111 110 109 108 107 106 105 104 103 102 101 100
108                          99  98  97  96  95  94  93  92  91  90  89  88
109                          87  86  85  84  83  82  81  80  79  78  77  76
110                          75  74  73  72  71  70  69  68  67  66  65  64
111                          63  62  61  60  59  58  57  56  55  54  53  52
112                          51  50  49  48  47  46  45  44  43  42  41  40
113                          39  38  37  36  35  34  33  32  31  30  29  28
114                          27  26  25  24  23  22  21  20  19  18  17  16
115                          15  14  13  12  11  10   9   8   7   6   5   4
116                           3   2   1   0>;
117                 default-brightness-level = <200>;
118                 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
119         };
120
121         vcc_phy: vcc-phy-regulator {
122                 compatible = "regulator-fixed";
123                 regulator-name = "vcc_phy";
124                 regulator-always-on;
125                 regulator-boot-on;
126         };
127
128         io-domains {
129                 compatible = "rockchip,rk3399-io-voltage-domain";
130                 rockchip,grf = <&grf>;
131
132                 bt656-supply = <&vcc1v8_dvp>;
133                 audio-supply = <&vcca1v8_codec>;
134                 sdmmc-supply = <&vcc_sd>;
135                 gpio1830-supply = <&vcc_3v0>;
136         };
137
138         pmu-io-domains {
139                 compatible = "rockchip,rk3399-pmu-io-voltage-domain";
140                 rockchip,grf = <&pmugrf>;
141
142                 pmu1830-supply = <&vcc_1v8>;
143         };
144
145         es8316-sound {
146                 compatible = "simple-audio-card";
147                 simple-audio-card,format = "i2s";
148                 simple-audio-card,name = "rockchip,es8316-codec";
149                 simple-audio-card,mclk-fs = <256>;
150                 simple-audio-card,widgets =
151                         "Microphone", "Mic Jack",
152                         "Headphone", "Headphone Jack";
153                 simple-audio-card,routing =
154                         "Mic Jack", "MICBIAS1",
155                         "IN1P", "Mic Jack",
156                         "Headphone Jack", "HPOL",
157                         "Headphone Jack", "HPOR";
158                 simple-audio-card,cpu {
159                         sound-dai = <&i2s0>;
160                 };
161                 simple-audio-card,codec {
162                         sound-dai = <&es8316>;
163                 };
164         };
165
166         spdif-sound {
167                 compatible = "simple-audio-card";
168                 simple-audio-card,name = "rockchip,spdif";
169                 simple-audio-card,cpu {
170                         sound-dai = <&spdif>;
171                 };
172                 simple-audio-card,codec {
173                         sound-dai = <&spdif_out>;
174                 };
175         };
176
177         spdif_out: spdif-out {
178                 compatible = "linux,spdif-dit";
179                 #sound-dai-cells = <0>;
180         };
181
182         sdio_pwrseq: sdio-pwrseq {
183                 compatible = "mmc-pwrseq-simple";
184                 clocks = <&rk818 1>;
185                 clock-names = "ext_clock";
186                 pinctrl-names = "default";
187                 pinctrl-0 = <&wifi_enable_h>;
188
189                 /*
190                  * On the module itself this is one of these (depending
191                  * on the actual card populated):
192                  * - SDIO_RESET_L_WL_REG_ON
193                  * - PDN (power down when low)
194                  */
195                 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
196         };
197
198         wireless-wlan {
199                 compatible = "wlan-platdata";
200                 rockchip,grf = <&grf>;
201                 wifi_chip_type = "ap6354";
202                 sdio_vref = <1800>;
203                 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
204                 status = "okay";
205         };
206
207         wireless-bluetooth {
208                 compatible = "bluetooth-platdata";
209                 //wifi-bt-power-toggle;
210                 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
211                 pinctrl-names = "default", "rts_gpio";
212                 pinctrl-0 = <&uart0_rts>;
213                 pinctrl-1 = <&uart0_gpios>;
214                 //BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
215                 BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
216                 BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
217                 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
218                 status = "okay";
219         };
220 };
221
222 &sdmmc {
223         clock-frequency = <50000000>;
224         clock-freq-min-max = <400000 150000000>;
225         supports-sd;
226         bus-width = <4>;
227         cap-mmc-highspeed;
228         cap-sd-highspeed;
229         disable-wp;
230         num-slots = <1>;
231         sd-uhs-sdr104;
232         vqmmc-supply = <&vcc_sd>;
233         pinctrl-names = "default";
234         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
235         status = "okay";
236 };
237
238 &sdio0 {
239         clock-frequency = <150000000>;
240         clock-freq-min-max = <200000 150000000>;
241         supports-sdio;
242         bus-width = <4>;
243         disable-wp;
244         cap-sd-highspeed;
245         cap-sdio-irq;
246         keep-power-in-suspend;
247         mmc-pwrseq = <&sdio_pwrseq>;
248         non-removable;
249         num-slots = <1>;
250         pinctrl-names = "default";
251         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
252         sd-uhs-sdr104;
253         status = "okay";
254 };
255
256 &emmc_phy {
257         freq-sel = <200000000>;
258         dr-sel = <50>;
259         opdelay = <4>;
260         status = "okay";
261 };
262
263 &sdhci {
264         bus-width = <8>;
265         mmc-hs400-1_8v;
266         supports-emmc;
267         non-removable;
268         mmc-hs400-enhanced-strobe;
269         status = "okay";
270 };
271
272 &i2s0 {
273         status = "okay";
274         rockchip,i2s-broken-burst-len;
275         rockchip,playback-channels = <8>;
276         rockchip,capture-channels = <8>;
277         #sound-dai-cells = <0>;
278 };
279
280 &i2s2 {
281         #sound-dai-cells = <0>;
282 };
283
284 &spdif {
285         status = "okay";
286         #sound-dai-cells = <0>;
287 };
288
289 &i2c0 {
290         status = "okay";
291         i2c-scl-rising-time-ns = <180>;
292         i2c-scl-falling-time-ns = <30>;
293         clock-frequency = <400000>;
294
295         xz3216: dcdc@60 {
296                 compatible = "xz3216";
297                 reg = <0x60>;
298                 status = "okay";
299                 regulators {
300                         #address-cells = <1>;
301                         #size-cells = <0>;
302                         vdd_cpu_b: regulator@0 {
303                                 reg = <0>;
304                                 vin-supply = <&vcc_sys>;
305                                 regulator-compatible = "xz_dcdc1";
306                                 regulator-name = "vdd_cpu_b";
307                                 regulator-min-microvolt = <712500>;
308                                 regulator-max-microvolt = <1500000>;
309                                 regulator-ramp-delay = <1000>;
310                                 fcs,suspend-voltage-selector = <1>;
311                                 regulator-always-on;
312                                 regulator-boot-on;
313                                 regulator-state-mem {
314                                         regulator-off-in-suspend;
315                                 };
316                         };
317                 };
318         };
319
320         vdd_gpu: syr828@41 {
321                 compatible = "silergy,syr828";
322                 status = "okay";
323                 reg = <0x41>;
324                 vin-supply = <&vcc_sys>;
325                 regulator-compatible = "fan53555-reg";
326                 regulator-name = "vdd_gpu";
327                 regulator-min-microvolt = <735000>;
328                 regulator-max-microvolt = <1400000>;
329                 regulator-ramp-delay = <1000>;
330                 fcs,suspend-voltage-selector = <1>;
331                 regulator-always-on;
332                 regulator-boot-on;
333                 regulator-state-mem {
334                         regulator-off-in-suspend;
335                 };
336         };
337
338         rk818: pmic@1c {
339                 compatible = "rockchip,rk818";
340                 status = "okay";
341                 reg = <0x1c>;
342                 clock-output-names = "xin32k", "wifibt_32kin";
343                 interrupt-parent = <&gpio1>;
344                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
345                 pinctrl-names = "default";
346                 pinctrl-0 = <&pmic_int_l>;
347                 rockchip,system-power-controller;
348                 rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
349                 wakeup-source;
350                 #clock-cells = <1>;
351
352                 vcc1-supply = <&vcc_sys>;
353                 vcc2-supply = <&vcc_sys>;
354                 vcc3-supply = <&vcc_sys>;
355                 vcc4-supply = <&vcc_sys>;
356                 vcc6-supply = <&vcc_sys>;
357                 vcc7-supply = <&vcc3v3_sys>;
358                 vcc8-supply = <&vcc_sys>;
359                 vcc9-supply = <&vcc3v3_sys>;
360
361                 regulators {
362                         vdd_cpu_l: DCDC_REG1 {
363                                 regulator-name = "vdd_cpu_l";
364                                 regulator-always-on;
365                                 regulator-boot-on;
366                                 regulator-min-microvolt = <750000>;
367                                 regulator-max-microvolt = <1350000>;
368                                 regulator-ramp-delay = <6001>;
369                                 regulator-state-mem {
370                                         regulator-off-in-suspend;
371                                 };
372                         };
373
374                         vdd_center: DCDC_REG2 {
375                                 regulator-name = "vdd_center";
376                                 regulator-always-on;
377                                 regulator-boot-on;
378                                 regulator-min-microvolt = <800000>;
379                                 regulator-max-microvolt = <1350000>;
380                                 regulator-ramp-delay = <6001>;
381                                 regulator-state-mem {
382                                         regulator-on-in-suspend;
383                                         regulator-suspend-microvolt = <1000000>;
384                                 };
385                         };
386
387                         vcc_ddr: DCDC_REG3 {
388                                 regulator-name = "vcc_ddr";
389                                 regulator-always-on;
390                                 regulator-boot-on;
391                                 regulator-state-mem {
392                                         regulator-on-in-suspend;
393                                 };
394                         };
395
396                         vcc_1v8: DCDC_REG4 {
397                                 regulator-name = "vcc_1v8";
398                                 regulator-always-on;
399                                 regulator-boot-on;
400                                 regulator-min-microvolt = <1800000>;
401                                 regulator-max-microvolt = <1800000>;
402                                 regulator-state-mem {
403                                         regulator-on-in-suspend;
404                                         regulator-suspend-microvolt = <1800000>;
405                                 };
406                         };
407
408                         vcca3v0_codec: LDO_REG1 {
409                                 regulator-always-on;
410                                 regulator-boot-on;
411                                 regulator-min-microvolt = <3000000>;
412                                 regulator-max-microvolt = <3000000>;
413                                 regulator-name = "vcca3v0_codec";
414                                 regulator-state-mem {
415                                         regulator-off-in-suspend;
416                                 };
417                         };
418
419                         vcc3v0_tp: LDO_REG2 {
420                                 regulator-always-on;
421                                 regulator-boot-on;
422                                 regulator-min-microvolt = <3000000>;
423                                 regulator-max-microvolt = <3000000>;
424                                 regulator-name = "vcc3v0_tp";
425                                 regulator-state-mem {
426                                         regulator-off-in-suspend;
427                                 };
428                         };
429
430                         vcca1v8_codec: LDO_REG3 {
431                                 regulator-always-on;
432                                 regulator-boot-on;
433                                 regulator-min-microvolt = <1800000>;
434                                 regulator-max-microvolt = <1800000>;
435                                 regulator-name = "vcca1v8_codec";
436                                 regulator-state-mem {
437                                         regulator-off-in-suspend;
438                                 };
439                         };
440
441                         vcc_power_on: LDO_REG4 {
442                                 regulator-always-on;
443                                 regulator-boot-on;
444                                 regulator-min-microvolt = <3300000>;
445                                 regulator-max-microvolt = <3300000>;
446                                 regulator-name = "vcc_power_on";
447                                 regulator-state-mem {
448                                         regulator-on-in-suspend;
449                                         regulator-suspend-microvolt = <3300000>;
450                                 };
451                         };
452
453                         vcc_3v0: LDO_REG5 {
454                                 regulator-always-on;
455                                 regulator-boot-on;
456                                 regulator-min-microvolt = <3000000>;
457                                 regulator-max-microvolt = <3000000>;
458                                 regulator-name = "vcc_3v0";
459                                 regulator-state-mem {
460                                         regulator-off-in-suspend;
461                                 };
462                         };
463
464                         vcc_1v5: LDO_REG6 {
465                                 regulator-always-on;
466                                 regulator-boot-on;
467                                 regulator-min-microvolt = <1500000>;
468                                 regulator-max-microvolt = <1500000>;
469                                 regulator-name = "vcc_1v5";
470                                 regulator-state-mem {
471                                         regulator-off-in-suspend;
472                                 };
473                         };
474
475                         vcc1v8_dvp: LDO_REG7 {
476                                 regulator-always-on;
477                                 regulator-boot-on;
478                                 regulator-min-microvolt = <1800000>;
479                                 regulator-max-microvolt = <1800000>;
480                                 regulator-name = "vcc1v8_dvp";
481                                 regulator-state-mem {
482                                         regulator-off-in-suspend;
483                                 };
484                         };
485
486                         vcc3v3_s3: LDO_REG8 {
487                                 regulator-always-on;
488                                 regulator-boot-on;
489                                 regulator-min-microvolt = <3300000>;
490                                 regulator-max-microvolt = <3300000>;
491                                 regulator-name = "vcc3v3_s3";
492                                 regulator-state-mem {
493                                         regulator-on-in-suspend;
494                                         regulator-suspend-microvolt = <3300000>;
495                                 };
496                         };
497
498                         vcc_sd: LDO_REG9 {
499                                 regulator-always-on;
500                                 regulator-boot-on;
501                                 regulator-min-microvolt = <3000000>;
502                                 regulator-max-microvolt = <3000000>;
503                                 regulator-name = "vcc_sd";
504                                 regulator-state-mem {
505                                         regulator-on-in-suspend;
506                                         regulator-suspend-microvolt = <3000000>;
507                                 };
508                         };
509
510                         vcc3v3_s0: SWITCH_REG {
511                                 regulator-always-on;
512                                 regulator-boot-on;
513                                 regulator-name = "vcc3v3_s0";
514                                 regulator-state-mem {
515                                         regulator-on-in-suspend;
516                                 };
517                         };
518                 };
519
520                 battery {
521                         ocv_table = <3400 3675 3689 3716 3740 3756 3768 3780
522                                 3793 3807 3827 3853 3896 3937 3974 4007 4066
523                                 4110 4161 4217 4308>;
524                         design_capacity = <7916>;
525                         design_qmax = <8708>;
526                         bat_res = <100>;
527                         max_input_current = <3000>;
528                         max_chrg_current = <4500>;
529                         max_chrg_voltage = <4350>;
530                         sleep_enter_current = <300>;
531                         sleep_exit_current = <300>;
532                         power_off_thresd = <3400>;
533                         zero_algorithm_vol = <3950>;
534                         fb_temperature = <115>;
535                         max_soc_offset = <60>;
536                         energy_mode = <0>;
537                         monitor_sec = <5>;
538                         virtual_power = <0>;
539                         power_dc2otg = <0>;
540                         dc_det_adc = <0>;
541                 };
542         };
543 };
544
545 &i2c1 {
546         status = "okay";
547         i2c-scl-rising-time-ns = <140>;
548         i2c-scl-falling-time-ns = <30>;
549
550         es8316: es8316@10 {
551                 #sound-dai-cells = <0>;
552                 compatible = "everest,es8316";
553                 reg = <0x10>;
554                 pinctrl-names = "default";
555                 pinctrl-0 = <&hp_det>;
556                 clocks = <&cru SCLK_I2S_8CH_OUT>;
557                 clock-names = "mclk";
558                 spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
559                 hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
560         };
561 };
562
563 &i2c4 {
564         status = "okay";
565         i2c-scl-rising-time-ns = <345>;
566         i2c-scl-falling-time-ns = <11>;
567         clock-frequency = <400000>;
568
569         mpu6500@68 {
570                 status = "okay";
571                 compatible = "invensense,mpu6500";
572                 pinctrl-names = "default";
573                 pinctrl-0 = <&mpu6500_irq_gpio>;
574                 reg = <0x68>;
575                 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>;
576                 mpu-int_config = <0x10>;
577                 mpu-level_shifter = <0>;
578                 mpu-orientation = <1 0 0 0 1 0 0 0 1>;
579                 orientation-x= <1>;
580                 orientation-y= <1>;
581                 orientation-z= <0>;
582                 mpu-debug = <1>;
583         };
584
585         sensor@0d {
586                 status = "okay";
587                 compatible = "ak8963";
588                 pinctrl-names = "default";
589                 pinctrl-0 = <&ak8963_irq_gpio>;
590                 reg = <0x0d>;
591                 type = <SENSOR_TYPE_COMPASS>;
592                 irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>;
593                 irq_enable = <0>;
594                 poll_delay_ms = <30>;
595                 layout = <3>;
596         };
597
598         sensor@20 {
599                 status = "disabled";
600                 compatible = "capella,light_cm3218";
601                 pinctrl-names = "default";
602                 pinctrl-0 = <&cm3218_irq_gpio>;
603                 reg = <0x20>;
604                 type = <SENSOR_TYPE_LIGHT>;
605                 irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_RISING>;
606                 irq_enable = <1>;
607                 poll_delay_ms = <30>;
608         };
609 };
610
611 &i2c5 {
612         status = "okay";
613         i2c-scl-rising-time-ns = <150>;
614         i2c-scl-falling-time-ns = <30>;
615         clock-frequency = <400000>;
616
617         gt9xx: gt9xx@14 {
618                 compatible = "goodix,gt9xx";
619                 reg = <0x14>;
620                 touch-gpio = <&gpio3 12 IRQ_TYPE_LEVEL_LOW>;
621                 reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>;
622                 max-x = <1536>;
623                 max-y = <2048>;
624                 tp-size = <970>;
625                 tp-supply = <&vcc3v0_tp>;
626         };
627 };
628
629 &isp0 {
630         status = "okay";
631 };
632
633 &isp1 {
634         status = "okay";
635 };
636
637 &cpu_l0 {
638         cpu-supply = <&vdd_cpu_l>;
639 };
640
641 &cpu_l1 {
642         cpu-supply = <&vdd_cpu_l>;
643 };
644
645 &cpu_l2 {
646         cpu-supply = <&vdd_cpu_l>;
647 };
648
649 &cpu_l3 {
650         cpu-supply = <&vdd_cpu_l>;
651 };
652
653 &cpu_b0 {
654         cpu-supply = <&vdd_cpu_b>;
655 };
656
657 &cpu_b1 {
658         cpu-supply = <&vdd_cpu_b>;
659 };
660
661 &gpu {
662         status = "okay";
663         mali-supply = <&vdd_gpu>;
664 };
665
666 &rga {
667         status = "okay";
668 };
669
670 &spi1 {
671         status = "disabled";
672         max-freq = <50000000>;
673         mpu6500@0 {
674                 status = "disabled";
675                 compatible = "inv-spi,mpu6500";
676                 pinctrl-names = "default";
677                 pinctrl-0 = <&mpu6500_irq_gpio>;
678                 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>;
679                 reg = <0>;
680                 spi-max-frequency = <1000000>;
681                 spi-cpha;
682                 spi-cpol;
683                 mpu-int_config = <0x00>;
684                 mpu-level_shifter = <0>;
685                 mpu-orientation = <1 0 0 0 1 0 0 0 1>;
686                 orientation-x= <1>;
687                 orientation-y= <0>;
688                 orientation-z= <1>;
689                 mpu-debug = <1>;
690         };
691 };
692
693 &tsadc {
694         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
695         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
696         status = "okay";
697 };
698
699 &u2phy1 {
700         status = "okay";
701
702         u2phy1_host: host-port {
703                 phy-supply = <&vcc5v0_host>;
704                 status = "okay";
705         };
706 };
707
708 &uart0 {
709         pinctrl-names = "default";
710         pinctrl-0 = <&uart0_xfer &uart0_cts>;
711         status = "okay";
712 };
713
714 &uart2 {
715         status = "okay";
716 };
717
718 &usb_host0_ehci {
719         status = "okay";
720 };
721
722 &usb_host0_ohci {
723         status = "okay";
724 };
725
726 &usb_host1_ehci {
727         status = "okay";
728 };
729
730 &usb_host1_ohci {
731         status = "okay";
732 };
733
734 &usbdrd3_0 {
735         status = "okay";
736 };
737
738 &usbdrd_dwc3_0 {
739         status = "okay";
740 };
741
742 &usbdrd3_1 {
743         status = "okay";
744 };
745
746 &usbdrd_dwc3_1 {
747         status = "okay";
748 };
749
750 &pwm0 {
751         status = "okay";
752 };
753
754 &pwm2 {
755         status = "okay";
756 };
757
758 &saradc {
759         status = "okay";
760 };
761
762 &pinctrl {
763         sdio-pwrseq {
764                 wifi_enable_h: wifi-enable-h {
765                         rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
766                 };
767         };
768
769         wireless-bluetooth {
770                 uart0_gpios: uart0-gpios {
771                         rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
772                 };
773         };
774
775         pmic {
776                 pmic_int_l: pmic-int-l {
777                         rockchip,pins =
778                                 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
779                 };
780
781                 pmic_dvs2: pmic-dvs2 {
782                         rockchip,pins =
783                                 <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
784                 };
785         };
786
787         headphone {
788                 hp_det: hp-det {
789                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>;
790                 };
791         };
792
793         lcdpwr-enable {
794                 lcdpwr_enable_h: lcdpwr-enable-h {
795                         rockchip,pins = <3 8 RK_FUNC_GPIO &pcfg_pull_up>;
796                 };
797         };
798
799         mpu6500 {
800                 mpu6500_irq_gpio: mpu6500-irq-gpio {
801                         rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>;
802                 };
803         };
804
805         ak8963 {
806                 ak8963_irq_gpio: ak8963-irq-gpio {
807                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
808                 };
809         };
810
811         cm3218 {
812                 cm3218_irq_gpio: cm3218-irq-gpio {
813                         rockchip,pins = <4 24 RK_FUNC_GPIO &pcfg_pull_none>;
814                 };
815         };
816
817         usb2 {
818                 host_vbus_drv: host-vbus-drv {
819                         rockchip,pins =
820                                 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
821                 };
822         };
823 };
824
825 &rk_screen {
826         #include <dt-bindings/display/screen-timing/lcd-LP097Qx2.dtsi>
827 };
828
829 &vopb_rk_fb {
830         status = "okay";
831         power_ctr: power_ctr {
832                 rockchip,debug = <0>;
833
834                 lcd_en: lcd-en {
835                         rockchip,power_type = <GPIO>;
836                         pinctrl-names = "default";
837                         pinctrl-0 = <&lcdpwr_enable_h>;
838                         gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
839                         rockchip,delay = <10>;
840                 };
841         };
842 };
843
844 &vopl_rk_fb {
845         status = "okay";
846 };
847
848 &edp_rk_fb {
849         status = "okay";
850 };