ath79: reduce spi-max-frequency to 50 MHz
[openwrt/staging/jogo.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,250 @@
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 + default-state = "on";
82 + };
83 + };
84 +
85 + mvsw61xx {
86 + compatible = "marvell,88e6171";
87 + status = "okay";
88 + reg = <0x10>;
89 +
90 + mii-bus = <&mdio>;
91 + cpu-port-0 = <5>;
92 + cpu-port-1 = <6>;
93 + is-indirect;
94 + };
95 +
96 + dsa {
97 + compatible = "marvell,dsa";
98 + #address-cells = <2>;
99 + #size-cells = <0>;
100 +
101 + dsa,ethernet = <&eth0port>;
102 + dsa,mii-bus = <&mdio>;
103 +
104 + switch@16,0 {
105 + #address-cells = <1>;
106 + #size-cells = <0>;
107 + reg = <16 0>; /* MDIO address 16, switch 0 in tree */
108 +
109 + port@0 {
110 + reg = <0>;
111 + label = "ethernet1";
112 + };
113 +
114 + port@1 {
115 + reg = <1>;
116 + label = "ethernet2";
117 + };
118 +
119 + port@2 {
120 + reg = <2>;
121 + label = "ethernet3";
122 + };
123 +
124 + port@3 {
125 + reg = <3>;
126 + label = "ethernet4";
127 + };
128 +
129 + port@4 {
130 + reg = <4>;
131 + label = "internet";
132 + };
133 +
134 + port@5 {
135 + reg = <5>;
136 + label = "cpu";
137 + };
138 + };
139 + };
140 +};
141 +
142 +&pinctrl {
143 + pmx_led_green_power: pmx-led-green-power {
144 + marvell,pins = "mpp7";
145 + marvell,function = "gpo";
146 + };
147 + pmx_btn_wps: pmx-btn-wps {
148 + marvell,pins = "mpp47";
149 + marvell,function = "gpio";
150 + };
151 + pmx_btn_reset: pmx-btn-reset {
152 + marvell,pins = "mpp48";
153 + marvell,function = "gpio";
154 + };
155 +};
156 +
157 +&nand {
158 + status = "okay";
159 + pinctrl-0 = <&pmx_nand>;
160 + pinctrl-names = "default";
161 +
162 + partitions {
163 + compatible = "fixed-partitions";
164 + #address-cells = <1>;
165 + #size-cells = <1>;
166 +
167 + partition@0 {
168 + label = "u-boot";
169 + reg = <0x0 0x80000>;
170 + read-only;
171 + };
172 +
173 + partition@80000 {
174 + label = "u_env";
175 + reg = <0x80000 0x4000>;
176 + };
177 +
178 + partition@84000 {
179 + label = "s_env";
180 + reg = <0x84000 0x4000>;
181 + };
182 +
183 + partition@200000 {
184 + label = "kernel1";
185 + reg = <0x200000 0x290000>;
186 + };
187 +
188 + partition@490000 {
189 + label = "rootfs1";
190 + reg = <0x490000 0x1170000>;
191 + };
192 +
193 + partition@1600000 {
194 + label = "kernel2";
195 + reg = <0x1600000 0x290000>;
196 + };
197 +
198 + partition@1890000 {
199 + label = "rootfs2";
200 + reg = <0x1890000 0x1170000>;
201 + };
202 +
203 + partition@2a00000 {
204 + label = "syscfg";
205 + reg = <0x2a00000 0x1600000>;
206 + };
207 +
208 + partition@88000 {
209 + label = "unused";
210 + reg = <0x88000 0x178000>;
211 + };
212 +
213 + };
214 +};
215 +
216 +&pciec {
217 + status = "okay";
218 +};
219 +
220 +&pcie0 {
221 + status = "okay";
222 +};
223 +
224 +&pcie1 {
225 + status = "okay";
226 +};
227 +
228 +&mdio {
229 + status = "okay";
230 +};
231 +
232 +&uart0 {
233 + status = "okay";
234 +};
235 +
236 +/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
237 + * fixed speed and duplex.
238 + */
239 +&eth0 {
240 + status = "okay";
241 + ethernet0-port@0 {
242 + speed = <1000>;
243 + duplex = <1>;
244 + };
245 +};
246 +
247 +/* eth1 is connected to the switch at port 6. However DSA only supports a
248 + * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
249 + */
250 +&eth1 {
251 + status = "okay";
252 + ethernet1-port@0 {
253 + speed = <1000>;
254 + duplex = <1>;
255 + };
256 +};
257 +
258 +/* There is no battery on the board, so the RTC does not keep
259 + * time when there is no power, making it useless.
260 + */
261 +&rtc {
262 + status = "disabled";
263 +};