arm: dts: rk3288-evb: add earlycon to args of cmdline
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-evb.dtsi
1 /*
2  * This file is dual-licensed: you can use it either under the terms
3  * of the GPL or the X11 license, at your option. Note that this dual
4  * licensing only applies to this file, and not this project as a
5  * whole.
6  *
7  *  a) This file is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of the
10  *     License, or (at your option) any later version.
11  *
12  *     This file is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  * Or, alternatively,
18  *
19  *  b) Permission is hereby granted, free of charge, to any person
20  *     obtaining a copy of this software and associated documentation
21  *     files (the "Software"), to deal in the Software without
22  *     restriction, including without limitation the rights to use,
23  *     copy, modify, merge, publish, distribute, sublicense, and/or
24  *     sell copies of the Software, and to permit persons to whom the
25  *     Software is furnished to do so, subject to the following
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
31  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  *     OTHER DEALINGS IN THE SOFTWARE.
39  */
40
41 #include <dt-bindings/pwm/pwm.h>
42 #include <dt-bindings/input/input.h>
43 #include "rk3288.dtsi"
44
45 / {
46         chosen {
47                 bootargs = "earlycon=uart8250,mmio32,0xff690000 swiotlb=1";
48         };
49
50         memory {
51                 device_type = "memory";
52                 reg = <0x0 0x80000000>;
53         };
54
55         backlight: backlight {
56                 compatible = "pwm-backlight";
57                 brightness-levels = <
58                           0   1   2   3   4   5   6   7
59                           8   9  10  11  12  13  14  15
60                          16  17  18  19  20  21  22  23
61                          24  25  26  27  28  29  30  31
62                          32  33  34  35  36  37  38  39
63                          40  41  42  43  44  45  46  47
64                          48  49  50  51  52  53  54  55
65                          56  57  58  59  60  61  62  63
66                          64  65  66  67  68  69  70  71
67                          72  73  74  75  76  77  78  79
68                          80  81  82  83  84  85  86  87
69                          88  89  90  91  92  93  94  95
70                          96  97  98  99 100 101 102 103
71                         104 105 106 107 108 109 110 111
72                         112 113 114 115 116 117 118 119
73                         120 121 122 123 124 125 126 127
74                         128 129 130 131 132 133 134 135
75                         136 137 138 139 140 141 142 143
76                         144 145 146 147 148 149 150 151
77                         152 153 154 155 156 157 158 159
78                         160 161 162 163 164 165 166 167
79                         168 169 170 171 172 173 174 175
80                         176 177 178 179 180 181 182 183
81                         184 185 186 187 188 189 190 191
82                         192 193 194 195 196 197 198 199
83                         200 201 202 203 204 205 206 207
84                         208 209 210 211 212 213 214 215
85                         216 217 218 219 220 221 222 223
86                         224 225 226 227 228 229 230 231
87                         232 233 234 235 236 237 238 239
88                         240 241 242 243 244 245 246 247
89                         248 249 250 251 252 253 254 255>;
90                 default-brightness-level = <128>;
91                 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
92                 pinctrl-names = "default";
93                 pinctrl-0 = <&bl_en>;
94                 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
95         };
96
97         panel: panel {
98                 compatible ="lg,lp079qx1-sp0v", "simple-panel";
99                 backlight = <&backlight>;
100                 enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
101                 pinctrl-0 = <&lcd_cs>;
102                 ports {
103                         panel_in: port {
104                                 panel_in_edp: endpoint {
105                                         remote-endpoint = <&edp_out_panel>;
106                                 };
107                         };
108                 };
109         };
110
111         sound {
112                 compatible = "simple-audio-card";
113                 simple-audio-card,format = "i2s";
114                 simple-audio-card,name = "rockchip,rt5640-codec";
115                 simple-audio-card,mclk-fs = <512>;
116                 simple-audio-card,widgets =
117                         "Microphone", "Microphone Jack",
118                         "Headphone", "Headphone Jack";
119                 simple-audio-card,routing =
120                         "MIC1", "Microphone Jack",
121                         "MIC2", "Microphone Jack",
122                         "Microphone Jack", "micbias1",
123                         "Headphone Jack", "HPOL",
124                         "Headphone Jack", "HPOR";
125
126                 simple-audio-card,dai-link@0 {
127                         format = "i2s";
128                         cpu {
129                                 sound-dai = <&i2s>;
130                         };
131
132                         codec {
133                                 sound-dai = <&rt5640>;
134                         };
135                 };
136
137                 simple-audio-card,dai-link@1 {
138                         format = "i2s";
139                         cpu {
140                                 sound-dai = <&i2s>;
141                         };
142
143                         codec {
144                                 sound-dai = <&hdmi>;
145                         };
146                 };
147         };
148
149         lvds_panel: lvds_panel {
150                 compatible ="auo,b101ew05","simple-panel";
151                 backlight = <&backlight>;
152                 enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
153                 pinctrl-0 = <&lcd_cs>;
154                 status = "disabled";
155         };
156
157         ext_gmac: external-gmac-clock {
158                 compatible = "fixed-clock";
159                 clock-frequency = <125000000>;
160                 clock-output-names = "ext_gmac";
161                 #clock-cells = <0>;
162         };
163
164         adc-keys {
165                 compatible = "adc-keys";
166                 io-channels = <&saradc 1>;
167                 io-channel-names = "buttons";
168                 poll-interval = <100>;
169                 keyup-threshold-microvolt = <1800000>;
170
171                 button-up {
172                         label = "Volume Up";
173                         linux,code = <KEY_VOLUMEUP>;
174                         press-threshold-microvolt = <100000>;
175                 };
176
177                 button-down {
178                         label = "Volume Down";
179                         linux,code = <KEY_VOLUMEDOWN>;
180                         press-threshold-microvolt = <300000>;
181                 };
182
183                 menu {
184                         label = "Menu";
185                         linux,code = <KEY_MENU>;
186                         press-threshold-microvolt = <640000>;
187                 };
188
189                 esc {
190                         label = "Esc";
191                         linux,code = <KEY_ESC>;
192                         press-threshold-microvolt = <1000000>;
193                 };
194
195                 home  {
196                         label = "Home";
197                         linux,code = <KEY_HOME>;
198                         press-threshold-microvolt = <1300000>;
199                 };
200         };
201
202         gpio-keys {
203                 compatible = "gpio-keys";
204                 #address-cells = <1>;
205                 #size-cells = <0>;
206                 autorepeat;
207
208                 pinctrl-names = "default";
209                 pinctrl-0 = <&pwrbtn>;
210
211                 button@0 {
212                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
213                         linux,code = <KEY_POWER>;
214                         label = "GPIO Key Power";
215                         linux,input-type = <1>;
216                         gpio-key,wakeup = <1>;
217                         debounce-interval = <100>;
218                 };
219         };
220
221         vccadc_ref: vccadc-ref {
222                 compatible = "regulator-fixed";
223                 regulator-name = "vcc1v8_sys";
224                 regulator-always-on;
225                 regulator-boot-on;
226                 regulator-min-microvolt = <1800000>;
227                 regulator-max-microvolt = <1800000>;
228         };
229
230         /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
231         vcc_host: vcc-host-regulator {
232                 compatible = "regulator-fixed";
233                 enable-active-high;
234                 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
235                 pinctrl-names = "default";
236                 pinctrl-0 = <&host_vbus_drv>;
237                 regulator-name = "vcc_host";
238                 regulator-always-on;
239                 regulator-boot-on;
240         };
241
242         vcc_phy: vcc-phy-regulator {
243                 compatible = "regulator-fixed";
244                 enable-active-high;
245                 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
246                 pinctrl-names = "default";
247                 pinctrl-0 = <&eth_phy_pwr>;
248                 regulator-name = "vcc_phy";
249                 regulator-min-microvolt = <3300000>;
250                 regulator-max-microvolt = <3300000>;
251                 regulator-always-on;
252                 regulator-boot-on;
253         };
254
255         vcc_sys: vsys-regulator {
256                 compatible = "regulator-fixed";
257                 regulator-name = "vcc_sys";
258                 regulator-min-microvolt = <5000000>;
259                 regulator-max-microvolt = <5000000>;
260                 regulator-always-on;
261                 regulator-boot-on;
262         };
263
264         /* This switch DIO3222 HOST_DP_HOST to host2 (dwc2) */
265         vcc_3g: vcc-3g-regulator {
266                 compatible = "regulator-fixed";
267                 enable-active-high;
268                 gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
269                 pinctrl-names = "default";
270                 pinctrl-0 = <&pwr_3g>;
271                 regulator-name = "vcc_3g";
272         };
273
274         /*
275          * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
276          * vcc_io directly.  Those boards won't be able to power cycle SD cards
277          * but it shouldn't hurt to toggle this pin there anyway.
278          */
279         vcc_sd: sdmmc-regulator {
280                 compatible = "regulator-fixed";
281                 pinctrl-names = "default";
282                 pinctrl-0 = <&sdmmc_pwr>;
283                 regulator-name = "vcc_sd";
284                 regulator-min-microvolt = <3300000>;
285                 regulator-max-microvolt = <3300000>;
286                 startup-delay-us = <100000>;
287                 vin-supply = <&vcc_io>;
288         };
289
290         wireless-bluetooth {
291                 compatible = "bluetooth-platdata";
292                 uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
293                 pinctrl-names = "default", "rts_gpio";
294                 pinctrl-0 = <&uart0_rts>;
295                 pinctrl-1 = <&uart0_gpios>;
296                 BT,reset_gpio    = <&gpio4 29 GPIO_ACTIVE_HIGH>;
297                 BT,wake_gpio     = <&gpio4 26 GPIO_ACTIVE_HIGH>;
298                 BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
299                 status = "okay";
300         };
301
302         wireless-wlan {
303                 compatible = "wlan-platdata";
304                 rockchip,grf = <&grf>;
305                 wifi_chip_type = "ap6335";
306                 sdio_vref = <1800>;
307                 WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
308                 status = "okay";
309         };
310 };
311
312 &emmc {
313         bus-width = <8>;
314         cap-mmc-highspeed;
315         disable-wp;
316         non-removable;
317         num-slots = <1>;
318         pinctrl-names = "default";
319         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
320         status = "okay";
321 };
322
323 &gmac {
324         phy-supply = <&vcc_phy>;
325         phy-mode = "rgmii";
326         clock_in_out = "input";
327         snps,reset-gpio = <&gpio4 7 0>;
328         snps,reset-active-low;
329         snps,reset-delays-us = <0 10000 1000000>;
330         assigned-clocks = <&cru SCLK_MAC>;
331         assigned-clock-parents = <&ext_gmac>;
332         pinctrl-names = "default";
333         pinctrl-0 = <&rgmii_pins>;
334         tx_delay = <0x30>;
335         rx_delay = <0x10>;
336         status = "okay";
337 };
338
339 &hdmi {
340         #address-cells = <1>;
341         #size-cells = <0>;
342         #sound-dai-cells = <0>;
343         status = "okay";
344
345         /* Don't use vopl for HDMI */
346         ports {
347                 hdmi_in: port {
348                         /delete-node/ endpoint@1;
349                 };
350         };
351 };
352
353 &saradc {
354         vref-supply = <&vccadc_ref>;
355         status = "okay";
356 };
357
358 &sdmmc {
359         supports-sd;
360         bus-width = <4>;
361         cap-mmc-highspeed;
362         sd-uhs-sdr12;
363         sd-uhs-sdr25;
364         sd-uhs-sdr50;
365         sd-uhs-sdr104;
366         cap-sd-highspeed;
367         card-detect-delay = <200>;
368         disable-wp;                     /* wp not hooked up */
369         num-slots = <1>;
370         pinctrl-names = "default";
371         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
372         status = "okay";
373         vmmc-supply = <&vcc_sd>;
374         vqmmc-supply = <&vccio_sd>;
375         supports-sd;
376 };
377
378 &edp_phy {
379         status = "okay";
380 };
381
382 &edp {
383         force-hpd;
384         status = "okay";
385
386         ports {
387                 /* Don't use vopb for eDP */
388                 edp_in: port@0 {
389                         /delete-node/ endpoint@0;
390                 };
391
392                 edp_out: port@1 {
393                         reg = <1>;
394                         #address-cells = <1>;
395                         #size-cells = <0>;
396                         edp_out_panel: endpoint {
397                                 reg = <0>;
398                                 remote-endpoint = <&panel_in_edp>;
399                         };
400                 };
401         };
402 };
403
404 &hevc_service {
405         status = "okay";
406 };
407
408 &i2c0 {
409         status = "okay";
410 };
411
412 &i2c2 {
413         status = "okay";
414
415         rt5640: rt5640@1c {
416                 #sound-dai-cells = <0>;
417                 compatible = "realtek,rt5640";
418                 reg = <0x1c>;
419                 clocks = <&cru SCLK_I2S0_OUT>;
420                 clock-names = "mclk";
421                 interrupt-parent = <&gpio6>;
422                 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
423         };
424 };
425
426 &i2s {
427         #sound-dai-cells = <0>;
428         status = "okay";
429 };
430
431 &io_domains {
432         status = "okay";
433
434         sdcard-supply = <&vccio_sd>;
435         wifi-supply = <&vcc_18>;
436 };
437
438 &wdt {
439         status = "okay";
440 };
441
442 &pwm0 {
443         status = "okay";
444 };
445
446 &rga {
447         status = "okay";
448 };
449
450 &sdio0 {
451         status = "okay";
452
453         clock-frequency = <50000000>;
454         clock-freq-min-max = <200000 50000000>;
455
456         bus-width = <4>;
457         cap-sd-highspeed;
458         cap-sdio-irq;
459         disable-wp;
460         keep-power-in-suspend;
461         mmc-pwrseq = <&sdio_pwrseq>;
462         non-removable;
463         num-slots = <1>;
464         pinctrl-names = "default";
465         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
466         sd-uhs-sdr104;
467         supports-sdio;
468 };
469
470 &uart0 {
471         pinctrl-names = "default";
472         pinctrl-0 = <&uart0_xfer &uart0_cts>;
473         status = "okay";
474 };
475
476 &uart1 {
477         status = "okay";
478 };
479
480 &uart2 {
481         status = "okay";
482 };
483
484 &uart3 {
485         status = "okay";
486 };
487
488 &uart4 {
489         status = "okay";
490 };
491
492 &vpu_service {
493         status = "okay";
494 };
495
496 &tsadc {
497         rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
498         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
499         status = "okay";
500 };
501
502 &usbphy {
503         status = "okay";
504 };
505
506 &usb_host0_ehci {
507         status = "okay";
508 };
509
510 &usb_host1 {
511         status = "okay";
512 };
513
514 &usb_otg {
515         status = "okay";
516 };
517
518 &lvds {
519         rockchip,data-mapping = "jeida";
520         rockchip,data-width = <24>;
521         rockchip,output = "lvds";
522         rockchip,panel = <&lvds_panel>;
523         status = "disabled";
524 };
525
526 &vopb {
527         status = "okay";
528
529         /* Don't use vopb for eDP, save it for HDMI */
530         vopb_out: port {
531                 /delete-node/ endpoint@1;
532         };
533 };
534
535 &vopb_mmu {
536         status = "okay";
537 };
538
539 &vopl {
540         status = "okay";
541
542         /* Don't use vopb for HDMI, save it for eDP */
543         vopl_out: port {
544                 /delete-node/ endpoint@0;
545         };
546 };
547
548 &vopl_mmu {
549         status = "okay";
550 };
551
552 &pinctrl {
553         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
554                 drive-strength = <8>;
555         };
556
557         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
558                 bias-pull-up;
559                 drive-strength = <8>;
560         };
561
562         backlight {
563                 bl_en: bl-en {
564                         rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
565                 };
566         };
567
568         buttons {
569                 pwrbtn: pwrbtn {
570                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
571                 };
572         };
573
574         pmic {
575                 pmic_int: pmic-int {
576                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
577                 };
578         };
579
580         sdio-pwrseq {
581                 wifi_enable_h: wifi-enable-h {
582                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
583                 };
584         };
585
586         sdmmc {
587                 /*
588                  * Default drive strength isn't enough to achieve even
589                  * high-speed mode on EVB board so bump up to 8ma.
590                  */
591                 sdmmc_bus4: sdmmc-bus4 {
592                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
593                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
594                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
595                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
596                 };
597
598                 sdmmc_clk: sdmmc-clk {
599                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
600                 };
601
602                 sdmmc_cmd: sdmmc-cmd {
603                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
604                 };
605
606                 sdmmc_pwr: sdmmc-pwr {
607                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
608                 };
609         };
610
611         usb {
612                 host_vbus_drv: host-vbus-drv {
613                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
614                 };
615
616                 pwr_3g: pwr-3g {
617                         rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
618                 };
619         };
620
621         eth_phy {
622                 eth_phy_pwr: eth-phy-pwr {
623                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
624                 };
625         };
626
627         lcd {
628                 lcd_cs: lcd-cs {
629                         rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
630                 };
631         };
632
633         wireless-bluetooth {
634                 uart0_gpios: uart0-gpios {
635                         rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
636                 };
637         };
638 };