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