diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-06-18 16:22:05 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-06-18 16:22:05 +0000 |
commit | 7bff9c01010f5c8ba3147da4feffff477eccb164 (patch) | |
tree | 85168e3cb347f35aea732552042351c8c273b8ff /target/linux/ar71xx | |
parent | 44e51c530f821f9c780e9e2fffca9b4aae316c62 (diff) | |
download | mtk-20170518-7bff9c01010f5c8ba3147da4feffff477eccb164.zip mtk-20170518-7bff9c01010f5c8ba3147da4feffff477eccb164.tar.gz mtk-20170518-7bff9c01010f5c8ba3147da4feffff477eccb164.tar.bz2 |
ar71xx: add support for the Senao EAP7660D board
This patch adds support for the Senao EAP7660D board to trunk.
Signed-off-by: Daniel Golle <daniel.golle@gmail.com>
SVN-Revision: 21837
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r-- | target/linux/ar71xx/base-files/etc/defconfig/eap7660d/network | 12 | ||||
-rwxr-xr-x | target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 | ||||
-rw-r--r-- | target/linux/ar71xx/config-2.6.32 | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/config-2.6.33 | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/config-2.6.34 | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/config-2.6.35 | 2 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig | 8 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/Makefile | 1 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c | 89 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h | 1 | ||||
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 6 |
11 files changed, 128 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/defconfig/eap7660d/network b/target/linux/ar71xx/base-files/etc/defconfig/eap7660d/network new file mode 100644 index 0000000..7c9fb63 --- /dev/null +++ b/target/linux/ar71xx/base-files/etc/defconfig/eap7660d/network @@ -0,0 +1,12 @@ +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +config interface lan + option ifname eth0 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ad1cf7d..28fe8ff 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() { *"DIR-825 rev. B1") name="dir-825-b1" ;; + *EAP7660D) + name="eap7660d" + ;; *"Bullet M") name="bullet-m" ;; diff --git a/target/linux/ar71xx/config-2.6.32 b/target/linux/ar71xx/config-2.6.32 index af8f36b..38eef95 100644 --- a/target/linux/ar71xx/config-2.6.32 +++ b/target/linux/ar71xx/config-2.6.32 @@ -23,6 +23,7 @@ CONFIG_AR71XX_MACH_AW_NR580=y CONFIG_AR71XX_MACH_DIR_600_A1=y CONFIG_AR71XX_MACH_DIR_615_C1=y CONFIG_AR71XX_MACH_DIR_825_B1=y +CONFIG_AR71XX_MACH_EAP7660D=y CONFIG_AR71XX_MACH_MZK_W04NU=y CONFIG_AR71XX_MACH_MZK_W300NH=y CONFIG_AR71XX_MACH_NBG460N=y @@ -187,6 +188,7 @@ CONFIG_PCI=y CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PHYLIB=y +CONFIG_MARVELL_PHY=y # CONFIG_PMC_MSP is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_PNX8550_JBS is not set diff --git a/target/linux/ar71xx/config-2.6.33 b/target/linux/ar71xx/config-2.6.33 index 3933145..c2acbdc 100644 --- a/target/linux/ar71xx/config-2.6.33 +++ b/target/linux/ar71xx/config-2.6.33 @@ -23,6 +23,7 @@ CONFIG_AR71XX_MACH_AW_NR580=y CONFIG_AR71XX_MACH_DIR_600_A1=y CONFIG_AR71XX_MACH_DIR_615_C1=y CONFIG_AR71XX_MACH_DIR_825_B1=y +CONFIG_AR71XX_MACH_EAP7660D=y CONFIG_AR71XX_MACH_MZK_W04NU=y CONFIG_AR71XX_MACH_MZK_W300NH=y CONFIG_AR71XX_MACH_NBG460N=y @@ -195,6 +196,7 @@ CONFIG_PCI=y CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PHYLIB=y +CONFIG_MARVELL_PHY=y # CONFIG_PMC_MSP is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_PNX8550_JBS is not set diff --git a/target/linux/ar71xx/config-2.6.34 b/target/linux/ar71xx/config-2.6.34 index 3a719a8..b6e5e99 100644 --- a/target/linux/ar71xx/config-2.6.34 +++ b/target/linux/ar71xx/config-2.6.34 @@ -23,6 +23,7 @@ CONFIG_AR71XX_MACH_AW_NR580=y CONFIG_AR71XX_MACH_DIR_600_A1=y CONFIG_AR71XX_MACH_DIR_615_C1=y CONFIG_AR71XX_MACH_DIR_825_B1=y +CONFIG_AR71XX_MACH_EAP7660D=y CONFIG_AR71XX_MACH_MZK_W04NU=y CONFIG_AR71XX_MACH_MZK_W300NH=y CONFIG_AR71XX_MACH_NBG460N=y @@ -195,6 +196,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PHYLIB=y +CONFIG_MARVELL_PHY=y # CONFIG_PMC_MSP is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_PNX8550_JBS is not set diff --git a/target/linux/ar71xx/config-2.6.35 b/target/linux/ar71xx/config-2.6.35 index 3a719a8..b6e5e99 100644 --- a/target/linux/ar71xx/config-2.6.35 +++ b/target/linux/ar71xx/config-2.6.35 @@ -23,6 +23,7 @@ CONFIG_AR71XX_MACH_AW_NR580=y CONFIG_AR71XX_MACH_DIR_600_A1=y CONFIG_AR71XX_MACH_DIR_615_C1=y CONFIG_AR71XX_MACH_DIR_825_B1=y +CONFIG_AR71XX_MACH_EAP7660D=y CONFIG_AR71XX_MACH_MZK_W04NU=y CONFIG_AR71XX_MACH_MZK_W300NH=y CONFIG_AR71XX_MACH_NBG460N=y @@ -195,6 +196,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_PCI_DISABLE_COMMON_QUIRKS=y CONFIG_PCI_DOMAINS=y CONFIG_PHYLIB=y +CONFIG_MARVELL_PHY=y # CONFIG_PMC_MSP is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_PNX8550_JBS is not set diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig index 29448ac..95c65bc 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig @@ -223,6 +223,14 @@ config AR71XX_MACH_UBNT select AR71XX_DEV_USB default n +config AR71XX_MACH_EAP7660D + bool "Senao EAP7660D support" + select AR71XX_DEV_M25P80 + select AR71XX_DEV_PB42_PCI if PCI + select AR71XX_DEV_GPIO_BUTTONS + select AR71XX_DEV_LEDS_GPIO + default n + endmenu config AR71XX_DEV_M25P80 diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile index 5c9e2c6..fb6953a 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_AR71XX_MACH_AW_NR580) += mach-aw-nr580.o obj-$(CONFIG_AR71XX_MACH_DIR_600_A1) += mach-dir-600-a1.o obj-$(CONFIG_AR71XX_MACH_DIR_615_C1) += mach-dir-615-c1.o obj-$(CONFIG_AR71XX_MACH_DIR_825_B1) += mach-dir-825-b1.o +obj-$(CONFIG_AR71XX_MACH_EAP7660D) += mach-eap7660d.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_NBG460N) += mach-nbg460n.o diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c new file mode 100644 index 0000000..f7e7256 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c @@ -0,0 +1,89 @@ +/* + * Senao EAP7660D board support + * + * Copyright (C) 2010 Daniel Golle <daniel.golle@gmail.com> + * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org> + * Copyright (C) 2008 Imre Kaloz <kaloz@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 <asm/mach-ar71xx/ar71xx.h> + +#include "machtype.h" +#include "devices.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-pb42-pci.h" +#include "dev-m25p80.h" + +#define EAP7660D_BUTTONS_POLL_INTERVAL 20 +#define EAP7660D_GPIO_DS4 7 +#define EAP7660D_GPIO_DS5 2 +#define EAP7660D_GPIO_DS7 0 +#define EAP7660D_GPIO_DS8 4 +#define EAP7660D_GPIO_SW1 3 +#define EAP7660D_GPIO_SW3 8 +#define EAP7660D_PHYMASK BIT(20) + +static struct gpio_led eap7660d_leds_gpio[] __initdata = { + { + .name = "eap7660d:green:ds8", + .gpio = EAP7660D_GPIO_DS8, + .active_low = 0, + }, + { + .name = "eap7660d:green:ds5", + .gpio = EAP7660D_GPIO_DS5, + .active_low = 0, + }, + { + .name = "eap7660d:green:ds7", + .gpio = EAP7660D_GPIO_DS7, + .active_low = 0, + }, + { + .name = "eap7660d:green:ds4", + .gpio = EAP7660D_GPIO_DS4, + .active_low = 0, + } +}; + +static struct gpio_button eap7660d_gpio_buttons[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .threshold = 3, + .gpio = EAP7660D_GPIO_SW1, + .active_low = 1, + }, + { + .desc = "wps", + .type = EV_KEY, + .code = KEY_WPS_BUTTON, + .threshold = 3, + .gpio = EAP7660D_GPIO_SW3, + .active_low = 1, + } +}; + +static void __init eap7660d_setup(void) +{ + ar71xx_add_device_mdio(~EAP7660D_PHYMASK); + ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ar71xx_eth0_data.phy_mask = EAP7660D_PHYMASK; + ar71xx_add_device_eth(0); + ar71xx_add_device_m25p80(NULL); + ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(eap7660d_leds_gpio), + eap7660d_leds_gpio); + ar71xx_add_device_gpio_buttons(-1, EAP7660D_BUTTONS_POLL_INTERVAL, + ARRAY_SIZE(eap7660d_gpio_buttons), + eap7660d_gpio_buttons); + pb42_pci_init(); +}; + +MIPS_MACHINE(AR71XX_MACH_EAP7660D, "EAP7660D", "Senao EAP7660D", + eap7660d_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h index 37ed7d8..9bbc69a 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h @@ -54,6 +54,7 @@ enum ar71xx_mach_type { AR71XX_MACH_WRT160NL, /* Linksys WRT160NL */ AR71XX_MACH_WRT400N, /* Linksys WRT400N */ AR71XX_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */ + AR71XX_MACH_EAP7660D, /* Senao EAP7660D */ }; #endif /* _AR71XX_MACHTYPE_H */ diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e27912e..fc93a17 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -452,6 +452,10 @@ define Image/Build/Profile/DIR600A1 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-600-a1,board=DIR-600-A1,"AP91-AR7240-RT-090223-00") endef +define Image/Build/Profile/EAP7660D + $(call Image/Build/Template/$(fs_128k)/$(1),PB4X,eap7660d,board=EAP7660D) +endef + define Image/Build/Profile/FR54RTR $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,fr-54rtr,board=DIR-600-A1,"AP91-AR7240-RT-090223-01") endef @@ -572,6 +576,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/DIR600A1,$(1)) $(call Image/Build/Profile/DIR615C1,$(1)) $(call Image/Build/Profile/DIR825B1,$(1)) + $(call Image/Build/Profile/EAP7660D,$(1)) $(call Image/Build/Profile/FR54RTR,$(1)) $(call Image/Build/Profile/MZKW04NU,$(1)) $(call Image/Build/Profile/MZKW300NH,$(1)) @@ -601,6 +606,7 @@ define Image/Build/Profile/Minimal endef define Image/Build/Profile/Madwifi + $(call Image/Build/Profile/EAP7660D,$(1)) $(call Image/Build/Profile/UBNTRS,$(1)) $(call Image/Build/Profile/UBNTRSPRO,$(1)) $(call Image/Build/Profile/UBNTLSSR71,$(1)) |