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