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