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