arm: dts: add ramp delay to vdd_gpu for rk3288
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-firefly.dtsi
1 /*
2  * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
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 #include "rk3288.dtsi"
44
45 / {
46         memory {
47                 device_type = "memory";
48                 reg = <0 0x80000000>;
49         };
50
51         dovdd_1v8: dovdd-1v8-regulator {
52                 compatible = "regulator-fixed";
53                 regulator-name = "dovdd_1v8";
54                 regulator-min-microvolt = <1800000>;
55                 regulator-max-microvolt = <1800000>;
56                 vin-supply = <&vcc28_dvp>;
57         };
58
59         ext_gmac: external-gmac-clock {
60                 compatible = "fixed-clock";
61                 #clock-cells = <0>;
62                 clock-frequency = <125000000>;
63                 clock-output-names = "ext_gmac";
64         };
65
66         io_domains: io-domains {
67                 compatible = "rockchip,rk3288-io-voltage-domain";
68                 rockchip,grf = <&grf>;
69
70                 audio-supply = <&vcca_33>;
71                 bb-supply = <&vcc_io>;
72                 dvp-supply = <&dovdd_1v8>;
73                 flash0-supply = <&vcc_flash>;
74                 flash1-supply = <&vcc_lan>;
75                 gpio30-supply = <&vcc_io>;
76                 gpio1830-supply = <&vcc_io>;
77                 lcdc-supply = <&vcc_io>;
78                 sdcard-supply = <&vccio_sd>;
79                 wifi-supply = <&vccio_wl>;
80         };
81
82         ir: ir-receiver {
83                 compatible = "gpio-ir-receiver";
84                 pinctrl-names = "default";
85                 pinctrl-0 = <&ir_int>;
86         };
87
88         keys: gpio-keys {
89                 compatible = "gpio-keys";
90                 #address-cells = <1>;
91                 #size-cells = <0>;
92
93                 button@0 {
94                         gpio-key,wakeup = <1>;
95                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
96                         label = "GPIO Power";
97                         linux,code = <116>;
98                         pinctrl-names = "default";
99                         pinctrl-0 = <&pwr_key>;
100                 };
101         };
102
103         leds {
104                 compatible = "gpio-leds";
105
106                 work {
107                         gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
108                         label = "firefly:blue:user";
109                         linux,default-trigger = "rc-feedback";
110                         pinctrl-names = "default";
111                         pinctrl-0 = <&work_led>;
112                 };
113
114                 power {
115                         gpios = <&gpio8 2 GPIO_ACTIVE_LOW>;
116                         label = "firefly:green:power";
117                         linux,default-trigger = "default-on";
118                         pinctrl-names = "default";
119                         pinctrl-0 = <&power_led>;
120                 };
121         };
122
123         sdio_pwrseq: sdio-pwrseq {
124                 compatible = "mmc-pwrseq-simple";
125                 clocks = <&hym8563>;
126                 clock-names = "ext_clock";
127                 pinctrl-names = "default";
128                 pinctrl-0 = <&wifi_enable_h>;
129
130                 /*
131                  * On the module itself this is one of these (depending
132                  * on the actual card populated):
133                  * - SDIO_RESET_L_WL_REG_ON
134                  * - PDN (power down when low)
135                  */
136                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
137         };
138
139         sound {
140                 compatible = "simple-audio-card";
141                 simple-audio-card,name = "SPDIF";
142                 simple-audio-card,dai-link@1 {
143                         cpu { sound-dai = <&spdif>; };
144                         codec { sound-dai = <&spdif_out>; };
145                 };
146         };
147
148         spdif_out: spdif-out {
149                 compatible = "linux,spdif-dit";
150                 #sound-dai-cells = <0>;
151         };
152
153         vbat_wl: vcc_sys: vsys-regulator {
154                 compatible = "regulator-fixed";
155                 regulator-name = "vcc_sys";
156                 regulator-min-microvolt = <5000000>;
157                 regulator-max-microvolt = <5000000>;
158                 regulator-always-on;
159                 regulator-boot-on;
160         };
161
162         vcc_sd: sdmmc-regulator {
163                 compatible = "regulator-fixed";
164                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
165                 pinctrl-names = "default";
166                 pinctrl-0 = <&sdmmc_pwr>;
167                 regulator-name = "vcc_sd";
168                 regulator-min-microvolt = <3300000>;
169                 regulator-max-microvolt = <3300000>;
170                 startup-delay-us = <100000>;
171                 vin-supply = <&vcc_io>;
172         };
173
174         vcc_flash: flash-regulator {
175                 compatible = "regulator-fixed";
176                 regulator-name = "vcc_flash";
177                 regulator-min-microvolt = <1800000>;
178                 regulator-max-microvolt = <1800000>;
179                 vin-supply = <&vcc_io>;
180         };
181
182         vcc_5v: usb-regulator {
183                 compatible = "regulator-fixed";
184                 regulator-name = "vcc_5v";
185                 regulator-min-microvolt = <5000000>;
186                 regulator-max-microvolt = <5000000>;
187                 regulator-always-on;
188                 regulator-boot-on;
189                 vin-supply = <&vcc_sys>;
190         };
191
192         vcc_host_5v: usb-host-regulator {
193                 compatible = "regulator-fixed";
194                 enable-active-high;
195                 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
196                 pinctrl-names = "default";
197                 pinctrl-0 = <&host_vbus_drv>;
198                 regulator-name = "vcc_host_5v";
199                 regulator-min-microvolt = <5000000>;
200                 regulator-max-microvolt = <5000000>;
201                 regulator-always-on;
202                 vin-supply = <&vcc_5v>;
203         };
204
205         vcc_otg_5v: usb-otg-regulator {
206                 compatible = "regulator-fixed";
207                 enable-active-high;
208                 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
209                 pinctrl-names = "default";
210                 pinctrl-0 = <&otg_vbus_drv>;
211                 regulator-name = "vcc_otg_5v";
212                 regulator-min-microvolt = <5000000>;
213                 regulator-max-microvolt = <5000000>;
214                 regulator-always-on;
215                 vin-supply = <&vcc_5v>;
216         };
217
218         /*
219          * A TT8142 creates both dovdd_1v8 and vcc28_dvp, controlled
220          * by the dvp_pwr pin.
221          */
222         vcc28_dvp: vcc28-dvp-regulator {
223                 compatible = "regulator-fixed";
224                 enable-active-high;
225                 gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
226                 pinctrl-names = "default";
227                 pinctrl-0 = <&dvp_pwr>;
228                 regulator-name = "vcc28_dvp";
229                 regulator-min-microvolt = <2800000>;
230                 regulator-max-microvolt = <2800000>;
231                 regulator-always-on;
232                 vin-supply = <&vcc_io>;
233         };
234
235         wireless-bluetooth {
236                 compatible = "bluetooth-platdata";
237                 uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
238                 pinctrl-names = "default", "rts_gpio";
239                 pinctrl-0 = <&uart0_rts>;
240                 pinctrl-1 = <&uart0_gpios>;
241                 BT,reset_gpio    = <&gpio4 29 GPIO_ACTIVE_HIGH>;
242                 BT,wake_gpio     = <&gpio4 26 GPIO_ACTIVE_HIGH>;
243                 BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
244                 status = "okay";
245         };
246
247         wireless-wlan {
248                 compatible = "wlan-platdata";
249                 rockchip,grf = <&grf>;
250                 wifi_chip_type = "ap6335";
251                 sdio_vref = <1800>;
252                 WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
253                 status = "okay";
254         };
255 };
256
257 &cpu0 {
258         cpu0-supply = <&vdd_cpu>;
259 };
260
261 &emmc {
262         bus-width = <8>;
263         cap-mmc-highspeed;
264         disable-wp;
265         non-removable;
266         num-slots = <1>;
267         pinctrl-names = "default";
268         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
269         vmmc-supply = <&vcc_io>;
270         vqmmc-supply = <&vcc_flash>;
271         status = "okay";
272 };
273
274 &gmac {
275         assigned-clocks = <&cru SCLK_MAC>;
276         assigned-clock-parents = <&ext_gmac>;
277         clock_in_out = "input";
278         pinctrl-names = "default";
279         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
280         phy-supply = <&vcc_lan>;
281         phy-mode = "rgmii";
282         snps,reset-active-low;
283         snps,reset-delays-us = <0 10000 1000000>;
284         snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
285         tx_delay = <0x30>;
286         rx_delay = <0x10>;
287         status = "ok";
288 };
289
290 &hdmi {
291         ddc-i2c-bus = <&i2c5>;
292         status = "okay";
293 };
294
295 &i2c0 {
296         clock-frequency = <400000>;
297         status = "okay";
298
299         vdd_cpu: syr827@40 {
300                 compatible = "silergy,syr827";
301                 fcs,suspend-voltage-selector = <1>;
302                 reg = <0x40>;
303                 regulator-name = "vdd_cpu";
304                 regulator-min-microvolt = <850000>;
305                 regulator-max-microvolt = <1350000>;
306                 regulator-always-on;
307                 regulator-boot-on;
308                 regulator-enable-ramp-delay = <300>;
309                 regulator-ramp-delay = <8000>;
310                 vin-supply = <&vcc_sys>;
311         };
312
313         vdd_gpu: syr828@41 {
314                 compatible = "silergy,syr828";
315                 fcs,suspend-voltage-selector = <1>;
316                 reg = <0x41>;
317                 regulator-name = "vdd_gpu";
318                 regulator-min-microvolt = <850000>;
319                 regulator-max-microvolt = <1350000>;
320                 regulator-always-on;
321                 regulator-ramp-delay = <6000>;
322                 vin-supply = <&vcc_sys>;
323         };
324
325         hym8563: hym8563@51 {
326                 compatible = "haoyu,hym8563";
327                 reg = <0x51>;
328                 #clock-cells = <0>;
329                 clock-frequency = <32768>;
330                 clock-output-names = "xin32k";
331                 interrupt-parent = <&gpio7>;
332                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
333                 pinctrl-names = "default";
334                 pinctrl-0 = <&rtc_int>;
335         };
336
337         act8846: act8846@5a {
338                 compatible = "active-semi,act8846";
339                 reg = <0x5a>;
340                 pinctrl-names = "default";
341                 pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
342                 system-power-controller;
343
344                 vp1-supply = <&vcc_sys>;
345                 vp2-supply = <&vcc_sys>;
346                 vp3-supply = <&vcc_sys>;
347                 vp4-supply = <&vcc_sys>;
348                 inl1-supply = <&vcc_sys>;
349                 inl2-supply = <&vcc_sys>;
350                 inl3-supply = <&vcc_20>;
351
352                 regulators {
353                         vcc_ddr: REG1 {
354                                 regulator-name = "vcc_ddr";
355                                 regulator-min-microvolt = <1200000>;
356                                 regulator-max-microvolt = <1200000>;
357                                 regulator-always-on;
358                         };
359
360                         vcc_io: REG2 {
361                                 regulator-name = "vcc_io";
362                                 regulator-min-microvolt = <3300000>;
363                                 regulator-max-microvolt = <3300000>;
364                                 regulator-always-on;
365                         };
366
367                         vdd_log: REG3 {
368                                 regulator-name = "vdd_log";
369                                 regulator-min-microvolt = <1100000>;
370                                 regulator-max-microvolt = <1100000>;
371                                 regulator-always-on;
372                         };
373
374                         vcc_20: REG4 {
375                                 regulator-name = "vcc_20";
376                                 regulator-min-microvolt = <2000000>;
377                                 regulator-max-microvolt = <2000000>;
378                                 regulator-always-on;
379                         };
380
381                         vccio_sd: REG5 {
382                                 regulator-name = "vccio_sd";
383                                 regulator-min-microvolt = <3300000>;
384                                 regulator-max-microvolt = <3300000>;
385                                 regulator-always-on;
386                         };
387
388                         vdd10_lcd: REG6 {
389                                 regulator-name = "vdd10_lcd";
390                                 regulator-min-microvolt = <1000000>;
391                                 regulator-max-microvolt = <1000000>;
392                                 regulator-always-on;
393                         };
394
395                         vcca_18: REG7 {
396                                 regulator-name = "vcca_18";
397                                 regulator-min-microvolt = <1800000>;
398                                 regulator-max-microvolt = <1800000>;
399                         };
400
401                         vcca_33: REG8 {
402                                 regulator-name = "vcca_33";
403                                 regulator-min-microvolt = <3300000>;
404                                 regulator-max-microvolt = <3300000>;
405                                 regulator-always-on;
406                         };
407
408                         vcc_lan: REG9 {
409                                 regulator-name = "vcc_lan";
410                                 regulator-min-microvolt = <3300000>;
411                                 regulator-max-microvolt = <3300000>;
412                         };
413
414                         vdd_10: REG10 {
415                                 regulator-name = "vdd_10";
416                                 regulator-min-microvolt = <1000000>;
417                                 regulator-max-microvolt = <1000000>;
418                                 regulator-always-on;
419                         };
420
421                         vccio_wl: vcc_18: REG11 {
422                                 regulator-name = "vcc_18";
423                                 regulator-min-microvolt = <1800000>;
424                                 regulator-max-microvolt = <1800000>;
425                                 regulator-always-on;
426                         };
427
428                         vcc18_lcd: REG12 {
429                                 regulator-name = "vcc18_lcd";
430                                 regulator-min-microvolt = <1800000>;
431                                 regulator-max-microvolt = <1800000>;
432                                 regulator-always-on;
433                         };
434                 };
435         };
436 };
437
438 &i2c1 {
439         status = "okay";
440 };
441
442 &i2c2 {
443         status = "okay";
444 };
445
446 &i2c4 {
447         status = "okay";
448 };
449
450 &i2c5 {
451         status = "okay";
452 };
453
454 &pinctrl {
455         pcfg_output_high: pcfg-output-high {
456                 output-high;
457         };
458
459         pcfg_output_low: pcfg-output-low {
460                 output-low;
461         };
462
463         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
464                 drive-strength = <8>;
465         };
466
467         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
468                 bias-pull-up;
469                 drive-strength = <8>;
470         };
471
472         act8846 {
473                 pwr_hold: pwr-hold {
474                         rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
475                 };
476         };
477
478         dvp {
479                 dvp_pwr: dvp-pwr {
480                         rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>;
481                 };
482         };
483
484         gmac {
485                 phy_int: phy-int {
486                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
487                 };
488
489                 phy_pmeb: phy-pmeb {
490                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
491                 };
492
493                 phy_rst: phy-rst {
494                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
495                 };
496         };
497
498         hym8563 {
499                 rtc_int: rtc-int {
500                         rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
501                 };
502         };
503
504         keys {
505                 pwr_key: pwr-key {
506                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
507                 };
508         };
509
510         leds {
511                 power_led: power-led {
512                         rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
513                 };
514
515                 work_led: work-led {
516                         rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
517                 };
518         };
519
520         sdio-pwrseq {
521                 wifi_enable_h: wifi-enable-h {
522                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
523                 };
524         };
525
526         sdmmc {
527                 /*
528                  * Default drive strength isn't enough to achieve even
529                  * high-speed mode on firefly board so bump up to 8ma.
530                  */
531                 sdmmc_bus4: sdmmc-bus4 {
532                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
533                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
534                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
535                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
536                 };
537
538                 sdmmc_clk: sdmmc-clk {
539                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
540                 };
541
542                 sdmmc_cmd: sdmmc-cmd {
543                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
544                 };
545
546                 sdmmc_pwr: sdmmc-pwr {
547                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
548                 };
549         };
550
551         usb_host {
552                 host_vbus_drv: host-vbus-drv {
553                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
554                 };
555
556                 usbhub_rst: usbhub-rst {
557                         rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
558                 };
559         };
560
561         usb_otg {
562                 otg_vbus_drv: otg-vbus-drv {
563                         rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
564                 };
565         };
566
567         wireless-bluetooth {
568                 uart0_gpios: uart0-gpios {
569                         rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
570                 };
571         };
572 };
573
574 &saradc {
575         vref-supply = <&vcc_18>;
576         status = "okay";
577 };
578
579 &sdio0 {
580         clock-frequency = <50000000>;
581         clock-freq-min-max = <200000 50000000>;
582
583         bus-width = <4>;
584         cap-sd-highspeed;
585         cap-sdio-irq;
586         disable-wp;
587         keep-power-in-suspend;
588         mmc-pwrseq = <&sdio_pwrseq>;
589         non-removable;
590         num-slots = <1>;
591         pinctrl-names = "default";
592         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
593         sd-uhs-sdr104;
594         supports-sdio;
595         vmmc-supply = <&vbat_wl>;
596         vqmmc-supply = <&vccio_wl>;
597         status = "okay";
598 };
599
600 &sdmmc {
601         bus-width = <4>;
602         cap-mmc-highspeed;
603         cap-sd-highspeed;
604         card-detect-delay = <200>;
605         disable-wp;
606         num-slots = <1>;
607         pinctrl-names = "default";
608         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
609         supports-sd;
610         vmmc-supply = <&vcc_sd>;
611         vqmmc-supply = <&vccio_sd>;
612         status = "okay";
613 };
614
615 &spdif {
616         status = "okay";
617 };
618
619 &spi0 {
620         pinctrl-names = "default";
621         pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
622         status = "okay";
623 };
624
625 &tsadc {
626         rockchip,hw-tshut-mode = <0>;
627         rockchip,hw-tshut-polarity = <0>;
628         status = "okay";
629 };
630
631 &uart0 {
632         pinctrl-names = "default";
633         pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
634         status = "okay";
635 };
636
637 &uart1 {
638         status = "okay";
639 };
640
641 &uart2 {
642         status = "okay";
643 };
644
645 &uart3 {
646         status = "okay";
647 };
648
649 &usbphy {
650         status = "okay";
651 };
652
653 &usb_host1 {
654         pinctrl-names = "default";
655         pinctrl-0 = <&usbhub_rst>;
656         status = "okay";
657 };
658
659 &usb_otg {
660         status = "okay";
661 };
662
663 &vopb {
664         status = "okay";
665 };
666
667 &vopb_mmu {
668         status = "okay";
669 };
670
671 &vopl {
672         status = "okay";
673 };
674
675 &vopl_mmu {
676         status = "okay";
677 };
678
679 &vpu {
680         status = "okay";
681 };
682
683 &wdt {
684         status = "okay";
685 };