arm64: dts: rockchip: remove unused "rockchip,dsi-panel" property
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3368-sheep.dts
1 /*
2  * Copyright (c) 2017 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 "rk3368.dtsi"
46 #include "rk3368-android.dtsi"
47
48 / {
49         model = "Rockchip Sheep board";
50         compatible = "rockchip,sheep", "rockchip,rk3368";
51
52         sound {
53                 compatible = "simple-audio-card";
54                 simple-audio-card,format = "i2s";
55                 simple-audio-card,name = "rockchip,rt5640-codec";
56                 simple-audio-card,mclk-fs = <256>;
57                 simple-audio-card,widgets =
58                         "Microphone", "Mic Jack",
59                         "Headphone", "Headphone Jack";
60                 simple-audio-card,routing =
61                         "Mic Jack", "MICBIAS1",
62                         "IN1P", "Mic Jack",
63                         "Headphone Jack", "HPOL",
64                         "Headphone Jack", "HPOR";
65                 simple-audio-card,cpu {
66                         sound-dai = <&i2s_8ch>;
67                 };
68                 simple-audio-card,codec {
69                         sound-dai = <&rt5640>;
70                 };
71         };
72
73         backlight: backlight {
74                 compatible = "pwm-backlight";
75                 pwms = <&pwm0 0 25000 PWM_POLARITY_INVERTED>;
76                 brightness-levels = <
77                         135 135 136 136 137 137 138 138
78                         139 139 140 140 141 141 142 142
79                         143 143 143 144 144 145 145 146
80                         146 147 147 148 148 149 149 150
81                         150 151 151 151 152 152 153 153
82                         154 154 155 155 156 156 157 157
83                         158 158 159 159 159 160 160 161
84                         161 162 162 163 163 164 164 165
85                         165 166 166 167 167 167 168 168
86                         169 169 170 170 171 171 172 172
87                         173 173 174 174 175 175 175 176
88                         176 177 177 178 178 179 179 180
89                         180 181 181 182 182 183 183 183
90                         184 184 185 185 186 186 187 187
91                         188 188 189 189 190 190 191 191
92                         191 192 192 193 193 194 194 195
93                         195 196 196 197 197 198 198 199
94                         199 199 200 200 201 201 202 202
95                         203 203 204 204 205 205 206 206
96                         207 207 207 208 208 209 209 210
97                         210 211 211 212 212 213 213 214
98                         214 215 215 215 216 216 217 217
99                         218 218 219 219 220 220 221 221
100                         222 222 223 223 223 224 224 225
101                         225 226 226 227 227 228 228 229
102                         229 230 230 231 231 231 232 232
103                         233 233 234 234 235 235 236 236
104                         237 237 238 238 239 239 239 240
105                         240 241 241 242 242 243 243 244
106                         244 245 245 246 246 247 247 247
107                         248 248 249 249 250 250 251 251
108                         252 252 253 253 254 254 255 255>;
109                 default-brightness-level = <200>;
110                 enable-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
111         };
112
113         rk_key: rockchip-key {
114                 compatible = "rockchip,key";
115                 status = "okay";
116
117                 io-channels = <&saradc 1>;
118
119                 vol-up-key {
120                         linux,code = <115>;
121                         label = "volume up";
122                         rockchip,adc_value = <1>;
123                 };
124
125                 vol-down-key {
126                         linux,code = <114>;
127                         label = "volume down";
128                         rockchip,adc_value = <170>;
129                 };
130
131                 power-key {
132                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
133                         linux,code = <116>;
134                         label = "power";
135                         gpio-key,wakeup;
136                 };
137
138                 menu-key {
139                         linux,code = <59>;
140                         label = "menu";
141                         rockchip,adc_value = <355>;
142                 };
143
144                 home-key {
145                         linux,code = <102>;
146                         label = "home";
147                         rockchip,adc_value = <746>;
148                 };
149
150                 back-key {
151                         linux,code = <158>;
152                         label = "back";
153                         rockchip,adc_value = <560>;
154                 };
155
156                 camera-key {
157                         linux,code = <212>;
158                         label = "camera";
159                         rockchip,adc_value = <450>;
160                 };
161         };
162
163         vcc_sys: vcc-sys {
164                 compatible = "regulator-fixed";
165                 regulator-name = "vcc_sys";
166                 regulator-always-on;
167                 regulator-boot-on;
168                 regulator-min-microvolt = <3800000>;
169                 regulator-max-microvolt = <3800000>;
170         };
171
172         vcc_host: vcc-host {
173                 compatible = "regulator-fixed";
174                 enable-active-high;
175                 gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
176                 pinctrl-names = "default";
177                 pinctrl-0 = <&host_vbus_drv>;
178                 regulator-name = "vcc_host";
179                 regulator-always-on;
180         };
181 };
182
183 &emmc {
184         status = "okay";
185         bus-width = <8>;
186         cap-mmc-highspeed;
187         mmc-hs200-1_8v;
188         supports-emmc;
189         disable-wp;
190         non-removable;
191         num-slots = <1>;
192         pinctrl-names = "default";
193         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
194 };
195
196 &sdmmc {
197         status = "okay";
198         clock-frequency = <37500000>;
199         clock-freq-min-max = <400000 37500000>;
200         supports-sd;
201         cap-mmc-highspeed;
202         cap-sd-highspeed;
203         card-detect-delay = <200>;
204         disable-wp;
205         num-slots = <1>;
206         pinctrl-names = "default";
207         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
208 };
209
210 &i2c0 {
211         status = "okay";
212
213         syr827: syr827@40 {
214                 compatible = "silergy,syr827";
215                 reg = <0x40>;
216                 status = "okay";
217
218                 regulator-compatible = "fan53555-reg";
219                 regulator-name = "vdd_arm";
220                 regulator-min-microvolt = <712500>;
221                 regulator-max-microvolt = <1500000>;
222                 regulator-ramp-delay = <1000>;
223                 fcs,suspend-voltage-selector = <1>;
224                 pinctrl-0 = <&vsel_gpio>;
225                 vsel-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
226                 regulator-always-on;
227                 regulator-boot-on;
228                 regulator-initial-state = <3>;
229                 regulator-state-mem {
230                         regulator-off-in-suspend;
231                         regulator-suspend-microvolt = <900000>;
232                 };
233         };
234
235         rk818: pmic@1c {
236                 compatible = "rockchip,rk818";
237                 reg = <0x1c>;
238                 status = "okay";
239
240                 clock-output-names = "xin32k", "wifibt_32kin";
241                 interrupt-parent = <&gpio0>;
242                 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
243                 pinctrl-names = "default";
244                 pinctrl-0 = <&pmic_int_l>;
245                 rockchip,system-power-controller;
246                 wakeup-source;
247                 #clock-cells = <1>;
248
249                 vcc1-supply = <&vcc_sys>;
250                 vcc2-supply = <&vcc_sys>;
251                 vcc3-supply = <&vcc_sys>;
252                 vcc4-supply = <&vcc_sys>;
253                 vcc6-supply = <&vcc_sys>;
254                 vcc7-supply = <&vcc_sys>;
255                 vcc8-supply = <&vcc_sys>;
256                 vcc9-supply = <&vcc_io>;
257
258                 regulators {
259                         vdd_logic: DCDC_REG1 {
260                                 regulator-name = "vdd_logic";
261                                 regulator-always-on;
262                                 regulator-boot-on;
263                                 regulator-min-microvolt = <750000>;
264                                 regulator-max-microvolt = <1450000>;
265                                 regulator-ramp-delay = <6001>;
266                                 regulator-state-mem {
267                                         regulator-on-in-suspend;
268                                         regulator-suspend-microvolt = <1000000>;
269                                 };
270                         };
271
272                         vdd_gpu: DCDC_REG2 {
273                                 regulator-name = "vdd_gpu";
274                                 regulator-always-on;
275                                 regulator-boot-on;
276                                 regulator-min-microvolt = <800000>;
277                                 regulator-max-microvolt = <1250000>;
278                                 regulator-ramp-delay = <6001>;
279                                 regulator-state-mem {
280                                         regulator-on-in-suspend;
281                                         regulator-suspend-microvolt = <1000000>;
282                                 };
283                         };
284
285                         vcc_ddr: DCDC_REG3 {
286                                 regulator-always-on;
287                                 regulator-boot-on;
288                                 regulator-name = "vcc_ddr";
289                                 regulator-state-mem {
290                                         regulator-on-in-suspend;
291                                 };
292                         };
293
294                         vcc_io: DCDC_REG4 {
295                                 regulator-always-on;
296                                 regulator-boot-on;
297                                 regulator-min-microvolt = <3300000>;
298                                 regulator-max-microvolt = <3300000>;
299                                 regulator-name = "vcc_io";
300                                 regulator-state-mem {
301                                         regulator-on-in-suspend;
302                                         regulator-suspend-microvolt = <3300000>;
303                                 };
304                         };
305
306                         vcca_codec: LDO_REG1 {
307                                 regulator-always-on;
308                                 regulator-boot-on;
309                                 regulator-min-microvolt = <3300000>;
310                                 regulator-max-microvolt = <3300000>;
311                                 regulator-name = "vcca_codec";
312                                 regulator-state-mem {
313                                         regulator-on-in-suspend;
314                                         regulator-suspend-microvolt = <3300000>;
315                                 };
316                         };
317
318                         vcc_tp: LDO_REG2 {
319                                 regulator-boot-on;
320                                 regulator-min-microvolt = <3000000>;
321                                 regulator-max-microvolt = <3000000>;
322                                 regulator-name = "vcc_tp";
323                                 regulator-state-mem {
324                                         regulator-off-in-suspend;
325                                 };
326                         };
327
328                         vdd_10: LDO_REG3 {
329                                 regulator-always-on;
330                                 regulator-boot-on;
331                                 regulator-min-microvolt = <1000000>;
332                                 regulator-max-microvolt = <1000000>;
333                                 regulator-name = "vdd_10";
334                                 regulator-state-mem {
335                                         regulator-on-in-suspend;
336                                         regulator-suspend-microvolt = <1000000>;
337                                 };
338                         };
339
340                         vcc18_lcd: LDO_REG4 {
341                                 regulator-always-on;
342                                 regulator-boot-on;
343                                 regulator-min-microvolt = <1800000>;
344                                 regulator-max-microvolt = <1800000>;
345                                 regulator-name = "vcc18_lcd";
346                                 regulator-state-mem {
347                                         regulator-on-in-suspend;
348                                         regulator-suspend-microvolt = <1800000>;
349                                 };
350                         };
351
352                         vccio_pmu: LDO_REG5 {
353                                 regulator-always-on;
354                                 regulator-boot-on;
355                                 regulator-min-microvolt = <1800000>;
356                                 regulator-max-microvolt = <1800000>;
357                                 regulator-name = "vccio_pmu";
358                                 regulator-state-mem {
359                                         regulator-on-in-suspend;
360                                         regulator-suspend-microvolt = <1800000>;
361                                 };
362                         };
363
364                         vdd10_lcd: LDO_REG6 {
365                                 regulator-always-on;
366                                 regulator-boot-on;
367                                 regulator-min-microvolt = <1000000>;
368                                 regulator-max-microvolt = <1000000>;
369                                 regulator-name = "vdd10_lcd";
370                                 regulator-state-mem {
371                                         regulator-on-in-suspend;
372                                         regulator-suspend-microvolt = <1000000>;
373                                 };
374                         };
375
376                         vcc_18: LDO_REG7 {
377                                 regulator-always-on;
378                                 regulator-boot-on;
379                                 regulator-min-microvolt = <1800000>;
380                                 regulator-max-microvolt = <1800000>;
381                                 regulator-name = "vcc_18";
382                                 regulator-state-mem {
383                                         regulator-on-in-suspend;
384                                         regulator-suspend-microvolt = <1800000>;
385                                 };
386                         };
387
388                         vccio_wl: LDO_REG8 {
389                                 regulator-always-on;
390                                 regulator-boot-on;
391                                 regulator-min-microvolt = <1800000>;
392                                 regulator-max-microvolt = <3300000>;
393                                 regulator-name = "vccio_wl";
394                                 regulator-state-mem {
395                                         regulator-on-in-suspend;
396                                         regulator-suspend-microvolt = <3300000>;
397                                 };
398                         };
399
400                         vccio_sd: LDO_REG9 {
401                                 regulator-always-on;
402                                 regulator-boot-on;
403                                 regulator-min-microvolt = <1800000>;
404                                 regulator-max-microvolt = <3300000>;
405                                 regulator-name = "vccio_sd";
406                                 regulator-state-mem {
407                                         regulator-on-in-suspend;
408                                         regulator-suspend-microvolt = <3300000>;
409                                 };
410                         };
411
412                         vcc_sd: SWITCH_REG {
413                                 regulator-always-on;
414                                 regulator-boot-on;
415                                 regulator-name = "vcc_sd";
416                                 regulator-state-mem {
417                                         regulator-on-in-suspend;
418                                 };
419                         };
420
421                         boost_otg: DCDC_BOOST {
422                                 regulator-name = "boost_otg";
423                                 regulator-always-on;
424                                 regulator-boot-on;
425                                 regulator-min-microvolt = <5000000>;
426                                 regulator-max-microvolt = <5000000>;
427                                 regulator-state-mem {
428                                         regulator-on-in-suspend;
429                                         regulator-suspend-microvolt = <5000000>;
430                                 };
431                         };
432                 };
433
434                 battery {
435                         compatible = "rk818-battery";
436                         pinctrl-names = "default";
437                         pinctrl-0 = <&dc_irq_gpio>;
438                         ocv_table = <
439                                 3400 3650 3693 3707 3731 3749 3760
440                                 3770 3782 3796 3812 3829 3852 3882
441                                 3915 3951 3981 4047 4086 4132 4182>;
442                         design_capacity = <8650>;
443                         design_qmax = <8800>;
444                         bat_res = <85>;
445                         max_input_current = <2000>;
446                         max_chrg_current = <1800>;
447                         max_chrg_voltage = <4200>;
448                         sleep_enter_current = <600>;
449                         sleep_exit_current = <600>;
450                         power_off_thresd = <3400>;
451                         zero_algorithm_vol = <3850>;
452                         fb_temperature = <115>;
453                         sample_res = <10>;
454                         max_soc_offset = <60>;
455                         energy_mode = <0>;
456                         monitor_sec = <5>;
457                         virtual_power = <0>;
458                         power_dc2otg = <1>;
459                         support_usb_adp = <1>;
460                         support_dc_adp = <1>;
461                         dc_det_gpio = <&gpio0 17 GPIO_ACTIVE_LOW>;
462                 };
463         };
464 };
465
466 &cpu_l0 {
467         cpu-supply = <&syr827>;
468 };
469
470 &cpu_l1 {
471         cpu-supply = <&syr827>;
472 };
473
474 &cpu_l2 {
475         cpu-supply = <&syr827>;
476 };
477
478 &cpu_l3 {
479         cpu-supply = <&syr827>;
480 };
481
482 &cpu_b0 {
483         cpu-supply = <&syr827>;
484 };
485
486 &cpu_b1 {
487         cpu-supply = <&syr827>;
488 };
489
490 &cpu_b2 {
491         cpu-supply = <&syr827>;
492 };
493
494 &cpu_b3 {
495         cpu-supply = <&syr827>;
496 };
497
498 &gpu {
499         logic-supply = <&vdd_logic>;
500 };
501
502 &rockchip_suspend {
503         status = "okay";
504 };
505
506 &i2c1 {
507         status = "okay";
508
509         rt5640: rt5640@1c {
510                 compatible = "realtek,rt5640";
511                 reg = <0x1c>;
512                 #sound-dai-cells = <0>;
513                 clocks = <&cru SCLK_I2S_8CH_OUT>;
514                 clock-names = "mclk";
515                 realtek,in1-differential;
516                 status = "okay";
517         };
518 };
519
520 &i2c2 {
521         status = "okay";
522
523         gt9xx: gt9xx@14 {
524                 compatible = "goodix,gt9xx";
525                 reg = <0x14>;
526                 touch-gpio = <&gpio0 12 IRQ_TYPE_LEVEL_LOW>;
527                 reset-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
528                 max-x = <1200>;
529                 max-y = <1900>;
530                 tp-size = <911>;
531                 tp-supply = <&vcc_tp>;
532                 status = "okay";
533         };
534 };
535
536 &i2s_8ch {
537         status = "okay";
538         rockchip,i2s-broken-burst-len;
539         rockchip,playback-channels = <8>;
540         rockchip,capture-channels = <2>;
541         #sound-dai-cells = <0>;
542 };
543
544 &io_domains {
545         status = "okay";
546         dvp-supply = <&vcc_18>;
547         audio-supply = <&vcc_io>;
548         gpio30-supply = <&vcc_io>;
549         gpio1830-supply = <&vcc_io>;
550         sdcard-supply = <&vccio_sd>;
551         wifi-supply = <&vccio_wl>;
552 };
553
554 &pmu_io_domains {
555         status = "okay";
556
557         pmu-supply = <&vcc_io>;
558         vop-supply = <&vcc_io>;
559 };
560
561 &pwm0 {
562         status = "okay";
563 };
564
565 &u2phy {
566         status = "okay";
567
568         u2phy_host: host-port {
569                 phy-supply = <&vcc_host>;
570                 status = "okay";
571         };
572 };
573
574 &usb_host0_ehci {
575         status = "okay";
576 };
577
578 &usb_host0_ohci {
579         status = "okay";
580 };
581
582 &mailbox {
583         status = "okay";
584 };
585
586 &mailbox_scpi {
587         status = "okay";
588 };
589
590 &dsi {
591         status = "okay";
592
593         panel@0 {
594                 compatible = "simple-panel-dsi";
595                 reg = <0>;
596                 backlight = <&backlight>;
597                 enable-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
598
599                 dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST)>;
600                 dsi,format = <MIPI_DSI_FMT_RGB888>;
601                 dsi,lanes = <4>;
602
603                 delay,prepare = <120>;
604
605                 display-timings {
606                         native-mode = <&timing0>;
607
608                         timing0: timing0 {
609                                 clock-frequency = <150000000>;
610                                 hactive = <1200>;
611                                 vactive = <1920>;
612                                 hback-porch = <80>;
613                                 hfront-porch = <81>;
614                                 vback-porch = <21>;
615                                 vfront-porch = <21>;
616                                 hsync-len = <10>;
617                                 vsync-len = <3>;
618                                 hsync-active = <0>;
619                                 vsync-active = <0>;
620                                 de-active = <0>;
621                                 pixelclk-active = <0>;
622                         };
623                 };
624         };
625 };
626
627 &mipi_dphy {
628         status = "okay";
629 };
630
631 &route_dsi {
632         status = "okay";
633 };
634
635 &saradc {
636         status = "okay";
637 };
638
639 &tsadc {
640         tsadc-supply = <&syr827>;
641         status = "okay";
642 };
643
644 &pinctrl {
645         pmic {
646                 pmic_int_l: pmic-int-l {
647                         rockchip,pins = <RK_GPIO0 1 RK_FUNC_GPIO &pcfg_pull_up>;
648                 };
649                 vsel_gpio: vsel-gpio {
650                         rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_pull_down>;
651                 };
652         };
653
654         dc_det {
655                 dc_irq_gpio: dc-irq-gpio {
656                         rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_up>;
657                 };
658         };
659
660         usb2 {
661                 host_vbus_drv: host-vbus-drv {
662                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_none>;
663                 };
664         };
665 };