ath79: add Zyxel EMG2926-Q10A
authorAlex Henrie <alexhenrie24@gmail.com>
Mon, 21 Feb 2022 01:21:38 +0000 (18:21 -0700)
committerPetr Štetiar <ynezz@true.cz>
Sat, 26 Feb 2022 12:36:30 +0000 (13:36 +0100)
The Zyxel EMG2926-Q10A is 99% the Zyxel NBG6716, but the bootloader
expects a different product name when flashing over TFTP. Also, the
EMG2926-Q10A always has 128 MiB of NAND flash whereas the NBG6716
reportedly can have either 128 MiB or 256 MiB.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration
target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts [new file with mode: 0644]
target/linux/ath79/image/nand.mk
target/linux/ath79/nand/base-files/etc/board.d/02_network
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh

index d2df0533fe8a08f5debb03f1352040f318a930d5..35e7c4452c80de57e2f1c1a5e6b0f7c1417c7c3e 100644 (file)
@@ -16,6 +16,7 @@ migrate_wifi_path() {
                        case "$board" in
                                tplink,archer-c7-v1|\
                                tplink,archer-c7-v2|\
+                               zyxel,emg2926-q10a|\
                                zyxel,nbg6716)
                                        path="pci0000:00/0000:00:00.0"
                                        WIFI_PATH_CHANGED=1
diff --git a/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts b/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts
new file mode 100644 (file)
index 0000000..c00109a
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9558_zyxel_nbg6716.dts"
+
+/ {
+       compatible = "zyxel,emg2926-q10a", "zyxel,nbg6716", "qca,qca9558";
+       model = "ZyXEL EMG2926-Q10A";
+};
index 2d7892db94fbbc909a930abb11d628296c8b9630..9f209368e40cddfa4364d66fe54db303ab31973d 100644 (file)
@@ -344,3 +344,10 @@ define Device/zyxel_nbg6716
   UBINIZE_OPTS := -E 5
 endef
 TARGET_DEVICES += zyxel_nbg6716
+
+define Device/zyxel_emg2926_q10a
+  $(Device/zyxel_nbg6716)
+  DEVICE_MODEL := EMG2926-Q10A
+  RAS_BOARD := AAVK-EMG2926Q10A
+endef
+TARGET_DEVICES += zyxel_emg2926_q10a
index e26a5e4ddf2c2b1d618faad4cb452d9fa1f48ff1..2c6e676ae9d6063fe1112140447d0b63d2c4c39b 100644 (file)
@@ -49,6 +49,7 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "5:lan:1"
                ;;
+       zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
index d47e2968535788939de9606637d9e732a870ab79..e5c26d6bb5dc8f329fca167080f0a44b802e89a0 100644 (file)
@@ -21,6 +21,7 @@ case "$FIRMWARE" in
        netgear,r6100)
                caldata_extract "caldata" 0x5000 0x844
                ;;
+       zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
index 730a5f99431a362a98c919f8e6141a9188f363f4..20974248c16743aa614d1384a05ed6d701abb303 100644 (file)
@@ -15,6 +15,7 @@ case $board in
                [ "$PHYNBR" -eq 0 ] && \
                        macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress
                ;;
+       zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                # Set mac address for 2.4g device
                [ "$PHYNBR" -eq 1 ] && \
index fdd8381f562b210d46f727b06d68bcb81bf4c050..4e501496be7dd1744210e40796cc421e93dad291 100644 (file)
@@ -3,6 +3,7 @@
 
 preinit_set_mac_address() {
        case $(board_name) in
+       zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
                ip link set dev eth0 address $(macaddr_add $ethaddr 2)