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