kirkwood: switch to 3.14
[openwrt/staging/wigyori.git] / target / linux / kirkwood / patches-3.10 / 0026-ARM-kirkwood-add-gigabit-ethernet-and-mvmdio-device-.patch
1 From 678cc6aa6f66182cddfc0c8fc34d4ef196669b83 Mon Sep 17 00:00:00 2001
2 From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
3 Date: Sun, 7 Jul 2013 22:34:56 +0200
4 Subject: [PATCH 26/29] ARM: kirkwood: add gigabit ethernet and mvmdio device
5 tree nodes
6
7 This patch adds mv643xx_eth and mvmdio device tree nodes for DT enabled
8 Kirkwood boards. Phy nodes are also added with reg property set on a
9 per-board basis.
10
11 Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
12 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
13 ---
14 arch/arm/boot/dts/kirkwood-cloudbox.dts | 16 +++++++
15 arch/arm/boot/dts/kirkwood-db.dtsi | 16 +++++++
16 arch/arm/boot/dts/kirkwood-dnskw.dtsi | 16 +++++++
17 arch/arm/boot/dts/kirkwood-dockstar.dts | 17 +++++++
18 arch/arm/boot/dts/kirkwood-dreamplug.dts | 28 ++++++++++++
19 arch/arm/boot/dts/kirkwood-goflexnet.dts | 16 +++++++
20 .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 30 +++++++++++++
21 arch/arm/boot/dts/kirkwood-ib62x0.dts | 16 +++++++
22 arch/arm/boot/dts/kirkwood-iconnect.dts | 16 +++++++
23 arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | 24 ++++++++++
24 arch/arm/boot/dts/kirkwood-is2.dts | 2 +
25 arch/arm/boot/dts/kirkwood-km_kirkwood.dts | 16 +++++++
26 arch/arm/boot/dts/kirkwood-lsxl.dtsi | 28 ++++++++++++
27 arch/arm/boot/dts/kirkwood-mplcec4.dts | 27 +++++++++++
28 .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 16 +++++++
29 arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 16 +++++++
30 arch/arm/boot/dts/kirkwood-ns2.dts | 2 +
31 arch/arm/boot/dts/kirkwood-ns2lite.dts | 2 +
32 arch/arm/boot/dts/kirkwood-ns2max.dts | 2 +
33 arch/arm/boot/dts/kirkwood-ns2mini.dts | 2 +
34 arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 16 +++++++
35 arch/arm/boot/dts/kirkwood-topkick.dts | 16 +++++++
36 arch/arm/boot/dts/kirkwood-ts219-6281.dts | 4 +-
37 arch/arm/boot/dts/kirkwood-ts219-6282.dts | 4 +-
38 arch/arm/boot/dts/kirkwood-ts219.dtsi | 16 +++++++
39 arch/arm/boot/dts/kirkwood.dtsi | 52 ++++++++++++++++++++++
40 26 files changed, 414 insertions(+), 2 deletions(-)
41
42 --- a/arch/arm/boot/dts/kirkwood-cloudbox.dts
43 +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
44 @@ -87,3 +87,19 @@
45 gpios = <&gpio0 17 0>;
46 };
47 };
48 +
49 +&mdio {
50 + status = "okay";
51 +
52 + ethphy0: ethernet-phy@0 {
53 + device_type = "ethernet-phy";
54 + reg = <0>;
55 + };
56 +};
57 +
58 +&eth0 {
59 + status = "okay";
60 + ethernet0-port@0 {
61 + phy-handle = <&ethphy0>;
62 + };
63 +};
64 --- a/arch/arm/boot/dts/kirkwood-db.dtsi
65 +++ b/arch/arm/boot/dts/kirkwood-db.dtsi
66 @@ -87,3 +87,19 @@
67 };
68 };
69 };
70 +
71 +&mdio {
72 + status = "okay";
73 +
74 + ethphy0: ethernet-phy@8 {
75 + device_type = "ethernet-phy";
76 + reg = <8>;
77 + };
78 +};
79 +
80 +&eth0 {
81 + status = "okay";
82 + ethernet0-port@0 {
83 + phy-handle = <&ethphy0>;
84 + };
85 +};
86 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
87 +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
88 @@ -217,3 +217,19 @@
89 };
90 };
91 };
92 +
93 +&mdio {
94 + status = "okay";
95 +
96 + ethphy0: ethernet-phy@8 {
97 + device_type = "ethernet-phy";
98 + reg = <8>;
99 + };
100 +};
101 +
102 +&eth0 {
103 + status = "okay";
104 + ethernet0-port@0 {
105 + phy-handle = <&ethphy0>;
106 + };
107 +};
108 --- a/arch/arm/boot/dts/kirkwood-dockstar.dts
109 +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
110 @@ -91,3 +91,20 @@
111 };
112 };
113 };
114 +
115 +&mdio {
116 + status = "okay";
117 +
118 + ethphy0: ethernet-phy@0 {
119 + device_type = "ethernet-phy";
120 + compatible = "marvell,88e1116";
121 + reg = <0>;
122 + };
123 +};
124 +
125 +&eth0 {
126 + status = "okay";
127 + ethernet0-port@0 {
128 + phy-handle = <&ethphy0>;
129 + };
130 +};
131 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
132 +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
133 @@ -99,3 +99,31 @@
134 };
135 };
136 };
137 +
138 +&mdio {
139 + status = "okay";
140 +
141 + ethphy0: ethernet-phy@0 {
142 + device_type = "ethernet-phy";
143 + reg = <0>;
144 + };
145 +
146 + ethphy1: ethernet-phy@1 {
147 + device_type = "ethernet-phy";
148 + reg = <1>;
149 + };
150 +};
151 +
152 +&eth0 {
153 + status = "okay";
154 + ethernet0-port@0 {
155 + phy-handle = <&ethphy0>;
156 + };
157 +};
158 +
159 +&eth1 {
160 + status = "okay";
161 + ethernet1-port@0 {
162 + phy-handle = <&ethphy1>;
163 + };
164 +};
165 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
166 +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
167 @@ -170,3 +170,19 @@
168 };
169 };
170 };
171 +
172 +&mdio {
173 + status = "okay";
174 +
175 + ethphy0: ethernet-phy@0 {
176 + device_type = "ethernet-phy";
177 + reg = <0>;
178 + };
179 +};
180 +
181 +&eth0 {
182 + status = "okay";
183 + ethernet0-port@0 {
184 + phy-handle = <&ethphy0>;
185 + };
186 +};
187 --- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
188 +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
189 @@ -96,3 +96,33 @@
190 };
191 };
192 };
193 +
194 +&mdio {
195 + status = "okay";
196 +
197 + ethphy0: ethernet-phy@0 {
198 + device_type = "ethernet-phy";
199 + compatible = "marvell,88e1121";
200 + reg = <0>;
201 + };
202 +
203 + ethphy1: ethernet-phy@1 {
204 + device_type = "ethernet-phy";
205 + compatible = "marvell,88e1121";
206 + reg = <1>;
207 + };
208 +};
209 +
210 +&eth0 {
211 + status = "okay";
212 + ethernet0-port@0 {
213 + phy-handle = <&ethphy0>;
214 + };
215 +};
216 +
217 +&eth1 {
218 + status = "okay";
219 + ethernet1-port@0 {
220 + phy-handle = <&ethphy1>;
221 + };
222 +};
223 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
224 +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
225 @@ -119,3 +119,19 @@
226
227
228 };
229 +
230 +&mdio {
231 + status = "okay";
232 +
233 + ethphy0: ethernet-phy@8 {
234 + device_type = "ethernet-phy";
235 + reg = <8>;
236 + };
237 +};
238 +
239 +&eth0 {
240 + status = "okay";
241 + ethernet0-port@0 {
242 + phy-handle = <&ethphy0>;
243 + };
244 +};
245 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts
246 +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
247 @@ -176,3 +176,19 @@
248 };
249 };
250 };
251 +
252 +&mdio {
253 + status = "okay";
254 +
255 + ethphy0: ethernet-phy@11 {
256 + device_type = "ethernet-phy";
257 + reg = <11>;
258 + };
259 +};
260 +
261 +&eth0 {
262 + status = "okay";
263 + ethernet0-port@0 {
264 + phy-handle = <&ethphy0>;
265 + };
266 +};
267 --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
268 +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
269 @@ -191,3 +191,27 @@
270 };
271 };
272 };
273 +
274 +&mdio {
275 + status = "okay";
276 +
277 + ethphy1: ethernet-phy@11 {
278 + device_type = "ethernet-phy";
279 + reg = <11>;
280 + };
281 +};
282 +
283 +&eth0 {
284 + status = "okay";
285 + ethernet0-port@0 {
286 + speed = <1000>;
287 + duplex = <1>;
288 + };
289 +};
290 +
291 +&eth1 {
292 + status = "okay";
293 + ethernet1-port@0 {
294 + phy-handle = <&ethphy1>;
295 + };
296 +};
297 --- a/arch/arm/boot/dts/kirkwood-is2.dts
298 +++ b/arch/arm/boot/dts/kirkwood-is2.dts
299 @@ -28,3 +28,5 @@
300 };
301 };
302 };
303 +
304 +&ethphy0 { reg = <8>; };
305 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
306 +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
307 @@ -43,3 +43,19 @@
308 };
309 };
310 };
311 +
312 +&mdio {
313 + status = "okay";
314 +
315 + ethphy0: ethernet-phy@0 {
316 + device_type = "ethernet-phy";
317 + reg = <0>;
318 + };
319 +};
320 +
321 +&eth0 {
322 + status = "okay";
323 + ethernet0-port@0 {
324 + phy-handle = <&ethphy0>;
325 + };
326 +};
327 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
328 +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
329 @@ -201,3 +201,31 @@
330 };
331 };
332 };
333 +
334 +&mdio {
335 + status = "okay";
336 +
337 + ethphy0: ethernet-phy@0 {
338 + device_type = "ethernet-phy";
339 + reg = <0>;
340 + };
341 +
342 + ethphy1: ethernet-phy@8 {
343 + device_type = "ethernet-phy";
344 + reg = <8>;
345 + };
346 +};
347 +
348 +&eth0 {
349 + status = "okay";
350 + ethernet0-port@0 {
351 + phy-handle = <&ethphy0>;
352 + };
353 +};
354 +
355 +&eth1 {
356 + status = "okay";
357 + ethernet1-port@0 {
358 + phy-handle = <&ethphy1>;
359 + };
360 +};
361 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts
362 +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
363 @@ -190,3 +190,30 @@
364 };
365 };
366
367 +&mdio {
368 + status = "okay";
369 +
370 + ethphy0: ethernet-phy@1 {
371 + device_type = "ethernet-phy";
372 + reg = <1>;
373 + };
374 +
375 + ethphy1: ethernet-phy@2 {
376 + device_type = "ethernet-phy";
377 + reg = <2>;
378 + };
379 +};
380 +
381 +&eth0 {
382 + status = "okay";
383 + ethernet0-port@0 {
384 + phy-handle = <&ethphy0>;
385 + };
386 +};
387 +
388 +&eth1 {
389 + status = "okay";
390 + ethernet1-port@0 {
391 + phy-handle = <&ethphy1>;
392 + };
393 +};
394 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
395 +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
396 @@ -178,3 +178,19 @@
397 };
398 };
399 };
400 +
401 +&mdio {
402 + status = "okay";
403 +
404 + ethphy0: ethernet-phy@0 {
405 + device_type = "ethernet-phy";
406 + reg = <0>;
407 + };
408 +};
409 +
410 +&eth0 {
411 + status = "okay";
412 + ethernet0-port@0 {
413 + phy-handle = <&ethphy0>;
414 + };
415 +};
416 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
417 +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
418 @@ -82,3 +82,19 @@
419 };
420
421 };
422 +
423 +&mdio {
424 + status = "okay";
425 +
426 + ethphy0: ethernet-phy {
427 + device_type = "ethernet-phy";
428 + /* overwrite reg property in board file */
429 + };
430 +};
431 +
432 +&eth0 {
433 + status = "okay";
434 + ethernet0-port@0 {
435 + phy-handle = <&ethphy0>;
436 + };
437 +};
438 --- a/arch/arm/boot/dts/kirkwood-ns2.dts
439 +++ b/arch/arm/boot/dts/kirkwood-ns2.dts
440 @@ -28,3 +28,5 @@
441 };
442 };
443 };
444 +
445 +&ethphy0 { reg = <8>; };
446 --- a/arch/arm/boot/dts/kirkwood-ns2lite.dts
447 +++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts
448 @@ -28,3 +28,5 @@
449 };
450 };
451 };
452 +
453 +&ethphy0 { reg = <0>; };
454 --- a/arch/arm/boot/dts/kirkwood-ns2max.dts
455 +++ b/arch/arm/boot/dts/kirkwood-ns2max.dts
456 @@ -47,3 +47,5 @@
457 };
458 };
459 };
460 +
461 +&ethphy0 { reg = <8>; };
462 --- a/arch/arm/boot/dts/kirkwood-ns2mini.dts
463 +++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts
464 @@ -48,3 +48,5 @@
465 };
466 };
467 };
468 +
469 +&ethphy0 { reg = <0>; };
470 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
471 +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
472 @@ -210,3 +210,19 @@
473 };
474 };
475 };
476 +
477 +&mdio {
478 + status = "okay";
479 +
480 + ethphy0: ethernet-phy@0 {
481 + device_type = "ethernet-phy";
482 + reg = <0>;
483 + };
484 +};
485 +
486 +&eth0 {
487 + status = "okay";
488 + ethernet0-port@0 {
489 + phy-handle = <&ethphy0>;
490 + };
491 +};
492 --- a/arch/arm/boot/dts/kirkwood-topkick.dts
493 +++ b/arch/arm/boot/dts/kirkwood-topkick.dts
494 @@ -201,3 +201,19 @@
495 };
496 };
497 };
498 +
499 +&mdio {
500 + status = "okay";
501 +
502 + ethphy0: ethernet-phy@0 {
503 + device_type = "ethernet-phy";
504 + reg = <0>;
505 + };
506 +};
507 +
508 +&eth0 {
509 + status = "okay";
510 + ethernet0-port@0 {
511 + phy-handle = <&ethphy0>;
512 + };
513 +};
514 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts
515 +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
516 @@ -50,4 +50,6 @@
517 gpios = <&gpio0 16 1>;
518 };
519 };
520 -};
521 \ No newline at end of file
522 +};
523 +
524 +&ethphy0 { reg = <8>; };
525 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts
526 +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
527 @@ -50,4 +50,6 @@
528 gpios = <&gpio1 5 1>;
529 };
530 };
531 -};
532 \ No newline at end of file
533 +};
534 +
535 +&ethphy0 { reg = <0>; };
536 --- a/arch/arm/boot/dts/kirkwood-ts219.dtsi
537 +++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi
538 @@ -81,3 +81,19 @@
539 };
540 };
541 };
542 +
543 +&mdio {
544 + status = "okay";
545 +
546 + ethphy0: ethernet-phy {
547 + device_type = "ethernet-phy";
548 + /* overwrite reg property in board file */
549 + };
550 +};
551 +
552 +&eth0 {
553 + status = "okay";
554 + ethernet0-port@0 {
555 + phy-handle = <&ethphy0>;
556 + };
557 +};
558 --- a/arch/arm/boot/dts/kirkwood.dtsi
559 +++ b/arch/arm/boot/dts/kirkwood.dtsi
560 @@ -203,5 +203,57 @@
561 clocks = <&gate_clk 4>;
562 status = "disabled";
563 };
564 +
565 + mdio: mdio-bus@72004 {
566 + compatible = "marvell,orion-mdio";
567 + #address-cells = <1>;
568 + #size-cells = <0>;
569 + reg = <0x72004 0x84>;
570 + interrupts = <46>;
571 + clocks = <&gate_clk 0>;
572 + status = "disabled";
573 +
574 + /* add phy nodes in board file */
575 + };
576 +
577 + eth0: ethernet-controller@72000 {
578 + compatible = "marvell,kirkwood-eth";
579 + #address-cells = <1>;
580 + #size-cells = <0>;
581 + reg = <0x72000 0x4000>;
582 + clocks = <&gate_clk 0>;
583 + marvell,tx-checksum-limit = <1600>;
584 + status = "disabled";
585 +
586 + ethernet0-port@0 {
587 + device_type = "network";
588 + compatible = "marvell,kirkwood-eth-port";
589 + reg = <0>;
590 + interrupts = <11>;
591 + /* overwrite MAC address in bootloader */
592 + local-mac-address = [00 00 00 00 00 00];
593 + /* set phy-handle property in board file */
594 + };
595 + };
596 +
597 + eth1: ethernet-controller@76000 {
598 + compatible = "marvell,kirkwood-eth";
599 + #address-cells = <1>;
600 + #size-cells = <0>;
601 + reg = <0x76000 0x4000>;
602 + clocks = <&gate_clk 19>;
603 + marvell,tx-checksum-limit = <1600>;
604 + status = "disabled";
605 +
606 + ethernet1-port@0 {
607 + device_type = "network";
608 + compatible = "marvell,kirkwood-eth-port";
609 + reg = <0>;
610 + interrupts = <15>;
611 + /* overwrite MAC address in bootloader */
612 + local-mac-address = [00 00 00 00 00 00];
613 + /* set phy-handle property in board file */
614 + };
615 + };
616 };
617 };