Add support for Digineo AC1200 Pro

Signed-off-by: Julian Kornberger <jk+github@digineo.de>
This commit is contained in:
Julian Kornberger 2016-12-17 20:55:44 +01:00
parent 890ce568a4
commit 2ba67d9971
2 changed files with 74 additions and 87 deletions

View File

@ -1,92 +1,72 @@
From: John Crispin <blogic@openwrt.org> From: Julian Kornberger <jk+github@digineo.de>
Date: Thu, 21 Apr 2016 19:47:08 +0000 Date: Sat, 17 Dec 2016 19:47:00 +0100
Subject: ramips: Add support for ZBT WG3526 Subject: Add support for Digineo AC1200 Pro
The WG3526 is the follow-up to the 2626 and is mostly the same, with the
excaption that the mt7602 has been replaced with the mt7603. The internal wifi
setup has also changed slightly. Based on my tests, everything that worked on
the 2626 works on the 3526 and with roughly the same performance.
v1->v2:
* Remove some references to 2626 that I had missed in the dts.
v2->v3:
* Update patch to match new file structure.
* Removed SD driver to be consistent with other MT7621 targets.
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49213 3c298f89-4303-0410-b956-a3cf2f4a3e73
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 4e6e507..d287002 100755 index 4e6e507..453af2c 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network --- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -147,7 +147,8 @@ ramips_setup_interfaces() @@ -128,6 +128,7 @@ ramips_setup_interfaces()
wt1520 | \ ;;
xiaomi-miwifi-mini |\
y1|\ 3g-6200n | \
- zbt-wg2626) + ac1200pro | \
+ zbt-wg2626|\ ai-br100 | \
+ zbt-wg3526) dir-610-a1 | \
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" dir-300-b7 | \
ucidef_add_switch "switch0" "1" "1" @@ -365,6 +366,7 @@ ramips_setup_macs()
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t" wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+ ac1200pro | \
all0239-3g | \
carambola | \
freestation5 | \
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 37360a4..90e6561 100644 index 37360a4..7f93d3f 100644
--- a/target/linux/ramips/base-files/etc/diag.sh --- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -15,6 +15,10 @@ get_status_led() { @@ -12,6 +12,9 @@ get_status_led() {
3g150b | 3g300m | w150m)
status_led="tenda:blue:ap"
;;
+ ac1200pro)
+ status_led="ac1200pro:green:status"
+ ;;
ai-br100) ai-br100)
status_led="aigale:blue:wlan" status_led="aigale:blue:wlan"
;; ;;
+ zbt-wg2626|\
+ zbt-wg3526)
+ status_led="zbt:green:status"
+ ;;
ar670w)
status_led="ar670w:green:power"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 8dc05b0..8535785 100755 index 8dc05b0..090831e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh --- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -427,6 +427,9 @@ ramips_board_detect() { @@ -109,6 +109,9 @@ ramips_board_detect() {
*"Mediatek MT7628AN evaluation board") *"DCS-930L B1")
name="mt7628" name="dcs-930l-b1"
;; ;;
+ *"ZBT-WG3526") + *"Digineo AC1200 Pro")
+ name="zbt-wg3526" + name="ac1200pro"
+ ;; + ;;
*"MediaTek LinkIt Smart 7688") *"DIR-300 B1")
linkit="$(dd bs=1 skip=1024 count=12 if=/dev/mtd2 2> /dev/null)" name="dir-300-b1"
if [ "${linkit}" = "LINKITS7688D" ]; then ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index a3d0175..084e72a 100755 index a3d0175..8af8506 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -14,6 +14,7 @@ platform_check_image() { @@ -19,6 +19,7 @@ platform_check_image() {
[ "$#" -gt 1 ] && return 1
case "$board" in
+<<<<<<< HEAD
3g-6200n | \
3g-6200nl | \
3g150b | \ 3g150b | \
@@ -129,6 +130,8 @@ platform_check_image() { 3g300m | \
y1s |\ a5-v11 | \
zbt-wa05 |\ + ac1200pro | \
zbt-wg2626 |\ air3gii | \
+ zbt-wg3526 |\ ai-br100 |\
+ zbt-wr8305rt |\ all0239-3g | \
zte-q7) diff --git a/target/linux/ramips/dts/AC1200pro.dts b/target/linux/ramips/dts/AC1200pro.dts
[ "$magic" != "27051956" ] && {
echo "Invalid image type."
diff --git a/target/linux/ramips/dts/ZBT-WG3526.dts b/target/linux/ramips/dts/ZBT-WG3526.dts
new file mode 100644 new file mode 100644
index 0000000..b62471b index 0000000..18b60c6
--- /dev/null --- /dev/null
+++ b/target/linux/ramips/dts/ZBT-WG3526.dts +++ b/target/linux/ramips/dts/AC1200pro.dts
@@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
+/dts-v1/; +/dts-v1/;
+ +
@ -141,7 +121,7 @@ index 0000000..b62471b
+ +
+ partition@50000 { + partition@50000 {
+ label = "firmware"; + label = "firmware";
+ reg = <0x50000 0xfb0000>; + reg = <0x50000 0x1fb0000>;
+ }; + };
+ +
+ }; + };
@ -201,7 +181,7 @@ index 0000000..b62471b
+ compatible = "gpio-leds"; + compatible = "gpio-leds";
+ +
+ status { + status {
+ label = "zbt-wg3526:green:status"; + label = "ac1200pro:green:status";
+ gpios = <&gpio0 24 1>; + gpios = <&gpio0 24 1>;
+ }; + };
+ }; + };
@ -216,15 +196,24 @@ index 0000000..b62471b
+ }; + };
+}; +};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index c4f4028..80c2d8e 100644 index c4f4028..e28dcf3 100644
--- a/target/linux/ramips/image/Makefile --- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile
@@ -616,7 +616,7 @@ Image/Build/Profile/WCR150GN=$(call BuildFirmware/Default4M/$(1),$(1),wcr150gn,W
buffalo_whrg300n_mtd_size=3801088
define BuildFirmware/WHRG300N/squashfs
$(call BuildFirmware/Default4M/$(1),$(1),whr-g300n,WHR-G300N)
- # the following line has a bad argument 3 ... the old Makefile was already broken
+ # the following line has a bad argument 3 ... the old Makefile was already broken
$(call BuildFirmware/Buffalo,$(1),whr-g300n,whr-g300n)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
@@ -956,7 +956,7 @@ endif @@ -956,7 +956,7 @@ endif
# #
ifeq ($(SUBTARGET),mt7621) ifeq ($(SUBTARGET),mt7621)
- TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 zbt-wg2626 - TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 zbt-wg2626
+ TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 zbt-wg2626 zbt-wg3526 + TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 zbt-wg2626 ac1200pro
endif endif
define Device/mt7621 define Device/mt7621
@ -232,17 +221,17 @@ index c4f4028..80c2d8e 100644
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
endef endef
+define Device/zbt-wg3526 +define Device/ac1200pro
+ DTS := ZBT-WG3526 + DTS := AC1200pro
+ IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGE_SIZE := $(ralink_default_fw_size_32M)
+endef +endef
+TARGET_DEVICES += zbt-wg3526 +TARGET_DEVICES += ac1200pro
+ +
# #
# MT7628 Profiles # MT7628 Profiles
# #
diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk
index cf9beff..0a8fe0c 100644 index cf9beff..53b100c 100644
--- a/target/linux/ramips/mt7621/profiles/zbt.mk --- a/target/linux/ramips/mt7621/profiles/zbt.mk
+++ b/target/linux/ramips/mt7621/profiles/zbt.mk +++ b/target/linux/ramips/mt7621/profiles/zbt.mk
@@ -17,3 +17,16 @@ define Profile/ZBT-WG2626/Description @@ -17,3 +17,16 @@ define Profile/ZBT-WG2626/Description
@ -251,14 +240,14 @@ index cf9beff..0a8fe0c 100644
$(eval $(call Profile,ZBT-WG2626)) $(eval $(call Profile,ZBT-WG2626))
+ +
+ +
+define Profile/ZBT-WG3526 +define Profile/ac1200pro
+ NAME:=ZBT-WG3526 Device + NAME:=Digineo AC1200 Pro
+ PACKAGES:=\ + PACKAGES:=\
+ kmod-usb-core kmod-usb3 \ + kmod-usb-core kmod-usb3 \
+ kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci + kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci
+endef +endef
+ +
+define Profile/ZBT-WG3526/Description +define Profile/ac1200pro/Description
+ Package set for ZBT-WG3526 device + Package set for ac1200pro device
+endef +endef
+$(eval $(call Profile,ZBT-WG3526)) +$(eval $(call Profile,ac1200pro))

View File

@ -3,8 +3,6 @@
$(eval $(call GluonProfile,Default)) $(eval $(call GluonProfile,Default))
$(eval $(call GluonModel,Default,dir-860l-b1,d-link-dir-860l-b1)) $(eval $(call GluonModel,Default,dir-860l-b1,d-link-dir-860l-b1))
ifneq ($(BROKEN),) $(eval $(call GluonProfile,AC1200pro))
$(eval $(call GluonProfile,ZBT-WG3526)) # BROKEN: hangs during reboot (http://lists.infradead.org/pipermail/linux-mtd/2016-November/070368.html) $(eval $(call GluonProfileFactorySuffix,AC1200pro))
$(eval $(call GluonProfileFactorySuffix,ZBT-WG3526)) $(eval $(call GluonModel,AC1200pro,ac1200pro,digineo-ac1200pro))
$(eval $(call GluonModel,ZBT-WG3526,zbt-wg3526,zbt-wg3526))
endif