From patchwork Sun Nov 29 08:07:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tyler X-Patchwork-Id: 549726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D059C140306 for ; Sun, 29 Nov 2015 19:07:32 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EDCFC28C0C0; Sun, 29 Nov 2015 09:07:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4207728C0A6 for ; Sun, 29 Nov 2015 09:07:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 HELO_IP_IN_CL_SUBNET=-1.2 (check from: .arocna3. - helo: .na01-bl2-obe.outbound.protection.outlook. - helo-domain: .outlook.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7.7 Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0116.outbound.protection.outlook.com [65.55.169.116]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 29 Nov 2015 09:07:12 +0100 (CET) Received: from BN1PR04MB060.namprd04.prod.outlook.com (10.255.203.28) by BN1PR04MB060.namprd04.prod.outlook.com (10.255.203.28) with Microsoft SMTP Server (TLS) id 15.1.331.20; Sun, 29 Nov 2015 08:07:12 +0000 Received: from BN1PR04MB060.namprd04.prod.outlook.com ([169.254.2.84]) by BN1PR04MB060.namprd04.prod.outlook.com ([169.254.2.84]) with mapi id 15.01.0331.023; Sun, 29 Nov 2015 08:07:12 +0000 From: Andrew Tyler To: "openwrt-devel@lists.openwrt.org" Thread-Topic: ar71xx: add support for EnGenius ECB1750 Thread-Index: AQHRKnuql26D853m4USzlyebwWJNjQ== Date: Sun, 29 Nov 2015 08:07:11 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=atyler@arocna3.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [69.243.206.141] x-microsoft-exchange-diagnostics: 1; BN1PR04MB060; 5:KG+PkH8qVF0LYRfApIySq5+nRxCraMEtYB4IKVufYgR4CGfDty+wfX+d/5wwjR0HHGqFNtph4jZPO51AppuBHbvaHNPPO/tWisN3SXVRPNXRC4MDvgwegskbTa6cT+MZsfsgYKMPPXSgHrOUUPEP7g==; 24:CTk1l2/GCn0OUpmtxqx/mbQqI70QFyCu7i3zC1BfdqdvE9GqTFsx17VikECKplFzkQWcCrJu3MM/1V/Qho9bJ8j8VfYjG21APSkjmVYbrM4= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR04MB060; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001); SRVR:BN1PR04MB060; BCL:0; PCL:0; RULEID:; SRVR:BN1PR04MB060; x-forefront-prvs: 0775716B9D x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(6029001)(199003)(189002)(16236675004)(2900100001)(66066001)(2351001)(3846002)(558084003)(102836003)(6116002)(229853001)(81156007)(97736004)(50986999)(19580395003)(19627405001)(586003)(19580405001)(106116001)(19625215002)(450100001)(74316001)(101416001)(105586002)(99286002)(5004730100002)(106356001)(33656002)(11100500001)(54356999)(40100003)(99936001)(86362001)(5008740100001)(122556002)(5002640100001)(189998001)(87936001)(92566002)(1220700001)(5003600100002)(110136002)(10400500002)(5001960100002)(1096002)(76576001)(107886002)(2501003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR04MB060; H:BN1PR04MB060.namprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en; received-spf: None (protection.outlook.com: arocna3.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arocna3.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2015 08:07:11.4949 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3fc5cecd-242e-45ab-9cf4-85210113aaa3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB060 Subject: [OpenWrt-Devel] ar71xx: add support for EnGenius ECB1750 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This adds support for the EnGenius ECB1750 access point. Tested for 2 weeks and so far everything seems great! Signed-off-by: Andrew Tyler diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 74c3417..a01b441 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -75,6 +75,11 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; + ecb1750) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) + ;; + esac ;; "ath10k/cal-pci-0000:01:00.0.bin") diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index df77040..761afdf 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -491,6 +491,9 @@ ar71xx_board_detect() { *"GL AR300") name="gl-ar300" ;; + *"EnGenius ECB1750") + name="ecb1750" + ;; *"EnGenius EPG5000") name="epg5000" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 41886e3..d19a33c 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -216,6 +216,7 @@ platform_check_image() { dlan-pro-1200-ac | \ dragino2 | \ epg5000 | \ + ecb1750 | \ esr1750 | \ esr900 | \ ew-dorin | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index eff197a..d0b0c8a 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -74,6 +74,7 @@ CONFIG_ATH79_MACH_EL_M150=y CONFIG_ATH79_MACH_EL_MINI=y CONFIG_ATH79_MACH_EPG5000=y CONFIG_ATH79_MACH_ESR1750=y +CONFIG_ATH79_MACH_ECB1750=y CONFIG_ATH79_MACH_ESR900=y CONFIG_ATH79_MACH_EW_DORIN=y CONFIG_ATH79_MACH_F9K1115V2=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ecb1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ecb1750.c new file mode 100644 index 0000000..aa3cf43 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ecb1750.c @@ -0,0 +1,109 @@ +/* + * EnGenius ECB1750 board support + * + * Andrew Tyler + * + * 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 +#include + +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-gpio-buttons.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define ECB1750_GPIO_LED_LAN 12 +#define ECB1750_GPIO_LED_WLAN_2G 13 +#define ECB1750_GPIO_LED_POWER 22 +#define ECB1750_GPIO_LED_WLAN_5G 23 + +#define ECB1750_GPIO_BTN_RESET 17 + +#define ECB1750_KEYS_POLL_INTERVAL 20 /* msecs */ +#define ECB1750_KEYS_DEBOUNCE_INTERVAL (3 * ECB1750_KEYS_POLL_INTERVAL) + +#define ECB1750_MAC0_OFFSET 0 +#define ECB1750_MAC1_OFFSET 1 +#define ECB1750_WMAC_CALDATA_OFFSET 0x1000 +#define ECB1750_PCIE_CALDATA_OFFSET 0x5000 + +static struct gpio_led ecb1750_leds_gpio[] __initdata = { + { + .name = "ecb1750:amber:power", + .gpio = ECB1750_GPIO_LED_POWER, + .active_low = 0, + }, + { + .name = "ecb1750:blue:lan", + .gpio = ECB1750_GPIO_LED_LAN, + .active_low = 0, + }, + { + .name = "ecb1750:blue:wlan24", + .gpio = ECB1750_GPIO_LED_WLAN_2G, + .active_low = 0, + }, + { + .name = "ecb1750:blue:wlan58", + .gpio = ECB1750_GPIO_LED_WLAN_5G, + .active_low = 0, + }, +}; + +static struct gpio_keys_button ecb1750_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = ECB1750_KEYS_DEBOUNCE_INTERVAL, + .gpio = ECB1750_GPIO_BTN_RESET, + .active_low = 1, + }, +}; + +static void __init ecb1750_setup(void) +{ + u8 *art = (u8 *)KSEG1ADDR(0x1fff0000); + u8 mac[6]; + + ath79_register_m25p80(NULL); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(ecb1750_leds_gpio), + ecb1750_leds_gpio); + ath79_register_gpio_keys_polled(-1, ECB1750_KEYS_POLL_INTERVAL, + ARRAY_SIZE(ecb1750_gpio_keys), + ecb1750_gpio_keys); + + ath79_init_mac(mac, art + ECB1750_MAC0_OFFSET, 1); + ath79_init_mac(ath79_eth0_data.mac_addr, art + ECB1750_MAC0_OFFSET, 0); + ath79_register_wmac(art + ECB1750_WMAC_CALDATA_OFFSET, NULL); + ath79_register_pci(); + + ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); + ath79_register_mdio(0, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, art + ECB1750_MAC0_OFFSET, 0); + + /* GMAC0 is connected to the RMGII interface */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.phy_mask = BIT(5); + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_pll_data.pll_1000 = 0x9a000000; + ath79_eth0_pll_data.pll_100 = 0x80000101; + ath79_eth0_pll_data.pll_10 = 0x80001313; + +ath79_register_eth(0); +} + +MIPS_MACHINE(ATH79_MACH_ECB1750, "ECB1750", "EnGenius ECB1750", ecb1750_setup); diff --git a/target/linux/ar71xx/generic/profiles/engenius.mk b/target/linux/ar71xx/generic/profiles/engenius.mk index 7ea93e3..2a19f58 100644 --- a/target/linux/ar71xx/generic/profiles/engenius.mk +++ b/target/linux/ar71xx/generic/profiles/engenius.mk @@ -16,6 +16,16 @@ endef $(eval $(call Profile,EAP300V2)) +define Profile/ECB1750 + NAME:=EnGenius ECB1750 + PACKAGES:=kmod-ath9k kmod-ath10k +endef + +define Profile/ECB1750/Description + Package set optimized for the EnGenius ECB1750. +endef + +$(eval $(call Profile,ECB1750)) define Profile/ESR900 NAME:=EnGenius ESR900 diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d12ad8b..5de7d82 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1484,6 +1484,7 @@ cameo_ap94_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware) cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig) esr900_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) esr1750_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) +ecb1750_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1408k(kernel),14272k(rootfs),320k(userconfig),64k(art),15680k@0x50000(firmware) epg5000_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),3712k(firmware),64k(art) ew-dorin_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro @@ -2324,6 +2325,7 @@ $(eval $(call SingleProfile,dLANLzma,64k,dLAN_pro_1200_ac,dlan-pro-1200-ac,dLAN- $(eval $(call SingleProfile,EnGenius,64k,ESR900,esr900,ESR900,ttyS0,115200,$$(esr900_mtdlayout),KRuImage,,0x4e)) $(eval $(call SingleProfile,EnGenius,64k,ESR1750,esr1750,ESR1750,ttyS0,115200,$$(esr1750_mtdlayout),KRuImage,,0x61)) +$(eval $(call SingleProfile,EnGenius,64k,ECB1750,ecb1750,ECB1750,ttyS0,115200,$$(ecb1750_mtdlayout),KRuImage,,0x61)) $(eval $(call SingleProfile,EnGenius,64k,EPG5000,epg5000,EPG5000,ttyS0,115200,$$(epg5000_mtdlayout),KRuImage,,0x71)) $(eval $(call SingleProfile,HiWiFi,64k,HIWIFI_HC6361,hiwifi-hc6361,HiWiFi-HC6361,ttyATH0,115200,$$(hiwifi_hc6361_mtdlayout),KRuImage)) diff --git a/target/linux/ar71xx/patches-4.1/914-MIPS-ath79-add-ecb1750-support.patch b/target/linux/ar71xx/patches-4.1/914-MIPS-ath79-add-ecb1750-support.patch new file mode 100644 index 0000000..42bb18d --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/914-MIPS-ath79-add-ecb1750-support.patch @@ -0,0 +1,38 @@ +--- a/arch/mips/ath79/machtypes.h ++++ b/arch/mips/ath79/machtypes.h +@@ -70,6 +70,7 @@ + ATH79_MACH_EAP7660D, /* Senao EAP7660D */ + ATH79_MACH_EL_M150, /* EasyLink EL-M150 */ + ATH79_MACH_EL_MINI, /* EasyLink EL-MINI */ ++ ATH79_MACH_ECB1750, /* EnGenius ECB1750 */ + ATH79_MACH_ESR1750, /* EnGenius ESR1750 */ + ATH79_MACH_EPG5000, /* EnGenius EPG5000 */ + ATH79_MACH_F9K1115V2, /* Belkin AC1750DB */ +--- a/arch/mips/ath79/Makefile ++++ b/arch/mips/ath79/Makefile +@@ -83,6 +83,7 @@ + obj-$(CONFIG_ATH79_MACH_EL_MINI) += mach-el-mini.o + obj-$(CONFIG_ATH79_MACH_EPG5000) += mach-epg5000.o + obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o ++obj-$(CONFIG_ATH79_MACH_ECB1750) += mach-ecb1750.o + obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o + obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o + obj-$(CONFIG_ATH79_MACH_GL_AR300) += mach-gl-ar300.o +--- a/arch/mips/ath79/Kconfig ++++ b/arch/mips/ath79/Kconfig +@@ -289,6 +289,15 @@ + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB ++ select ATH79_DEV_WMAC ++ ++config ATH79_MACH_ECB1750 ++ bool "EnGenius ECB1750 board support" ++ select SOC_QCA955X ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + + config ATH79_MACH_WHR_HP_G300N diff --git a/test.diff b/test.diff new file mode 100644 index 0000000..b878e6c --- /dev/null +++ b/test.diff @@ -0,0 +1,187 @@ +--- target/linux/ar71xx/base-files/lib/ar71xx.sh ++++ target/linux/ar71xx/base-files/lib/ar71xx.sh +@@ -482,6 +478,9 @@ ar71xx_board_detect() { + name="gl-inet" + gl_inet_board_detect + ;; ++ *"EnGenius ECB1750") ++ name="ecb1750" ++ ;; + *"EnGenius EPG5000") + name="epg5000" + ;; +--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh ++++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh +@@ -211,11 +211,11 @@ platform_check_image() { + dir-615-i1 | \ + dir-825-c1 | \ + dir-835-a1 | \ +- dlan-hotspot | \ + dlan-pro-500-wp | \ + dlan-pro-1200-ac | \ + dragino2 | \ +- epg5000 | \ ++ ecb1750 | \ ++ epg5000 | \ + esr1750 | \ + esr900 | \ + ew-dorin | \ +--- target/linux/ar71xx/config-4.1 ++++ target/linux/ar71xx/config-4.1 +@@ -73,6 +72,7 @@ CONFIG_ATH79_MACH_EL_M150=y + CONFIG_ATH79_MACH_EL_MINI=y + CONFIG_ATH79_MACH_EPG5000=y + CONFIG_ATH79_MACH_ESR1750=y ++CONFIG_ATH79_MACH_ECB1750=y + CONFIG_ATH79_MACH_ESR900=y + CONFIG_ATH79_MACH_EW_DORIN=y + CONFIG_ATH79_MACH_F9K1115V2=y +--- /dev/null ++++ target/linux/ar71xx/files/arch/mips/ath79/mach-ecb1750.c +@@ -0,0 +1,108 @@ ++/* ++ * EnGenius ECB1750 board support ++ * ++ * Copyright (c) 2015 Andrew Tyler ++ * ++ * 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 ++#include ++ ++#include ++ ++#include "common.h" ++#include "dev-ap9x-pci.h" ++#include "dev-gpio-buttons.h" ++#include "dev-eth.h" ++#include "dev-leds-gpio.h" ++#include "dev-m25p80.h" ++#include "dev-wmac.h" ++#include "machtypes.h" ++#include "pci.h" ++ ++#define ECB1750_GPIO_LED_LAN 12 ++#define ECB1750_GPIO_LED_WLAN_2G 13 ++#define ECB1750_GPIO_LED_POWER 22 ++#define ECB1750_GPIO_LED_WLAN_5G 23 ++ ++#define ECB1750_GPIO_BTN_RESET 17 ++ ++#define ECB1750_KEYS_POLL_INTERVAL 20 /* msecs */ ++#define ECB1750_KEYS_DEBOUNCE_INTERVAL (3 * ECB1750_KEYS_POLL_INTERVAL) ++ ++#define ECB1750_MAC0_OFFSET 0 ++#define ECB1750_MAC1_OFFSET 1 ++#define ECB1750_WMAC_CALDATA_OFFSET 0x1000 ++#define ECB1750_PCIE_CALDATA_OFFSET 0x5000 ++ ++static struct gpio_led ecb1750_leds_gpio[] __initdata = { ++ { ++ .name = "ecb1750:amber:power", ++ .gpio = ECB1750_GPIO_LED_POWER, ++ .active_low = 0, ++ }, ++ { ++ .name = "ecb1750:blue:lan", ++ .gpio = ECB1750_GPIO_LED_LAN, ++ .active_low = 0, ++ }, ++ { ++ .name = "ecb1750:blue:wlan24", ++ .gpio = ECB1750_GPIO_LED_WLAN_2G, ++ .active_low = 0, ++ }, ++ { ++ .name = "ecb1750:blue:wlan58", ++ .gpio = ECB1750_GPIO_LED_WLAN_5G, ++ .active_low = 0, ++ }, ++}; ++ ++static struct gpio_keys_button ecb1750_gpio_keys[] __initdata = { ++ { ++ .desc = "Reset button", ++ .type = EV_KEY, ++ .code = KEY_RESTART, ++ .debounce_interval = ECB1750_KEYS_DEBOUNCE_INTERVAL, ++ .gpio = ECB1750_GPIO_BTN_RESET, ++ .active_low = 1, ++ }, ++}; ++ ++static void __init ecb1750_setup(void) ++{ ++ u8 *art = (u8 *)KSEG1ADDR(0x1fff0000); ++ u8 mac[6]; ++ ++ ath79_register_m25p80(NULL); ++ ++ ath79_register_leds_gpio(-1, ARRAY_SIZE(ecb1750_leds_gpio), ++ ecb1750_leds_gpio); ++ ath79_register_gpio_keys_polled(-1, ECB1750_KEYS_POLL_INTERVAL, ++ ARRAY_SIZE(ecb1750_gpio_keys), ++ ecb1750_gpio_keys); ++ ++ ath79_init_mac(mac, art + ECB1750_MAC0_OFFSET, 1); ++ ath79_init_mac(ath79_eth0_data.mac_addr, art + ECB1750_MAC0_OFFSET, 0); ++ ath79_register_wmac(art + ECB1750_WMAC_CALDATA_OFFSET, NULL); ++ ath79_register_pci(); ++ ++ ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ++ ath79_register_mdio(0, 0x0); ++ ++ ath79_init_mac(ath79_eth0_data.mac_addr, art + ECB1750_MAC0_OFFSET, 0); ++ ++ /* GMAC0 is connected to the RMGII interface */ ++ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ++ ath79_eth0_data.phy_mask = BIT(5); ++ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ++ ath79_eth0_pll_data.pll_1000 = 0x9a000000; ++ ath79_eth0_pll_data.pll_100 = 0x80000101; ++ ath79_eth0_pll_data.pll_10 = 0x80001313; ++ ++ath79_register_eth(0); ++} ++ ++MIPS_MACHINE(ATH79_MACH_ECB1750, "ECB1750", "EnGenius ECB1750", ecb1750_setup); +--- target/linux/ar71xx/generic/profiles/engenius.mk ++++ target/linux/ar71xx/generic/profiles/engenius.mk +@@ -16,6 +16,16 @@ + + $(eval $(call Profile,EAP300V2)) + ++define Profile/ECB1750 ++ NAME:=EnGenius ECB1750 ++ PACKAGES:=kmod-ath9k kmod-ath10k ++endef ++ ++define Profile/ECB1750/Description ++ Package set optimized for the EnGenius ECB1750. ++endef ++ ++$(eval $(call Profile,ECB1750)) + + define Profile/ESR900 + NAME:=EnGenius ESR900 +--- target/linux/ar71xx/image/Makefile ++++ target/linux/ar71xx/image/Makefile +@@ -1484,6 +1484,7 @@ + cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig) + esr900_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) + esr1750_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) ++ecb1750_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1408k(kernel),14272k(rootfs),320k(userconfig),64k(art),15680k@0x50000(firmware) + epg5000_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x40000(firmware) + ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),3712k(firmware),64k(art) + ew-dorin_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro +@@ -2324,6 +2325,7 @@ + + $(eval $(call SingleProfile,EnGenius,64k,ESR900,esr900,ESR900,ttyS0,115200,$$(esr900_mtdlayout),KRuImage,,0x4e)) + $(eval $(call SingleProfile,EnGenius,64k,ESR1750,esr1750,ESR1750,ttyS0,115200,$$(esr1750_mtdlayout),KRuImage,,0x61)) ++$(eval $(call SingleProfile,EnGenius,64k,ECB1750,ecb1750,ECB1750,ttyS0,115200,$$(ecb1750_mtdlayout),KRuImage,,0x61)) + $(eval $(call SingleProfile,EnGenius,64k,EPG5000,epg5000,EPG5000,ttyS0,115200,$$(epg5000_mtdlayout),KRuImage,,0x71)) + + $(eval $(call SingleProfile,HiWiFi,64k,HIWIFI_HC6361,hiwifi-hc6361,HiWiFi-HC6361,ttyATH0,115200,$$(hiwifi_hc6361_mtdlayout),KRuImage)) Signed-off-by: Andrew Tyler