From patchwork Mon Feb 21 01:21:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Henrie X-Patchwork-Id: 1595295 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=m2fY+FCl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QQfb1GTG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K24Mw1WVHz9s09 for ; Mon, 21 Feb 2022 12:24:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=TlTuydgr9oBqyRcwpuUrBydRDz4jAiCzzEbhItcrPPg=; b=m2fY+FClTgz+54 +ndZaxRFsRmhy+WAyxJhivqQMnrVvrLS3ZLKkktqX9tT2iyWXKFE66waKHG/hcj/l2OYkq9Dwu/7J xjvQQGmCAm66uEuimNEtlN+5IyL0V0oWJSC5ojEamzeN+QOsSS3BybOEiUTFpTIr/kDRMcBiBd+Ao 4WfdnXxPuO01zuH2AVt2uD466mBrg3NFo90CGkbtQEOCbCP4no4L+EJZ36kU4tL23ETvxX3DvZW4e 1eeIRZVBWc798HnREggffiWHPblzT7xfjszjO41jRtOaanJYcHEdSFwK0KNhDayhoZ+CF5u5HIuGN bGM/GRjjC2npn9sxWtkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLxPE-002o9o-Ir; Mon, 21 Feb 2022 01:22:24 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLxPA-002o8m-RV for openwrt-devel@lists.openwrt.org; Mon, 21 Feb 2022 01:22:22 +0000 Received: by mail-pl1-x62b.google.com with SMTP id c3so1962151plh.9 for ; Sun, 20 Feb 2022 17:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HEp4R1z98NuLv3K0AK7O4Fcw2A3BPMP6+yY3kKWRPyw=; b=QQfb1GTGEXw9ZQ4Q9UEjRV/eKDfalbpmsf8I4KXitl4+poAAE9zeiWwV48M25dIeaR Mbkq5Pywst6I/o0lPYN6wa3/9XAmzH7dhwiNB/xFMw2UbXEmh9vS+HY4EN5oHbFhuX6m iZ4kw6vAvvZ2GnCe8EEagFKbGNevuOluxvJM0RxB/Tp8jGwbkwhrEiTQe3pLR6CQPD3q A6C5XeegpZOhA2IsxIWNZ29Hew/vUZ3Kbw/mJkxaNWbDit9dBP9TvJquSrZUJX0msBuC CvDrT6elpwZMny31Q0qQZoK8HfLVvTEQn2Rdi2M0TUv8ZkV/cOnsS1z5nf3YzFOs2ObA j9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HEp4R1z98NuLv3K0AK7O4Fcw2A3BPMP6+yY3kKWRPyw=; b=YBAxNzYddMF5ChKKMZ/IaiFtxV5ORYH6T44KPGZ2PSGmQvuhA5aIFKG1yae9jU4NIo Bq7i3aR7qW9N2PzvzhT57OmyktQX67IAQmBRdsqcLFeoG+/Ws7zIC0HihcL0EEf6N5C3 KoQ1+RgyviC309GkzpImubZWYq+e82XTEsqFkfAis6kwq5yQNV15ZR6/XiK+lAR5XW1u hkWbrZiILaTz58ZCJsAK1XKN2NccBfxskuQazr8JSfcHibAplmfbJbCym1wc5gfZrae6 DBEddKvEpY5svT1U/2gMgOygYEbcAZl9Du70qD69CWd9FqWGDEuNyNfQma12e7AxMts3 cvhw== X-Gm-Message-State: AOAM532CljgOMcPCcQTn/wis4mhv6y5IwlaBrKawiEqopEYxvom0fyMT ScmuBRHRzo+5QohJaRoUC9TqVWc79Dt9ug== X-Google-Smtp-Source: ABdhPJyPFyjg50u2dr4rNoRtXzEPCjiGv5hZ1LdsxarGq0poTRJAsB2xIGQMlDReGt9gNl9xW7SDQg== X-Received: by 2002:a17:90b:4a85:b0:1b9:d80d:bff with SMTP id lp5-20020a17090b4a8500b001b9d80d0bffmr23358288pjb.67.1645406537084; Sun, 20 Feb 2022 17:22:17 -0800 (PST) Received: from xavier.lan ([2001:470:b:114::cc1]) by smtp.gmail.com with ESMTPSA id on14sm5667142pjb.34.2022.02.20.17.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 17:22:16 -0800 (PST) From: Alex Henrie To: openwrt-devel@lists.openwrt.org, ynezz@true.cz, a.valentin@ddimension.net, lech.perczak@gmail.com Cc: Alex Henrie Subject: [PATCH v2] ath79: add Zyxel EMG2926-Q10A Date: Sun, 20 Feb 2022 18:21:38 -0700 Message-Id: <20220221012138.743800-1-alexhenrie24@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220220_172220_917041_CCE0E22E X-CRM114-Status: GOOD ( 14.12 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 NBG671 [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:62b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alexhenrie24[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [alexhenrie24[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 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 --- v2: Avoid duplication in nand.mk --- .../base-files/etc/hotplug.d/ieee80211/00-wifi-migration | 1 + target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts | 8 ++++++++ target/linux/ath79/image/nand.mk | 7 +++++++ target/linux/ath79/nand/base-files/etc/board.d/02_network | 1 + .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 1 + .../base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac | 1 + .../ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh | 1 + 7 files changed, 20 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration index d2df0533fe..35e7c4452c 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration @@ -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 index 0000000000..c00109a5b4 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts @@ -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"; +}; diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 2d7892db94..9f209368e4 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -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 diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network index e26a5e4ddf..2c6e676ae9 100644 --- a/target/linux/ath79/nand/base-files/etc/board.d/02_network +++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network @@ -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" diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index d47e296853..e5c26d6bb5 100644 --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -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) diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac index 730a5f9943..20974248c1 100644 --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -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 ] && \ diff --git a/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh index fdd8381f56..4e501496be 100644 --- a/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh @@ -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)