summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-20 08:23:48 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-20 08:23:48 +0000
commitcd8b422a5b316696504a19af9d8936ab00ff33c0 (patch)
tree959ecc8b0f89582a4c1ff4da294547a1f7b21582
parent91302e010f912d96454bc8409794a58e0501e25a (diff)
[ar71xx] add experimental support for the Atheros PB44 board
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15928 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rw-r--r--target/linux/ar71xx/config-2.6.281
-rw-r--r--target/linux/ar71xx/config-2.6.291
-rw-r--r--target/linux/ar71xx/config-2.6.301
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Makefile1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c79
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h1
9 files changed, 94 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index fb0ff2746..ba69e7d5c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -25,6 +25,9 @@ ar71xx_board_name() {
*PB42)
name="pb42"
;;
+ *PB44)
+ name="pb44"
+ ;;
*RB-411)
name="rb-411"
;;
diff --git a/target/linux/ar71xx/config-2.6.28 b/target/linux/ar71xx/config-2.6.28
index 77157111a..28cae671f 100644
--- a/target/linux/ar71xx/config-2.6.28
+++ b/target/linux/ar71xx/config-2.6.28
@@ -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
diff --git a/target/linux/ar71xx/config-2.6.29 b/target/linux/ar71xx/config-2.6.29
index 7936b1bac..497fff65f 100644
--- a/target/linux/ar71xx/config-2.6.29
+++ b/target/linux/ar71xx/config-2.6.29
@@ -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
diff --git a/target/linux/ar71xx/config-2.6.30 b/target/linux/ar71xx/config-2.6.30
index 6b3f05f62..81e4e4be4 100644
--- a/target/linux/ar71xx/config-2.6.30
+++ b/target/linux/ar71xx/config-2.6.30
@@ -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
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index de6869530..d5bffdc9b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -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
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index 39510988c..a70cc2b24 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -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
index 000000000..f6d7a2e0a
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
@@ -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);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index aea7a245a..9117e3063 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -84,6 +84,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,
}, {
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
index be2f0deb2..9bf08433c 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
@@ -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