ath79: reduce spi-max-frequency to 50 MHz
[openwrt/openwrt.git] / target / linux / kirkwood / patches-4.19 / 104-ea3500.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -269,6 +269,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,251 @@
14 +// SPDX-License-Identifier: GPL-2.0
15 +/*
16 + * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500
17 + *
18 + * (c) 2013 Jonas Gorski <jogo@openwrt.org>
19 + * (c) 2013 Deutsche Telekom Innovation Laboratories
20 + * (c) 2014 Luka Perkov <luka@openwrt.org>
21 + * (c) 2014 Dan Walters <dan@walters.io>
22 + *
23 + */
24 +
25 +/dts-v1/;
26 +
27 +#include "kirkwood.dtsi"
28 +#include "kirkwood-6282.dtsi"
29 +
30 +/ {
31 + model = "Linksys Audi (EA3500)";
32 + compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
33 +
34 + memory@0 {
35 + device_type = "memory";
36 + reg = <0x00000000 0x4000000>;
37 + };
38 +
39 + aliases {
40 + led-boot = &led_power;
41 + led-failsafe = &led_power;
42 + led-running = &led_power;
43 + led-upgrade = &led_power;
44 + serial0 = &uart0;
45 + };
46 +
47 + chosen {
48 + stdout-path = "serial0:115200n8";
49 + };
50 +
51 + gpio_keys {
52 + compatible = "gpio-keys";
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 + led_power: power {
75 + label = "audi:green:power";
76 + gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
77 + default-state = "on";
78 + };
79 + };
80 +
81 + switches {
82 + #address-cells = <1>;
83 + #size-cells = <0>;
84 +
85 + mvsw61xx@10 {
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 +
97 + dsa {
98 + compatible = "marvell,dsa";
99 + #address-cells = <2>;
100 + #size-cells = <0>;
101 +
102 + dsa,ethernet = <&eth0port>;
103 + dsa,mii-bus = <&mdio>;
104 +
105 + switch@16,0 {
106 + #address-cells = <1>;
107 + #size-cells = <0>;
108 + reg = <16 0>; /* MDIO address 16, switch 0 in tree */
109 +
110 + port@0 {
111 + reg = <0>;
112 + label = "ethernet1";
113 + };
114 +
115 + port@1 {
116 + reg = <1>;
117 + label = "ethernet2";
118 + };
119 +
120 + port@2 {
121 + reg = <2>;
122 + label = "ethernet3";
123 + };
124 +
125 + port@3 {
126 + reg = <3>;
127 + label = "ethernet4";
128 + };
129 +
130 + port@4 {
131 + reg = <4>;
132 + label = "internet";
133 + };
134 +
135 + port@5 {
136 + reg = <5>;
137 + label = "cpu";
138 + };
139 + };
140 + };
141 +};
142 +
143 +&pinctrl {
144 + pmx_led_green_power: pmx-led-green-power {
145 + marvell,pins = "mpp7";
146 + marvell,function = "gpo";
147 + };
148 + pmx_btn_wps: pmx-btn-wps {
149 + marvell,pins = "mpp47";
150 + marvell,function = "gpio";
151 + };
152 + pmx_btn_reset: pmx-btn-reset {
153 + marvell,pins = "mpp48";
154 + marvell,function = "gpio";
155 + };
156 +};
157 +
158 +&nand {
159 + status = "okay";
160 + pinctrl-0 = <&pmx_nand>;
161 + pinctrl-names = "default";
162 +
163 + partitions {
164 + compatible = "fixed-partitions";
165 + #address-cells = <1>;
166 + #size-cells = <1>;
167 +
168 + partition@0 {
169 + label = "u-boot";
170 + reg = <0x0 0x80000>;
171 + read-only;
172 + };
173 +
174 + partition@80000 {
175 + label = "u_env";
176 + reg = <0x80000 0x4000>;
177 + };
178 +
179 + partition@84000 {
180 + label = "s_env";
181 + reg = <0x84000 0x4000>;
182 + };
183 +
184 + partition@200000 {
185 + label = "kernel1";
186 + reg = <0x200000 0x290000>;
187 + };
188 +
189 + partition@490000 {
190 + label = "rootfs1";
191 + reg = <0x490000 0x1170000>;
192 + };
193 +
194 + partition@1600000 {
195 + label = "kernel2";
196 + reg = <0x1600000 0x290000>;
197 + };
198 +
199 + partition@1890000 {
200 + label = "rootfs2";
201 + reg = <0x1890000 0x1170000>;
202 + };
203 +
204 + partition@2a00000 {
205 + label = "syscfg";
206 + reg = <0x2a00000 0x1600000>;
207 + };
208 +
209 + partition@88000 {
210 + label = "unused";
211 + reg = <0x88000 0x178000>;
212 + };
213 +
214 + };
215 +};
216 +
217 +&pciec {
218 + status = "okay";
219 +};
220 +
221 +&pcie0 {
222 + status = "okay";
223 +};
224 +
225 +&pcie1 {
226 + status = "okay";
227 +};
228 +
229 +&mdio {
230 + status = "okay";
231 +};
232 +
233 +&uart0 {
234 + status = "okay";
235 +};
236 +
237 +/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
238 + * fixed speed and duplex.
239 + */
240 +&eth0 {
241 + status = "okay";
242 + ethernet0-port@0 {
243 + speed = <1000>;
244 + duplex = <1>;
245 + };
246 +};
247 +
248 +/* eth1 is connected to the switch at port 6. However DSA only supports a
249 + * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
250 + */
251 +&eth1 {
252 + status = "okay";
253 + ethernet1-port@0 {
254 + speed = <1000>;
255 + duplex = <1>;
256 + };
257 +};
258 +
259 +/* There is no battery on the board, so the RTC does not keep
260 + * time when there is no power, making it useless.
261 + */
262 +&rtc {
263 + status = "disabled";
264 +};