@@ -116,6 +116,7 @@ ramips_setup_interfaces()
;;
3g-6200n | \
+ ap699ge8c2 | \
ai-br100 | \
dir-610-a1 | \
dir-300-b7 | \
@@ -268,6 +269,10 @@ ramips_setup_macs()
local wan_mac=""
case $board in
+ ap699ge8c2)
+ wan_mac=$(mtd_get_mac_binary factory 57350)
+ ;;
+
br-6475nd)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(mtd_get_mac_binary devdata 7)
@@ -397,6 +397,9 @@ ramips_board_detect() {
*"Mediatek MT7628AN evaluation board")
name="mt7628"
;;
+ *"TWSZ AP699GE8C2")
+ name="ap699ge8c2"
+ ;;
*)
name="generic"
;;
@@ -25,6 +25,7 @@ platform_check_image() {
all0256n | \
all5002 | \
all5003 | \
+ ap699ge8c2 | \
ar725w | \
asl26555 | \
awapn2403 | \
new file mode 100644
@@ -0,0 +1,112 @@
+/dts-v1/;
+
+/include/ "mt7621.dtsi"
+
+/ {
+ compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+ model = "TWSZ AP699GE8C2";
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x4000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ palmbus@1E000000 {
+ spi@b00 {
+ status = "okay";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l6405d";
+ reg = <0 0>;
+ linux,modalias = "m25p80";
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
+ };
+
+ };
+ };
+ };
+
+ pcie@1e140000 {
+ status = "okay";
+
+ pcie0 {
+ mt76@0,0 {
+ reg = <0x0000 0 0 0 0>;
+ device_type = "pci";
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+ };
+
+ pcie1 {
+ mt76@1,0 {
+ reg = <0x0000 0 0 0 0>;
+ device_type = "pci";
+ mediatek,mtd-eeprom = <&factory 0x0000>;
+ mediatek,5ghz = <0>;
+ };
+ };
+ };
+
+ ethernet@1e100000 {
+ mtd-mac-address = <&factory 0xe000>;
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ wps {
+ label = "twsz:green:wps";
+ gpios = <&gpio1 14 1>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+ wps {
+ label = "wps";
+ gpios = <&gpio0 18 1>;
+ linux,code = <0x211>;
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
+ ralink,function = "gpio";
+ };
+ };
+ };
+};
@@ -906,7 +906,7 @@ endif
#
ifeq ($(SUBTARGET),mt7621)
- TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt
+ TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt ap699ge8c2
endif
define Device/mt7621
@@ -943,6 +943,10 @@ define Device/firewrt
IMAGE_SIZE := $(ralink_default_fw_size_16M)
endef
+define Device/ap699ge8c2
+ DTS := AP699GE8C2
+endef
+
#
# MT7628 Profiles
#
new file mode 100644
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/AP699GE8C2
+ NAME:=AP699GE8C2 Profile
+ PACKAGES:=\
+ kmod-usb-core kmod-usb3 \
+ kmod-ledtrig-usbdev kmod-mt76
+endef
+
+define Profile/AP699GE8C2/Description
+ Package set optimized for the TWSZ AP699GE8C2
+endef
+$(eval $(call Profile,AP699GE8C2))
Signed-off-by: Cristian Morales Vega <cristian@samknows.com> --- .../linux/ramips/base-files/etc/board.d/02_network | 5 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/AP699GE8C2.dts | 112 +++++++++++++++++++++ target/linux/ramips/image/Makefile | 6 +- target/linux/ramips/mt7621/profiles/ap699ge8c2.mk | 18 ++++ 6 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/AP699GE8C2.dts create mode 100644 target/linux/ramips/mt7621/profiles/ap699ge8c2.mk