2aef79035e5e81260cd62d2d670a3c0289f2966c
[openwrt/openwrt.git] / target / linux / kirkwood / patches-4.14 / 104-ea3500.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -250,6 +250,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
4 kirkwood-linkstation-lswsxl.dtb \
5 kirkwood-linkstation-lswvl.dtb \
6 kirkwood-linkstation-lswxl.dtb \
7 + kirkwood-linksys-audi.dtb \
8 kirkwood-linksys-viper.dtb \
9 kirkwood-lschlv2.dtb \
10 kirkwood-lsxhl.dtb \
11 --- /dev/null
12 +++ b/arch/arm/boot/dts/kirkwood-linksys-audi.dts
13 @@ -0,0 +1,249 @@
14 +/*
15 + * kirkwood-linksys-audi.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 Audi (EA3500)";
34 + compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
35 +
36 + memory {
37 + device_type = "memory";
38 + reg = <0x00000000 0x4000000>;
39 + };
40 +
41 + aliases {
42 + led-boot = &led_power;
43 + led-failsafe = &led_power;
44 + led-running = &led_power;
45 + led-upgrade = &led_power;
46 + serial0 = &uart0;
47 + };
48 +
49 + chosen {
50 + stdout-path = "serial0:115200n8";
51 + };
52 +
53 + gpio_keys {
54 + compatible = "gpio-keys";
55 + #address-cells = <1>;
56 + #size-cells = <0>;
57 + pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
58 + pinctrl-names = "default";
59 +
60 + wps {
61 + label = "WPS Button";
62 + linux,code = <KEY_WPS_BUTTON>;
63 + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
64 + };
65 +
66 + reset {
67 + label = "Reset Button";
68 + linux,code = <KEY_RESTART>;
69 + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
70 + };
71 + };
72 +
73 + gpio-leds {
74 + compatible = "gpio-leds";
75 + pinctrl-0 = < &pmx_led_green_power >;
76 + pinctrl-names = "default";
77 +
78 + led_power: power {
79 + label = "audi:green:power";
80 + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
81 + };
82 + };
83 +
84 + mvsw61xx {
85 + compatible = "marvell,88e6171";
86 + status = "okay";
87 + reg = <0x10>;
88 +
89 + mii-bus = <&mdio>;
90 + cpu-port-0 = <5>;
91 + cpu-port-1 = <6>;
92 + is-indirect;
93 + };
94 +
95 + dsa {
96 + compatible = "marvell,dsa";
97 + #address-cells = <2>;
98 + #size-cells = <0>;
99 +
100 + dsa,ethernet = <&eth0port>;
101 + dsa,mii-bus = <&mdio>;
102 +
103 + switch@16,0 {
104 + #address-cells = <1>;
105 + #size-cells = <0>;
106 + reg = <16 0>; /* MDIO address 16, switch 0 in tree */
107 +
108 + port@0 {
109 + reg = <0>;
110 + label = "ethernet1";
111 + };
112 +
113 + port@1 {
114 + reg = <1>;
115 + label = "ethernet2";
116 + };
117 +
118 + port@2 {
119 + reg = <2>;
120 + label = "ethernet3";
121 + };
122 +
123 + port@3 {
124 + reg = <3>;
125 + label = "ethernet4";
126 + };
127 +
128 + port@4 {
129 + reg = <4>;
130 + label = "internet";
131 + };
132 +
133 + port@5 {
134 + reg = <5>;
135 + label = "cpu";
136 + };
137 + };
138 + };
139 +};
140 +
141 +&pinctrl {
142 + pmx_led_green_power: pmx-led-green-power {
143 + marvell,pins = "mpp7";
144 + marvell,function = "gpo";
145 + };
146 + pmx_btn_wps: pmx-btn-wps {
147 + marvell,pins = "mpp47";
148 + marvell,function = "gpio";
149 + };
150 + pmx_btn_reset: pmx-btn-reset {
151 + marvell,pins = "mpp48";
152 + marvell,function = "gpio";
153 + };
154 +};
155 +
156 +&nand {
157 + status = "okay";
158 + pinctrl-0 = <&pmx_nand>;
159 + pinctrl-names = "default";
160 +
161 + partitions {
162 + compatible = "fixed-partitions";
163 + #address-cells = <1>;
164 + #size-cells = <1>;
165 +
166 + partition@0 {
167 + label = "u-boot";
168 + reg = <0x0 0x80000>;
169 + read-only;
170 + };
171 +
172 + partition@80000 {
173 + label = "u_env";
174 + reg = <0x80000 0x4000>;
175 + };
176 +
177 + partition@84000 {
178 + label = "s_env";
179 + reg = <0x84000 0x4000>;
180 + };
181 +
182 + partition@200000 {
183 + label = "kernel1";
184 + reg = <0x200000 0x290000>;
185 + };
186 +
187 + partition@490000 {
188 + label = "rootfs1";
189 + reg = <0x490000 0x1170000>;
190 + };
191 +
192 + partition@1600000 {
193 + label = "kernel2";
194 + reg = <0x1600000 0x290000>;
195 + };
196 +
197 + partition@1890000 {
198 + label = "rootfs2";
199 + reg = <0x1890000 0x1170000>;
200 + };
201 +
202 + partition@2a00000 {
203 + label = "syscfg";
204 + reg = <0x2a00000 0x1600000>;
205 + };
206 +
207 + partition@88000 {
208 + label = "unused";
209 + reg = <0x88000 0x178000>;
210 + };
211 +
212 + };
213 +};
214 +
215 +&pciec {
216 + status = "okay";
217 +};
218 +
219 +&pcie0 {
220 + status = "okay";
221 +};
222 +
223 +&pcie1 {
224 + status = "okay";
225 +};
226 +
227 +&mdio {
228 + status = "okay";
229 +};
230 +
231 +&uart0 {
232 + status = "okay";
233 +};
234 +
235 +/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
236 + * fixed speed and duplex.
237 + */
238 +&eth0 {
239 + status = "okay";
240 + ethernet0-port@0 {
241 + speed = <1000>;
242 + duplex = <1>;
243 + };
244 +};
245 +
246 +/* eth1 is connected to the switch at port 6. However DSA only supports a
247 + * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
248 + */
249 +&eth1 {
250 + status = "okay";
251 + ethernet1-port@0 {
252 + speed = <1000>;
253 + duplex = <1>;
254 + };
255 +};
256 +
257 +/* There is no battery on the board, so the RTC does not keep
258 + * time when there is no power, making it useless.
259 + */
260 +&rtc {
261 + status = "disabled";
262 +};