kirkwood: add support for Linksys EA3500
[openwrt.git] / target / linux / kirkwood / patches-3.14 / 170-ea3500.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -90,6 +90,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-
4         kirkwood-dns325.dtb \
5         kirkwood-dockstar.dtb \
6         kirkwood-dreamplug.dtb \
7 +       kirkwood-ea3500.dtb \
8         kirkwood-ea4500.dtb \
9         kirkwood-goflexnet.dtb \
10         kirkwood-guruplug-server-plus.dtb \
11 --- /dev/null
12 +++ b/arch/arm/boot/dts/kirkwood-ea3500.dts
13 @@ -0,0 +1,149 @@
14 +/*
15 + * kirkwood-ea3500.dts - Device Tree file for Linksys EA3500
16 + *
17 + * (c) 2013 Jonas Gorski <jogo@openwrt.org>
18 + * (c) 2013 Deutsche Telekom Innovation Laboratories
19 + * (c) 2014 Luka Perkov <luka@openwrt.org>
20 + * (c) 2014 Dan Walters <dan@walters.io>
21 + *
22 + * This file is licensed under the terms of the GNU General Public
23 + * License version 2.  This program is licensed "as is" without any
24 + * warranty of any kind, whether express or implied.
25 + */
26 +
27 +/dts-v1/;
28 +
29 +#include "kirkwood.dtsi"
30 +#include "kirkwood-6282.dtsi"
31 +
32 +/ {
33 +       model = "Linksys EA3500";
34 +       compatible = "linksys,ea3500", "marvell,kirkwood-88f6282", "marvell,kirkwood";
35 +
36 +       memory {
37 +               device_type = "memory";
38 +               reg = <0x00000000 0x4000000>;
39 +       };
40 +
41 +       chosen {
42 +               bootargs = "console=ttyS0,115200n8 earlyprintk";
43 +       };
44 +
45 +       mbus {
46 +               pcie-controller {
47 +                       status = "okay";
48 +
49 +                       pcie@1,0 {
50 +                               status = "okay";
51 +                       };
52 +
53 +                       pcie@2,0 {
54 +                               status = "okay";
55 +                       };
56 +               };
57 +       };
58 +
59 +       ocp@f1000000 {
60 +               pinctrl: pinctrl@10000 {
61 +                       pmx_led_green_power: pmx-led-green-power {
62 +                               marvell,pins = "mpp7";
63 +                               marvell,function = "gpo";
64 +                       };
65 +                       pmx_btn_wps: pmx-btn-wps {
66 +                               marvell,pins = "mpp47";
67 +                               marvell,function = "gpio";
68 +                       };
69 +                       pmx_btn_reset: pmx-btn-reset {
70 +                               marvell,pins = "mpp48";
71 +                               marvell,function = "gpio";
72 +                       };
73 +               };
74 +
75 +               rtc@10300 {
76 +                       status = "disabled";
77 +               };
78 +
79 +               serial@12000 {
80 +                       status = "okay";
81 +               };
82 +
83 +       };
84 +
85 +       gpio_keys {
86 +               compatible = "gpio-keys";
87 +               #address-cells = <1>;
88 +               #size-cells = <0>;
89 +               pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
90 +               pinctrl-names = "default";
91 +
92 +               button@15 {
93 +                       label = "WPS Button";
94 +                       linux,code = <KEY_WPS_BUTTON>;
95 +                       gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
96 +               };
97 +
98 +               button@16 {
99 +                       label = "Reset Button";
100 +                       linux,code = <KEY_RESTART>;
101 +                       gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
102 +               };
103 +       };
104 +
105 +       gpio-leds {
106 +               compatible = "gpio-leds";
107 +               pinctrl-0 = < &pmx_led_green_power >;
108 +               pinctrl-names = "default";
109 +
110 +               green-power {
111 +                       label = "ea3500:green:power";
112 +                       gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
113 +               };
114 +       };
115 +};
116 +
117 +&nand {
118 +       status = "okay";
119 +       pinctrl-0 = <&pmx_nand>;
120 +       pinctrl-names = "default";
121 +
122 +       partition@0 {
123 +               label = "u-boot";
124 +               reg = <0x0000000 0x80000>;
125 +               read-only;
126 +       };
127 +
128 +       partition@80000 {
129 +               label = "u-boot environment";
130 +               reg = <0x80000 0x20000>;
131 +       };
132 +
133 +       partition@200000 {
134 +               label = "kernel";
135 +               reg = <0x200000 0x200000>;
136 +       };
137 +
138 +       partition@400000 {
139 +               label = "root";
140 +               reg = <0x400000 0x1200000>;
141 +       };
142 +};
143 +
144 +&mdio {
145 +       status = "okay";
146 +};
147 +
148 +&eth0 {
149 +       status = "okay";
150 +       ethernet0-port@0 {
151 +               speed = <1000>;
152 +               duplex = <1>;
153 +       };
154 +};
155 +
156 +&eth1 {
157 +       status = "okay";
158 +       ethernet1-port@0 {
159 +               speed = <1000>;
160 +               duplex = <1>;
161 +       };
162 +};