[ar71xx] add experimental support for the Atheros PB44 board
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 20 May 2009 08:23:48 +0000 (08:23 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 20 May 2009 08:23:48 +0000 (08:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15928 3c298f89-4303-0410-b956-a3cf2f4a3e73

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 fb0ff27..ba69e7d 100755 (executable)
@@ -25,6 +25,9 @@ ar71xx_board_name() {
        *PB42)
                name="pb42"
                ;;
+       *PB44)
+               name="pb44"
+               ;;
        *RB-411)
                name="rb-411"
                ;;
index 7715711..28cae67 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 7936b1b..497fff6 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 6b3f05f..81e4e4b 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 de68695..d5bffdc 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 3951098..a70cc2b 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 aea7a24..9117e30 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 be2f0de..9bf0843 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
This page took 0.049426 seconds and 4 git commands to generate.