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