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