kirkwood: use generic diag.sh
[openwrt/staging/wigyori.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,250 @@
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 + };
78 + };
79 +
80 + switches {
81 + #address-cells = <1>;
82 + #size-cells = <0>;
83 +
84 + mvsw61xx@10 {
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 +
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 +};