add experimental support for the Atheros PB44 board
authorGabor Juhos <juhosg@openwrt.org>
Wed, 20 May 2009 08:23:48 +0000 (08:23 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 20 May 2009 08:23:48 +0000 (08:23 +0000)
SVN-Revision: 15928

target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/config-2.6.28
target/linux/ar71xx/config-2.6.29
target/linux/ar71xx/config-2.6.30
target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c [new file with mode: 0644]
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h

index fb0ff2746269c522f457571a277dcd5beba8a061..ba69e7d5ca3770ae1eae54c7c7c54a12ef2e0bc7 100755 (executable)
@@ -25,6 +25,9 @@ ar71xx_board_name() {
        *PB42)
                name="pb42"
                ;;
+       *PB44)
+               name="pb44"
+               ;;
        *RB-411)
                name="rb-411"
                ;;
index 77157111a311e1ce865a713e1d8535f1ee8b01c5..28cae671f4c816877003186e7169e7032ddf887a 100644 (file)
@@ -13,6 +13,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
 CONFIG_AR71XX_MACH_MZK_W04NU=y
 CONFIG_AR71XX_MACH_MZK_W300NH=y
 CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
 CONFIG_AR71XX_MACH_RB_4XX=y
 CONFIG_AR71XX_MACH_TEW_632BRP=y
 CONFIG_AR71XX_MACH_TL_WR941ND=y
index 7936b1bacab1a2699bdb01f533656768989ca163..497fff65f3cb10fb9a9eb05b45c59d6ce5eda3d1 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
 CONFIG_AR71XX_MACH_MZK_W04NU=y
 CONFIG_AR71XX_MACH_MZK_W300NH=y
 CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
 CONFIG_AR71XX_MACH_RB_4XX=y
 CONFIG_AR71XX_MACH_TEW_632BRP=y
 CONFIG_AR71XX_MACH_TL_WR941ND=y
index 6b3f05f621457c6f87a816b3578e4454565a85f0..81e4e4be4014d8737ac8c74f168312fda1944c68 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
 CONFIG_AR71XX_MACH_MZK_W04NU=y
 CONFIG_AR71XX_MACH_MZK_W300NH=y
 CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
 CONFIG_AR71XX_MACH_RB_4XX=y
 CONFIG_AR71XX_MACH_TEW_632BRP=y
 CONFIG_AR71XX_MACH_TL_WR941ND=y
index de68695308fbf38d27c7591f3f3a93e5452ba86f..d5bffdc9b40d3e113e86d8bdfee35ae46ae45dee 100644 (file)
@@ -18,6 +18,10 @@ config AR71XX_MACH_PB42
        bool "Atheros PB42 board support"
        default y
 
+config AR71XX_MACH_PB44
+       bool "Atheros PB44 board support"
+       default y
+
 config AR71XX_MACH_AW_NR580
        bool "AzureWave AW-NR580 board support"
        default y
index 39510988c1960b084c464094e3ef59a54a93e1d9..a70cc2b24bc5265cb3548b91d95179f7347d57dd 100644 (file)
@@ -17,6 +17,7 @@ obj-$(CONFIG_AR71XX_MACH_GENERIC)     += mach-generic.o
 obj-$(CONFIG_AR71XX_MACH_MZK_W04NU)    += mach-mzk-w04nu.o
 obj-$(CONFIG_AR71XX_MACH_MZK_W300NH)   += mach-mzk-w300nh.o
 obj-$(CONFIG_AR71XX_MACH_PB42)         += mach-pb42.o
+obj-$(CONFIG_AR71XX_MACH_PB44)         += mach-pb44.o
 obj-$(CONFIG_AR71XX_MACH_RB_4XX)       += mach-rb-4xx.o
 obj-$(CONFIG_AR71XX_MACH_TEW_632BRP)   += mach-tew-632brp.o
 obj-$(CONFIG_AR71XX_MACH_TL_WR941ND)   += mach-tl-wr941nd.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
new file mode 100644 (file)
index 0000000..f6d7a2e
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ *  Atheros PB44 board support
+ *
+ *  Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/bitops.h>
+#include <linux/input.h>
+#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+
+#include <asm/mips_machine.h>
+#include <asm/mach-ar71xx/ar71xx.h>
+#include <asm/mach-ar71xx/pci.h>
+
+#include "devices.h"
+
+static struct spi_board_info pb44_spi_info[] = {
+       {
+               .bus_num        = 0,
+               .chip_select    = 0,
+               .max_speed_hz   = 25000000,
+               .modalias       = "m25p80",
+       }
+};
+
+static struct ar71xx_pci_irq pb44_pci_irqs[] __initdata = {
+       {
+               .slot   = 0,
+               .pin    = 1,
+               .irq    = AR71XX_PCI_IRQ_DEV0,
+       }, {
+               .slot   = 1,
+               .pin    = 1,
+               .irq    = AR71XX_PCI_IRQ_DEV1,
+       }, {
+               .slot   = 2,
+               .pin    = 1,
+               .irq    = AR71XX_PCI_IRQ_DEV2,
+       }
+};
+
+#define PB44_WAN_PHYMASK       BIT(1)
+#define PB44_LAN_PHYMASK       0
+#define PB44_MDIO_PHYMASK      (PB44_LAN_PHYMASK | PB44_WAN_PHYMASK)
+
+static void __init pb44_init(void)
+{
+       ar71xx_add_device_spi(NULL, pb44_spi_info,
+                               ARRAY_SIZE(pb44_spi_info));
+
+       ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK);
+
+       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+       ar71xx_eth0_data.phy_mask = PB44_WAN_PHYMASK;
+
+       ar71xx_add_device_eth(0);
+
+       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+       ar71xx_eth1_data.phy_mask = PB44_WAN_PHYMASK;
+       ar71xx_eth1_data.speed = SPEED_1000;
+       ar71xx_eth1_data.duplex = DUPLEX_FULL;
+
+       ar71xx_add_device_eth(1);
+
+       ar71xx_add_device_usb();
+
+       ar71xx_pci_init(ARRAY_SIZE(pb44_pci_irqs), pb44_pci_irqs);
+
+       /* TODO: GPIO LEDs & buttons */
+}
+
+MIPS_MACHINE(AR71XX_MACH_PB44, "Atheros PB44", pb44_init);
index aea7a245a4d9101cb0eb6b7c58d8999008858fa7..9117e3063617a0a9e9bc6ee2182a1cf7619de381 100644 (file)
@@ -83,6 +83,9 @@ static struct board_rec boards[] __initdata = {
        }, {
                .name           = "PB42",
                .mach_type      = AR71XX_MACH_PB42,
+       }, {
+               .name           = "PB44",
+               .mach_type      = AR71XX_MACH_PB44,
        }, {
                .name           = "MZK-W300NH",
                .mach_type      = AR71XX_MACH_MZK_W300NH,
index be2f0deb2081b5645a2d3417e4471145dd335a1b..9bf08433c3c3787e2fa101176fe01f5e1ae6e8f2 100644 (file)
@@ -131,6 +131,7 @@ extern unsigned long ar71xx_mach_type;
 #define AR71XX_MACH_UBNT_RSPRO 17      /* Ubiquiti RouterStation Pro */
 #define AR71XX_MACH_AP81       18      /* Atheros AP81 */
 #define AR71XX_MACH_WRT400N    19      /* Linksys WRT400N */
+#define AR71XX_MACH_PB44       20      /* Atheros PB44 */
 
 /*
  * PLL block