[LEDE-DEV] [PATCH] ar71xx: initial board support for tl-hs110
Arvid E. Picciani
aep at exys.org
Wed Jan 24 08:45:20 PST 2018
Signed-off-by: Arvid E. Picciani <aep at exys.org>
---
.../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++++
target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 +
.../ar71xx/files/arch/mips/ath79/mach-tl-hs110.c | 56 ++++++++++++++++++++++
.../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 +
target/linux/ar71xx/image/tp-link.mk | 9 ++++
5 files changed, 77 insertions(+)
create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-hs110.c
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 58d7e43536..25725422ae 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1867,3 +1867,13 @@ config ATH79_MACH_TL_WPA8630
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_HS110
+ bool "TP-Link HS-110 board support"
+ select SOC_AS934X
+ 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
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 7aee760195..205a30ac3c 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -230,3 +230,4 @@ obj-$(CONFIG_ATH79_MACH_XD3200) += mach-sr3200.o
obj-$(CONFIG_ATH79_MACH_Z1) += mach-z1.o
obj-$(CONFIG_ATH79_MACH_ZBT_WE1526) += mach-zbt-we1526.o
obj-$(CONFIG_ATH79_MACH_ZCN_1523H) += mach-zcn-1523h.o
+obj-$(CONFIG_ATH79_MACH_TL_HS110) += mach-tl-hs110.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-hs110.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-hs110.c
new file mode 100644
index 0000000000..8870ed4583
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-hs110.c
@@ -0,0 +1,56 @@
+/*
+ * TP-LINK HS110 board support
+ *
+ * Copyright (C) 2017 Arvid E. Picciani <aep at exys.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/gpio.h>
+#include <linux/printk.h>
+
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define MAC0_OFFSET 0x0000
+#define MAC1_OFFSET 0x0006
+
+static void __init hs110_setup(void)
+{
+ u8 *art = (u8 *) KSEG1ADDR(0x1f000000);
+
+ ath79_register_m25p80(NULL);
+ ath79_init_mac(ath79_eth1_data.mac_addr,
+ art + MAC0_OFFSET, 0);
+ ath79_init_mac(ath79_eth0_data.mac_addr,
+ art + MAC1_OFFSET, 0);
+
+ ath79_register_mdio(0, 0x0);
+
+ ath79_register_eth(1);
+ ath79_register_eth(0);
+
+ printk("hs110_setup: ART partition %x%x%x%x%x%x%x%x",
+ art[0], art[1], art[2], art[3], art[4], art[5], art[6], art[7]);
+ art += 0x3f0000;
+ printk("hs110_setup: ART start %x%x%x%x%x%x%x%x",
+ art[0], art[1], art[2], art[3], art[4], art[5], art[6], art[7]);
+ art += 0x1000;
+ printk("hs110_setup: ART wmac %x%x%x%x%x%x%x%x",
+ art[0], art[1], art[2], art[3], art[4], art[5], art[6], art[7]);
+
+ ath79_register_wmac(art, NULL);
+ ath79_register_usb();
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_HS110, "TL-HS110", "TP-LINK HS110",
+ hs110_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index a12685cd11..d5b258edc5 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -295,6 +295,7 @@ enum ath79_mach_type {
ATH79_MACH_ZBT_WE1526, /* Zbtlink ZBT-WE1526 */
ATH79_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */
ATH79_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */
+ ATH79_MACH_TL_HS110, /* TP-LINK HS110 */
};
#endif /* _ATH79_MACHTYPE_H */
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index b76ed02ca3..ddecf8fe2c 100644
--- a/target/linux/ar71xx/image/tp-link.mk
+++ b/target/linux/ar71xx/image/tp-link.mk
@@ -1004,3 +1004,12 @@ define Device/tl-wa7210n-v2
CONSOLE := ttyATH0,115200
endef
TARGET_DEVICES += tl-wa7210n-v2
+
+define Device/tl-hs110
+ DEVICE_TITLE := TP-LINK TL-HS110
+ BOARDNAME := TL-HS110
+ IMAGE_SIZE := 3776k
+ MTDPARTS := spi0.0:64k(u-boot),3776k(firmware),64k(ART),12288k(archon)
+ CONSOLE := ttyATH0,115200
+endef
+TARGET_DEVICES += tl-hs110
--
2.15.1
More information about the Lede-dev
mailing list