summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authormatteo <matteo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-15 09:16:21 +0000
committermatteo <matteo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-15 09:16:21 +0000
commit50b63d35910dbfadedd2891588bdc07b5e07d588 (patch)
treea677596a7c0dca2e09f946b404a5c5c2f56438c6 /target/linux/ar71xx/files/arch
parent74a702f6b2ae914e2470e973562eb82e5f20449d (diff)
ar71xx: preliminary Ubiquiti Bullet M support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17586 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c46
-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
3 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
index 70d4cba929..e5242eb1ec 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -32,6 +32,11 @@
#define UBNT_LS_SR71_GPIO_LED_D27 6
#define UBNT_LS_SR71_GPIO_LED_D28 7
+#define UBNT_BULLET_M_GPIO_LED_L1 0
+#define UBNT_BULLET_M_GPIO_LED_L2 1
+#define UBNT_BULLET_M_GPIO_LED_L3 11
+#define UBNT_BULLET_M_GPIO_LED_L4 7
+
#define UBNT_BUTTONS_POLL_INTERVAL 20
static struct spi_board_info ubnt_spi_info[] = {
@@ -99,6 +104,26 @@ static struct gpio_led ubnt_ls_sr71_leds_gpio[] __initdata = {
}
};
+static struct gpio_led ubnt_bullet_m_leds_gpio[] __initdata = {
+ {
+ .name = "ubnt:red:link1",
+ .gpio = UBNT_BULLET_M_GPIO_LED_L1,
+ .active_low = 0,
+ }, {
+ .name = "ubnt:orange:link2",
+ .gpio = UBNT_BULLET_M_GPIO_LED_L2,
+ .active_low = 0,
+ }, {
+ .name = "ubnt:green:link3",
+ .gpio = UBNT_BULLET_M_GPIO_LED_L3,
+ .active_low = 0,
+ }, {
+ .name = "ubnt:green:link4",
+ .gpio = UBNT_BULLET_M_GPIO_LED_L4,
+ .active_low = 0,
+ }
+};
+
static struct gpio_button ubnt_gpio_buttons[] __initdata = {
{
.desc = "sw4",
@@ -206,3 +231,24 @@ static void __init ubnt_lssr71_setup(void)
}
MIPS_MACHINE(AR71XX_MACH_UBNT_LSSR71, "Ubiquiti LS-SR71", ubnt_lssr71_setup);
+
+static void __init ubnt_bullet_m_setup(void)
+{
+ ar71xx_add_device_spi(NULL, ubnt_spi_info,
+ ARRAY_SIZE(ubnt_spi_info));
+
+ ar71xx_add_device_mdio(~0);
+
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ar71xx_eth0_data.phy_mask = 0;
+
+ ar71xx_eth0_data.speed = SPEED_100;
+ ar71xx_eth0_data.duplex = DUPLEX_FULL;
+
+ ar71xx_add_device_eth(0);
+
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_bullet_m_leds_gpio),
+ ubnt_bullet_m_leds_gpio);
+}
+
+MIPS_MACHINE(AR71XX_MACH_UBNT_BULLET_M, "Ubiquiti Bullet M", ubnt_bullet_m_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index 23493cdb92..ed6f4e9932 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -83,6 +83,9 @@ static struct board_rec boards[] __initdata = {
.name = "UBNT-LSX",
.mach_type = AR71XX_MACH_UBNT_LSX,
}, {
+ .name = "UBNT-BM",
+ .mach_type = AR71XX_MACH_UBNT_BULLET_M,
+ }, {
.name = "WNR2000",
.mach_type = AR71XX_MACH_WNR2000,
}, {
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 216b2ce195..4d2f7f2164 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
@@ -140,6 +140,7 @@ enum ar71xx_mach_type {
AR71XX_MACH_UBNT_LSX, /* Ubiquiti LSX */
AR71XX_MACH_UBNT_RS, /* Ubiquiti RouterStation */
AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
+ AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
AR71XX_MACH_WNR2000, /* NETGEAR WNR2000 */
AR71XX_MACH_WP543, /* Compex WP543 */
AR71XX_MACH_WRT160NL, /* Linksys WRT160NL */