From patchwork Wed Dec 6 06:47:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luochongjun X-Patchwork-Id: 845040 X-Patchwork-Delegate: pepe2k@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="do9QB0b7"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="NPUGy9fB"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ys8Qv3r4xz9s7B for ; Wed, 6 Dec 2017 17:51:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MT0C0IvfU0VmFxBJodX8oJn2YSkgmor0pAu8FL50/fs=; b=do9QB0b7O+R8Xv /hKJLaWNcbU5WU5/dUonIukcGq6kKKOaji6DdEa7zP68ANTtiMNCPk/hy1M1XKrVZ6M0xGwW+NCIC 5CyRpxsspYNAV9duuW1ToesPIsnHIjyXGdxAIevCyNs49V3BTl6qP6JOJ7ARefaDldnO4AwaEU09x 4W6UWrkfzqYETzpHN01Lra669CuVu5eVl57JkzsbpP7VZOMwKaz/SPQjXxRbxyNHPxxchozZSIRH8 xPp1FYmw0UfA9AgVl6KivAPLa1UV03av5/k0NC/Vkr/Nt5iyMeQHZ4fEbRUXb2OLbgIFU9/WMqTxK CKmSg6ibCmcp1/ApPbYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMTXz-0004fg-Tp; Wed, 06 Dec 2017 06:51:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMTXy-0004ey-2S for lede-dev@bombadil.infradead.org; Wed, 06 Dec 2017 06:51:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cBX5AfzCIiT15aN2u9wuXatb2t/f7ePBcL87xk76jXI=; b=NPUGy9fBY4TPS5BNkeFTvZf5w /2Bwvd2C+bMBzBYHp6nKR+tra4O+LqNLSw5NCKSsUECe1J0y7eixfog4x4L2Sd5l6FIuyamlNXsfG nqXU6y5SQpumASNQeHfJxuy6PQLDcH7yQyXyY8xTUJaCl8btc05YKOWlBHEBiUSSbchFBtTlK6ZgG B/0nq6hh6/W2a3JlVc/iI9ua1omdTbWYqmyaYRMKKfEajCncyM4ZrDMkbM27maV8XI77hsaaB6TTH x/zvvd/WD/ladBRKZOGr58IEBncCZA9yQzbfuTzd7nTfGO6TfwD20ttmBXDXAPG6R5yQ0hfbNp27x 6XNa9liCQ==; Received: from smtpbguseast1.qq.com ([54.204.34.129]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMTXs-0007XH-Fs for lede-dev@lists.infradead.org; Wed, 06 Dec 2017 06:51:08 +0000 X-QQ-mid: bizesmtp8t1512542882ty4ewyyjs Received: from luo-B250M-D3H.lan (unknown [119.123.63.51]) by esmtp4.qq.com (ESMTP) with id ; Wed, 06 Dec 2017 14:47:50 +0800 (CST) X-QQ-SSF: A1400000002000F0FF40B00A0000000 X-QQ-FEAT: nf7lT2S3h7uYFYezxbVTwXYv1WEnwqrLZuHDlegKw7eJ/n1bESouYc+I66R6k mi1WTjZhDv1nHuHXQNXCDEVcGT4O7GZg268rISoWN20gvSMeKSc20jSCDa+YeZSsh8fpMyq yRyKVW5srsqM7WE3u647rvSkC+aR8P90MnxoJ3gfnJhyaJEGyZjSx52IZjRYIyJlEsIJuqn Ubu2m4EdM70THCWpnhsqAZvdrdpnvdsMTCxVOQ/CO5vaC1nROQqj3Umb2lSvh9W/tJmVbg7 /TTXDbmmvmtj5ceyJDtt8ZHkjgIpV1nI1PqGWur1jUluZG X-QQ-GoodBg: 2 From: Luochongjun To: lede-dev@lists.infradead.org Date: Wed, 6 Dec 2017 14:47:48 +0800 Message-Id: <1512542868-20216-1-git-send-email-luochongjun@gl-inet.com> X-Mailer: git-send-email 2.7.4 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:gl-inet.com:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171206_065104_713851_EB7AA468 X-CRM114-Status: GOOD ( 16.76 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [54.204.34.129 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH] ar71xx: add support for GL.iNet GL-AR750 X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luochongjun <1464691921@qq.com> MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Luochongjun <1464691921@qq.com> This patch adds supports for the GL.iNet GL-AR750 Specifiation: - SoC: QCA9531 at 650 MHz - Flash: 16 MiB (W25Q128FVSG) - RAM: 128 MiB DDR - Ethernet: 1 x WAN (100 Mbps) and 2 x LAN (100 Mbps) - USB: 1 x USB 2.0 port - Button: 1 x switch button, 1 x reset button - LED: 3 x LEDS - UART: 1 x UART on PCB (JP1: GND, RX, TX, 3.3V) Installation through Luci: - The original firmware is LEDE, so both LuCI or sysupgrade can be used. - Do not keep settings, for sysupgrade please use the -n option. Installation through bootloader webserver: - Plug power and hold reset button until red LED blink to bright. - Install sysupgrade image using web interface on 192.168.1.1. Signed-off-by: chongjun Luo <1464691921@qq.com> --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 + .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-gl-ar750.c | 187 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic.mk | 10 ++ 12 files changed, 225 insertions(+), 1 deletion(-) mode change 100644 => 100755 target/linux/ar71xx/base-files/etc/diag.sh mode change 100644 => 100755 target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata mode change 100644 => 100755 target/linux/ar71xx/config-4.4 mode change 100644 => 100755 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt mode change 100644 => 100755 target/linux/ar71xx/files/arch/mips/ath79/Makefile create mode 100755 target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750.c mode change 100644 => 100755 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h mode change 100644 => 100755 target/linux/ar71xx/image/generic.mk diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e5baa90..c948902 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -391,6 +391,10 @@ dlan-pro-1200-ac) gl-ar300m) ucidef_set_led_wlan "wlan" "WLAN" "$board:red:wlan" "phy0tpt" ;; +gl-ar750) + ucidef_set_led_wlan "wlan-2g" "WLAN-2G" "gl-ar750:wlan-2g" "phy1tpt" + ucidef_set_led_wlan "wlan-5g" "WLAN-5G" "gl-ar750:wlan-5g" "phy0tpt" + ;; gl-mifi) ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 7cf4212..01887f2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -145,6 +145,7 @@ ar71xx_setup_interfaces() dr344|\ gl-ar150|\ gl-ar300m|\ + gl-ar750|\ gl-domino|\ gl-inet|\ gl-mifi|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh old mode 100644 new mode 100755 index 6cbb357..6e5341d --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -75,7 +75,7 @@ get_status_led() { ap90q|\ cpe830|\ cpe870|\ - gl-ar300m|\ + gl-ar300m|\ gl-inet|\ gl-mifi) status_led="$board:green:lan" @@ -521,6 +521,7 @@ set_state() { done) status_led_on case $(board_name) in + gl-ar750|\ gl-ar300m) fw_printenv lc >/dev/null 2>&1 && fw_setenv "bootcount" 0 ;; 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 old mode 100644 new mode 100755 index 6a0a59f..d0e7b76 --- 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 @@ -81,6 +81,10 @@ case "$FIRMWARE" in ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(mtd_get_mac_binary art 18) ;; + gl-ar750) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) +1) + ;; epg5000|\ esr1750) ath10kcal_extract "caldata" 20480 2116 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 285fa68..ab37979 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -670,6 +670,9 @@ ar71xx_board_detect() { *"GL-AR300M") name="gl-ar300m" ;; + *"GL-AR750") + name="gl-ar750" + ;; *"GL-CONNECT INET v1") name="gl-inet" diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 172a58b..6d84659 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -249,6 +249,7 @@ platform_check_image() { ew-dorin|\ ew-dorin-router|\ gl-ar150|\ + gl-ar750|\ gl-ar300m|\ gl-ar300|\ gl-domino|\ diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 old mode 100644 new mode 100755 index 3ba3853..909dca6 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -115,6 +115,7 @@ CONFIG_ATH79_MACH_FRITZ300E=y CONFIG_ATH79_MACH_GL_AR150=y CONFIG_ATH79_MACH_GL_AR300=y CONFIG_ATH79_MACH_GL_AR300M=y +CONFIG_ATH79_MACH_GL_AR750=y CONFIG_ATH79_MACH_GL_DOMINO=y CONFIG_ATH79_MACH_GL_INET=y CONFIG_ATH79_MACH_GL_MIFI=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt old mode 100644 new mode 100755 index 1198fcb..e156536 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -761,6 +761,16 @@ config ATH79_MACH_GL_AR300M select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_GL_AR750 + bool "GL_AR750 support" + select SOC_QCA953X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_GL_DOMINO bool "DOMINO support" select SOC_AR933X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile old mode 100644 new mode 100755 index 455af76..f3edcba --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -121,6 +121,7 @@ obj-$(CONFIG_ATH79_MACH_FRITZ300E) += mach-fritz300e.o obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o obj-$(CONFIG_ATH79_MACH_GL_AR300) += mach-gl-ar300.o obj-$(CONFIG_ATH79_MACH_GL_AR300M) += mach-gl-ar300m.o +obj-$(CONFIG_ATH79_MACH_GL_AR750) += mach-gl-ar750.o obj-$(CONFIG_ATH79_MACH_GL_DOMINO) += mach-gl-domino.o obj-$(CONFIG_ATH79_MACH_GL_INET) += mach-gl-inet.o obj-$(CONFIG_ATH79_MACH_GL_MIFI) += mach-gl-mifi.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750.c new file mode 100755 index 0000000..6c04933 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750.c @@ -0,0 +1,187 @@ +/* + * GLI AR750 board support + * + * Copyright (C) 2011 dongyuqi <729650915@qq.com> + * Copyright (C) 2011-2012 Gabor Juhos + * Copyright (C) 2013 alzhao + * Copyright (C) 2014 Michel Stempin + * + * 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 +#include +#include +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-spi.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define GL_AR750_GPIO_LED_USB 2 +#define GL_AR750_GPIO_LED_WLAN 13 +#define GL_AR750_GPIO_LED_LAN 14 +#define GL_AR750_GPIO_LED_SYSTEM 12 +#define GL_AR750_GPIO_BTN_RESET 3 +#define GL_AR750_GPIO_BTN_LEFT 0 +#define GL_AR750_GPIO_BTN_RIGHT 1 + +#define GL_AR750_GPIO_I2C_SCL 16 +#define GL_AR750_GPIO_I2C_SDA 17 + +#define GL_AR750_KEYS_POLL_INTERVAL 20 /* msecs */ +#define GL_AR750_KEYS_DEBOUNCE_INTERVAL (3 * GL_AR750_KEYS_POLL_INTERVAL) + +#define GL_AR750_MAC0_OFFSET 0 +#define GL_AR750_MAC1_OFFSET 6 +#define GL_AR750_WMAC_CALDATA_OFFSET 0x1000 +#define GL_AR750_PCIE_CALDATA_OFFSET 0x5000 + +static struct gpio_led gl_ar750_leds_gpio[] __initdata = { + { + .name = "gl-ar750:usbpow", + .gpio = GL_AR750_GPIO_LED_USB, + .active_low = 0, + .default_state = 1, + }, + { + .name = "gl-ar750:wlan-2g", + .gpio = GL_AR750_GPIO_LED_LAN, + .active_low = 1, + }, + { + .name = "gl-ar750:wlan-5g", + .gpio = GL_AR750_GPIO_LED_WLAN, + .active_low = 1, + }, + { + .name = "gl-ar750:system", + .gpio = GL_AR750_GPIO_LED_SYSTEM, + .active_low = 1, + .default_state = 1, + }, +}; + +static struct gpio_keys_button gl_ar750_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = GL_AR750_KEYS_DEBOUNCE_INTERVAL, + .gpio = GL_AR750_GPIO_BTN_RESET, + .active_low = 1, + }, + { + .desc = "button right", + .type = EV_KEY, + .code = BTN_0, + .debounce_interval = GL_AR750_KEYS_DEBOUNCE_INTERVAL, + .gpio = GL_AR750_GPIO_BTN_LEFT, + .active_low = 0, + }, + { + .desc = "button left", + .type = EV_KEY, + .code = BTN_1, + .debounce_interval = GL_AR750_KEYS_DEBOUNCE_INTERVAL, + .gpio = GL_AR750_GPIO_BTN_RIGHT, + .active_low = 0, + }, +}; + +static struct spi_board_info gl_ar750_spi_info[] = { + { + .bus_num = 0, + .chip_select = 0, + .max_speed_hz = 25000000, + .modalias = "m25p80", + .platform_data = NULL, + }, + { + .bus_num = 0, + .chip_select = 1, + .max_speed_hz = 25000000, + .modalias = "ath79-spinand", + .platform_data = NULL, + } +}; + +static struct ath79_spi_platform_data gl_ar750_spi_data = { + .bus_num = 0, + .num_chipselect = 2, +}; + +static struct i2c_gpio_platform_data gl_ar750_i2c_gpio_data = { + .sda_pin = GL_AR750_GPIO_I2C_SDA, + .scl_pin = GL_AR750_GPIO_I2C_SCL, +}; + +static struct platform_device gl_ar750_i2c_gpio_device = { + .name = "i2c-gpio", + .id = 0, + .dev = { + .platform_data = &gl_ar750_i2c_gpio_data, + } +}; + + +static void __init gl_ar750_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1f050000); + u8 tmpmac[ETH_ALEN]; + + ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); + ath79_register_spi(&gl_ar750_spi_data, gl_ar750_spi_info, 2); + + /* register gpio LEDs and keys */ + ath79_register_leds_gpio(-1, ARRAY_SIZE(gl_ar750_leds_gpio), + gl_ar750_leds_gpio); + ath79_register_gpio_keys_polled(-1, GL_AR750_KEYS_POLL_INTERVAL, + ARRAY_SIZE(gl_ar750_gpio_keys), + gl_ar750_gpio_keys); + + ath79_register_mdio(0, 0x0); + + /* WAN */ + ath79_init_mac(ath79_eth0_data.mac_addr, art + GL_AR750_MAC0_OFFSET, 0); + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_mask = BIT(4); + ath79_register_eth(0); + + /* LAN */ + ath79_init_mac(ath79_eth1_data.mac_addr, art + GL_AR750_MAC0_OFFSET, 1); + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); + ath79_switch_data.phy4_mii_en = 1; + ath79_register_eth(1); + + ath79_init_mac(tmpmac, art + GL_AR750_WMAC_CALDATA_OFFSET + 2, 0); + ath79_register_wmac(art + GL_AR750_WMAC_CALDATA_OFFSET, tmpmac); + /*register i2c*/ + platform_device_register(&gl_ar750_i2c_gpio_device); + /* enable usb */ + ath79_register_usb(); + /* enable pci */ + ath79_register_pci(); +} + +MIPS_MACHINE(ATH79_MACH_GL_AR750, "GL-AR750", "GL-AR750", + gl_ar750_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h old mode 100644 new mode 100755 index 0f536f0..0e2690e --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -113,6 +113,7 @@ enum ath79_mach_type { ATH79_MACH_GL_AR150, /* GL-AR150 support */ ATH79_MACH_GL_AR300, /* GL-AR300 */ ATH79_MACH_GL_AR300M, /* GL-AR300M */ + ATH79_MACH_GL_AR750, /* GL-AR750 */ ATH79_MACH_GL_DOMINO, /* Domino */ ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ ATH79_MACH_GL_MIFI, /* GL-MIFI support */ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk old mode 100644 new mode 100755 index eb6d6e5..ceb49a9 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -287,6 +287,16 @@ define Device/gl-ar300m endef TARGET_DEVICES += gl-ar300m +define Device/gl-ar750 + DEVICE_TITLE := GL.iNet GL-AR750 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools + BOARDNAME = GL-AR750 + IMAGE_SIZE = 16000k + CONSOLE = ttyS0,115200 + MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,16000k(firmware) +endef +TARGET_DEVICES += gl-ar750 + define Device/gl-domino DEVICE_TITLE := GL.iNet Domino Pi DEVICE_PACKAGES := kmod-usb-core kmod-usb2