1 From fda4bd9bac78efd2f9d566c52956d297bc03e8d9 Mon Sep 17 00:00:00 2001
2 From: Anton Vorontsov <avorontsov@ru.mvista.com>
3 Date: Sat, 25 Jul 2009 01:42:17 +0400
4 Subject: [PATCH] powerpc/83xx: Add support for MPC8377E-WLAN boards
6 MPC8377E-WLAN are basically RDB boards except:
8 - RAM extended to 512 MB;
9 - NAND flash removed, NOR flash extended to 64 MB;
10 - Vitesse VSC7385 5-port switch removed, RTL8211B PHY added;
11 - Power management MCU removed;
12 - PCI slot removed, another mini-PCI slot added (IRQ routing changed);
13 - USB3300 PHY's ID pin grounded, thus USB port is host-only.
15 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
16 Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
19 arch/powerpc/boot/dts/mpc8377_wlan.dts | 464 +++++++++++++++++++++++++++++
20 arch/powerpc/platforms/83xx/Kconfig | 4 +-
21 arch/powerpc/platforms/83xx/mpc837x_rdb.c | 5 +-
22 3 files changed, 469 insertions(+), 4 deletions(-)
23 create mode 100644 arch/powerpc/boot/dts/mpc8377_wlan.dts
26 +++ b/arch/powerpc/boot/dts/mpc8377_wlan.dts
29 + * MPC8377E WLAN Device Tree Source
31 + * Copyright 2007-2009 Freescale Semiconductor Inc.
32 + * Copyright 2009 MontaVista Software, Inc.
34 + * This program is free software; you can redistribute it and/or modify it
35 + * under the terms of the GNU General Public License as published by the
36 + * Free Software Foundation; either version 2 of the License, or (at your
37 + * option) any later version.
43 + compatible = "fsl,mpc8377wlan";
44 + #address-cells = <1>;
58 + #address-cells = <1>;
62 + device_type = "cpu";
64 + d-cache-line-size = <32>;
65 + i-cache-line-size = <32>;
66 + d-cache-size = <32768>;
67 + i-cache-size = <32768>;
68 + timebase-frequency = <0>;
69 + bus-frequency = <0>;
70 + clock-frequency = <0>;
75 + device_type = "memory";
76 + reg = <0x00000000 0x20000000>; // 512MB at 0
80 + #address-cells = <2>;
82 + compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus";
83 + reg = <0xe0005000 0x1000>;
84 + interrupts = <77 0x8>;
85 + interrupt-parent = <&ipic>;
86 + ranges = <0x0 0x0 0xfc000000 0x04000000>;
89 + #address-cells = <1>;
91 + compatible = "cfi-flash";
92 + reg = <0x0 0x0 0x4000000>;
103 + reg = <0xa0000 0x300000>;
108 + reg = <0x3a0000 0x3c60000>;
115 + #address-cells = <1>;
117 + device_type = "soc";
118 + compatible = "simple-bus";
119 + ranges = <0x0 0xe0000000 0x00100000>;
120 + reg = <0xe0000000 0x00000200>;
121 + bus-frequency = <0>;
124 + device_type = "watchdog";
125 + compatible = "mpc83xx_wdt";
126 + reg = <0x200 0x100>;
129 + gpio1: gpio-controller@c00 {
131 + compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio";
132 + reg = <0xc00 0x100>;
133 + interrupts = <74 0x8>;
134 + interrupt-parent = <&ipic>;
138 + gpio2: gpio-controller@d00 {
140 + compatible = "fsl,mpc8377-gpio", "fsl,mpc8349-gpio";
141 + reg = <0xd00 0x100>;
142 + interrupts = <75 0x8>;
143 + interrupt-parent = <&ipic>;
148 + #address-cells = <1>;
150 + compatible = "simple-bus";
151 + sleep = <&pmc 0x0c000000>;
155 + #address-cells = <1>;
158 + compatible = "fsl-i2c";
159 + reg = <0x3000 0x100>;
160 + interrupts = <14 0x8>;
161 + interrupt-parent = <&ipic>;
165 + compatible = "at24,24c256";
170 + compatible = "dallas,ds1339";
176 + compatible = "fsl,mpc8377-esdhc", "fsl,esdhc";
177 + reg = <0x2e000 0x1000>;
178 + interrupts = <42 0x8>;
179 + interrupt-parent = <&ipic>;
180 + clock-frequency = <133333333>;
185 + #address-cells = <1>;
188 + compatible = "fsl-i2c";
189 + reg = <0x3100 0x100>;
190 + interrupts = <15 0x8>;
191 + interrupt-parent = <&ipic>;
197 + compatible = "fsl,spi";
198 + reg = <0x7000 0x1000>;
199 + interrupts = <16 0x8>;
200 + interrupt-parent = <&ipic>;
205 + #address-cells = <1>;
207 + compatible = "fsl,mpc8377-dma", "fsl,elo-dma";
209 + ranges = <0 0x8100 0x1a8>;
210 + interrupt-parent = <&ipic>;
211 + interrupts = <71 8>;
214 + compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
217 + interrupt-parent = <&ipic>;
218 + interrupts = <71 8>;
221 + compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
224 + interrupt-parent = <&ipic>;
225 + interrupts = <71 8>;
228 + compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
229 + reg = <0x100 0x80>;
231 + interrupt-parent = <&ipic>;
232 + interrupts = <71 8>;
235 + compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
236 + reg = <0x180 0x28>;
238 + interrupt-parent = <&ipic>;
239 + interrupts = <71 8>;
244 + compatible = "fsl-usb2-dr";
245 + reg = <0x23000 0x1000>;
246 + #address-cells = <1>;
248 + interrupt-parent = <&ipic>;
249 + interrupts = <38 0x8>;
251 + sleep = <&pmc 0x00c00000>;
254 + enet0: ethernet@24000 {
255 + #address-cells = <1>;
258 + device_type = "network";
260 + compatible = "gianfar";
261 + reg = <0x24000 0x1000>;
262 + ranges = <0x0 0x24000 0x1000>;
263 + local-mac-address = [ 00 00 00 00 00 00 ];
264 + interrupts = <32 0x8 33 0x8 34 0x8>;
265 + phy-connection-type = "mii";
266 + interrupt-parent = <&ipic>;
267 + tbi-handle = <&tbi0>;
268 + phy-handle = <&phy2>;
269 + sleep = <&pmc 0xc0000000>;
273 + #address-cells = <1>;
275 + compatible = "fsl,gianfar-mdio";
276 + reg = <0x520 0x20>;
278 + phy2: ethernet-phy@2 {
279 + interrupt-parent = <&ipic>;
280 + interrupts = <17 0x8>;
282 + device_type = "ethernet-phy";
285 + phy3: ethernet-phy@3 {
286 + interrupt-parent = <&ipic>;
287 + interrupts = <18 0x8>;
289 + device_type = "ethernet-phy";
294 + device_type = "tbi-phy";
299 + enet1: ethernet@25000 {
300 + #address-cells = <1>;
303 + device_type = "network";
305 + compatible = "gianfar";
306 + reg = <0x25000 0x1000>;
307 + ranges = <0x0 0x25000 0x1000>;
308 + local-mac-address = [ 00 00 00 00 00 00 ];
309 + interrupts = <35 0x8 36 0x8 37 0x8>;
310 + phy-connection-type = "mii";
311 + interrupt-parent = <&ipic>;
312 + phy-handle = <&phy3>;
313 + tbi-handle = <&tbi1>;
314 + sleep = <&pmc 0x30000000>;
318 + #address-cells = <1>;
320 + compatible = "fsl,gianfar-tbi";
321 + reg = <0x520 0x20>;
325 + device_type = "tbi-phy";
330 + serial0: serial@4500 {
332 + device_type = "serial";
333 + compatible = "ns16550";
334 + reg = <0x4500 0x100>;
335 + clock-frequency = <0>;
336 + interrupts = <9 0x8>;
337 + interrupt-parent = <&ipic>;
340 + serial1: serial@4600 {
342 + device_type = "serial";
343 + compatible = "ns16550";
344 + reg = <0x4600 0x100>;
345 + clock-frequency = <0>;
346 + interrupts = <10 0x8>;
347 + interrupt-parent = <&ipic>;
351 + compatible = "fsl,sec3.0", "fsl,sec2.4", "fsl,sec2.2",
352 + "fsl,sec2.1", "fsl,sec2.0";
353 + reg = <0x30000 0x10000>;
354 + interrupts = <11 0x8>;
355 + interrupt-parent = <&ipic>;
356 + fsl,num-channels = <4>;
357 + fsl,channel-fifo-len = <24>;
358 + fsl,exec-units-mask = <0x9fe>;
359 + fsl,descriptor-types-mask = <0x3ab0ebf>;
360 + sleep = <&pmc 0x03000000>;
364 + compatible = "fsl,mpc8377-sata", "fsl,pq-sata";
365 + reg = <0x18000 0x1000>;
366 + interrupts = <44 0x8>;
367 + interrupt-parent = <&ipic>;
368 + sleep = <&pmc 0x000000c0>;
372 + compatible = "fsl,mpc8377-sata", "fsl,pq-sata";
373 + reg = <0x19000 0x1000>;
374 + interrupts = <45 0x8>;
375 + interrupt-parent = <&ipic>;
376 + sleep = <&pmc 0x00000030>;
380 + * interrupts cell = <intr #, sense>
381 + * sense values match linux IORESOURCE_IRQ_* defines:
382 + * sense == 8: Level, low assertion
383 + * sense == 2: Edge, high-to-low change
385 + ipic: interrupt-controller@700 {
386 + compatible = "fsl,ipic";
387 + interrupt-controller;
388 + #address-cells = <0>;
389 + #interrupt-cells = <2>;
390 + reg = <0x700 0x100>;
394 + compatible = "fsl,mpc8377-pmc", "fsl,mpc8349-pmc";
395 + reg = <0xb00 0x100 0xa00 0x100>;
396 + interrupts = <80 0x8>;
397 + interrupt-parent = <&ipic>;
401 + pci0: pci@e0008500 {
402 + interrupt-map-mask = <0xf800 0 0 7>;
404 + /* IRQ5 = 21 = 0x15, IRQ6 = 0x16, IRQ7 = 23 = 0x17 */
406 + /* IDSEL AD14 IRQ6 inta */
407 + 0x7000 0x0 0x0 0x1 &ipic 22 0x8
409 + /* IDSEL AD15 IRQ5 inta */
410 + 0x7800 0x0 0x0 0x1 &ipic 21 0x8>;
411 + interrupt-parent = <&ipic>;
412 + interrupts = <66 0x8>;
414 + ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
415 + 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
416 + 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
417 + sleep = <&pmc 0x00010000>;
418 + clock-frequency = <66666666>;
419 + #interrupt-cells = <1>;
421 + #address-cells = <3>;
422 + reg = <0xe0008500 0x100 /* internal registers */
423 + 0xe0008300 0x8>; /* config space access registers */
424 + compatible = "fsl,mpc8349-pci";
425 + device_type = "pci";
428 + pci1: pcie@e0009000 {
429 + #address-cells = <3>;
431 + #interrupt-cells = <1>;
432 + device_type = "pci";
433 + compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
434 + reg = <0xe0009000 0x00001000>;
435 + ranges = <0x02000000 0 0xa8000000 0xa8000000 0 0x10000000
436 + 0x01000000 0 0x00000000 0xb8000000 0 0x00800000>;
437 + bus-range = <0 255>;
438 + interrupt-map-mask = <0xf800 0 0 7>;
439 + interrupt-map = <0 0 0 1 &ipic 1 8
442 + 0 0 0 4 &ipic 1 8>;
443 + sleep = <&pmc 0x00300000>;
444 + clock-frequency = <0>;
447 + #address-cells = <3>;
449 + device_type = "pci";
451 + ranges = <0x02000000 0 0xa8000000
452 + 0x02000000 0 0xa8000000
454 + 0x01000000 0 0x00000000
455 + 0x01000000 0 0x00000000
460 + pci2: pcie@e000a000 {
461 + #address-cells = <3>;
463 + #interrupt-cells = <1>;
464 + device_type = "pci";
465 + compatible = "fsl,mpc8377-pcie", "fsl,mpc8314-pcie";
466 + reg = <0xe000a000 0x00001000>;
467 + ranges = <0x02000000 0 0xc8000000 0xc8000000 0 0x10000000
468 + 0x01000000 0 0x00000000 0xd8000000 0 0x00800000>;
469 + bus-range = <0 255>;
470 + interrupt-map-mask = <0xf800 0 0 7>;
471 + interrupt-map = <0 0 0 1 &ipic 2 8
474 + 0 0 0 4 &ipic 2 8>;
475 + sleep = <&pmc 0x000c0000>;
476 + clock-frequency = <0>;
479 + #address-cells = <3>;
481 + device_type = "pci";
483 + ranges = <0x02000000 0 0xc8000000
484 + 0x02000000 0 0xc8000000
486 + 0x01000000 0 0x00000000
487 + 0x01000000 0 0x00000000
492 --- a/arch/powerpc/platforms/83xx/Kconfig
493 +++ b/arch/powerpc/platforms/83xx/Kconfig
494 @@ -84,11 +84,11 @@ config MPC837x_MDS
495 This option enables support for the MPC837x MDS Processor Board.
498 - bool "Freescale MPC837x RDB"
499 + bool "Freescale MPC837x RDB/WLAN"
500 select DEFAULT_UIMAGE
503 - This option enables support for the MPC837x RDB Board.
504 + This option enables support for the MPC837x RDB and WLAN Boards.
507 bool "Wind River SBC834x"
508 --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
509 +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
510 @@ -86,11 +86,12 @@ static int __init mpc837x_rdb_probe(void
512 return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") ||
513 of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") ||
514 - of_flat_dt_is_compatible(root, "fsl,mpc8379rdb");
515 + of_flat_dt_is_compatible(root, "fsl,mpc8379rdb") ||
516 + of_flat_dt_is_compatible(root, "fsl,mpc8377wlan");
519 define_machine(mpc837x_rdb) {
520 - .name = "MPC837x RDB",
521 + .name = "MPC837x RDB/WLAN",
522 .probe = mpc837x_rdb_probe,
523 .setup_arch = mpc837x_rdb_setup_arch,
524 .init_IRQ = mpc837x_rdb_init_IRQ,