From patchwork Thu Apr 14 10:39:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1617145 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=jy4ysCJJ; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=NdQ1KdNm; 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 4KfGHm2rMJz9sFr for ; Thu, 14 Apr 2022 20:42:27 +1000 (AEST) 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=WMaCY3DBoSZayEu+29I6Btnm7jbZKNr15FZ5p9P2LuM=; b=jy4ysCJJ2Ex6Sn 0M93hjoWP4nSOD5GMs7L3ds5ecLIaQQtpKC4V/BCWIp5gPS7pWnyHEgajbRkjNptorIyQuykwnt2s 794q/D18/Qt7vVvOlsgD7Vy1cCIJjHPCxh3bkqKmmpIrb8S04N1G9MFB1R34SgKdYl3u+xkTJ39x6 9vTOEoWWXc85RQe89rFRCEW4FymxpfEc+kOSz//cFJO9ZwnhsOdGDXfFd1+CAzx61PSN63TKHxgyL Te69dQnUwWMbxGDaJk8iMWrAeAQVKWPjqJpeqhgfLH4vpO99OWYiAI+UGyAWvSc04LCZshIwddZ4e yfx36b5FTafTVa71NBIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtm-0059zJ-GR; Thu, 14 Apr 2022 10:40:26 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtL-0059v2-Cz for openwrt-devel@lists.openwrt.org; Thu, 14 Apr 2022 10:40:02 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id BDEFF60140; Thu, 14 Apr 2022 12:39:45 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.4.0 vps.slashdirt.org BDEFF60140 Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org BDEFF60140 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1649932785; bh=7Yugd9Y/GNeVWwYuhnVoj9n7SRp/LeTdIPiYDiqFRzE=; h=From:To:Cc:Subject:Date:From; b=NdQ1KdNmaShZQklzQa43D6jDqAu4ofUyAXLkNqyW17heCzRXiJUV7OXsTeheTM4Cu wimgObquRDrJsk+WVq0UmNgWF+4svVkIK393w1qPUvqqNoCosRFCnkm+1cZIq5008R oKJsBekQ7Z0Wqu/ZgR+can+V/BqVQj4Caob8WyHg= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= Subject: [PATCH 1/3] ath79: add support for Yuncore XD3200 Date: Thu, 14 Apr 2022 12:39:03 +0200 Message-Id: <20220414103905.6929-1-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_033959_634340_51C7C201 X-CRM114-Status: GOOD ( 15.55 ) X-Spam-Score: 0.2 (/) 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: Specification: - QCA9563 (775MHz), 128MB RAM, 16MB SPI NOR - 2T2R 802.11b/g/n 2.4GHz - 2T2R 802.11n/ac 5GHz - 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port) LED for 5 GHz WLAN is currently not supported as it is connected directly to the QCA9882 radio chip. Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 Specification: - QCA9563 (775MHz), 128MB RAM, 16MB SPI NOR - 2T2R 802.11b/g/n 2.4GHz - 2T2R 802.11n/ac 5GHz - 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port) LED for 5 GHz WLAN is currently not supported as it is connected directly to the QCA9882 radio chip. Flash instructions: If your device comes with generic QSDK based firmware, you can login over telnet (login: root, empty password, default IP: 192.168.188.253), issue first (important!) 'fw_setenv' command and then perform regular upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download image to the device, SSH server is not available): fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000" sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin In case your device runs firmware with YunCore custom GUI, you can use U-Boot recovery mode: 1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with 'tftp' image renamed to 'upgrade.bin' 2. Power the device with reset button pressed and release it after 5-7 seconds, recovery mode should start downloading image from server (unfortunately, there is no visible indication that recovery got enabled - in case of problems check TFTP server logs) Signed-off-by: Thibaut VARÈNE --- package/boot/uboot-envtools/files/ath79 | 1 + .../ath79/dts/qca9563_yuncore_xd3200.dts | 32 +++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 3 +- .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 +- target/linux/ath79/image/generic.mk | 11 +++++++ 6 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 target/linux/ath79/dts/qca9563_yuncore_xd3200.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 230f2fe417..ace5cab30f 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -69,6 +69,7 @@ samsung,wam250|\ ubnt,nanostation-m|\ yuncore,a770|\ yuncore,a782|\ +yuncore,xd3200|\ yuncore,xd4200|\ ziking,cpe46b|\ zyxel,nbg6616) diff --git a/target/linux/ath79/dts/qca9563_yuncore_xd3200.dts b/target/linux/ath79/dts/qca9563_yuncore_xd3200.dts new file mode 100644 index 0000000000..5c87752585 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_yuncore_xd3200.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_yuncore_xd4200.dtsi" + +/ { + compatible = "yuncore,xd3200", "qca,qca9563"; + model = "YunCore XD3200"; + + aliases { + label-mac-device = ð0; + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "green:system"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 2ce489b0d1..d4c3697649 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -246,7 +246,8 @@ glinet,gl-x750) hak5,lan-turtle) ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1" ;; -joyit,jt-or750i) +joyit,jt-or750i|\ +yuncore,xd3200) ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0" ;; meraki,mr12|\ diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index bc32081910..004e854c05 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -365,6 +365,7 @@ ath79_setup_interfaces() ubnt,nanobeam-ac-gen2|\ ubnt,nanostation-ac|\ yuncore,a782|\ + yuncore,xd3200|\ yuncore,xd4200) ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:wan" diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index b8e99a661f..005ab10d88 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -46,7 +46,8 @@ case "$FIRMWARE" in ubnt,powerbeam-5ac-gen2|\ ubnt,rocket-5ac-lite|\ ubnt,unifiac-pro|\ - yuncore,a770) + yuncore,a770|\ + yuncore,xd3200) caldata_extract "art" 0x5000 0x844 ;; avm,fritz1750e|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 769c0ee1da..33a72358b3 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2528,6 +2528,17 @@ define Device/yuncore_a782 endef TARGET_DEVICES += yuncore_a782 +define Device/yuncore_xd3200 + SOC := qca9563 + DEVICE_VENDOR := YunCore + DEVICE_MODEL := XD3200 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 16000k + IMAGES += tftp.bin + IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m +endef +TARGET_DEVICES += yuncore_xd3200 + define Device/yuncore_xd4200 SOC := qca9563 DEVICE_VENDOR := YunCore From patchwork Thu Apr 14 10:39:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1617144 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=EQWl/5n8; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=lA3nanVY; 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 4KfGHp3TWPz9sFx for ; Thu, 14 Apr 2022 20:42:30 +1000 (AEST) 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:References:In-Reply-To: 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: List-Owner; bh=r9rzlB9qg6RD9eXdMCiWDy7iYTKEVpYr1dzlevGJ7BM=; b=EQWl/5n8cOtlck I0wBY/GFjHK3EAxqiJZCn+QTjmMLzPqVmLRMpmfdgOE/JT+Jg6FJNPRng4SxKYhOpvEpnXx+mS8Sc 9QrjnmQbVmcTR6xZWrqbtlOY5R60vChr+6M7yCM3RBHsz3/LCSuYC2gIEE7aeRmCh7TpviWDySF5n bArwo4oXq4NB0+LzGuJEhh0eAzCESjbQ4l6gjImGAazPr9AjLX3b1ehftMSKG76DcaKk69pcasnze suk3oNAt1k3nWlb5sJY2/Nq7iXM0xZlPE7Hi3MR3ZK8Azl7tYko0OoxIjpHSlKKsi8gl/y0hHNuba 9SYvHD4OwaOf+50cevKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtP-0059wq-4T; Thu, 14 Apr 2022 10:40:03 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtL-0059v0-0E for openwrt-devel@lists.openwrt.org; Thu, 14 Apr 2022 10:40:00 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 1C8BC602AE; Thu, 14 Apr 2022 12:39:46 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.4.0 vps.slashdirt.org 1C8BC602AE Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 1C8BC602AE DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1649932786; bh=q/X2iYCIOhsMclZRN2nvpM+wooC1IS79QYI+ntoMZFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lA3nanVYnvESiRbyY8jqonffivR6em9DewuIelWXiFyZPftusOtCLF/9j7f8x/fHW Mrj4HOXih+x3RHyCoBgGSSilluohuxFrl4IWvZuCXOUoYGuDHjhIshxfNPA9ucdxZe 1I+tBg/QD3WmCDQjuIxL/o+GqBdUbmZybQ3jFoKo= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , Clemens Hopfer Subject: [PATCH 2/3] mac80211 adjust QCA9561 PA bias Date: Thu, 14 Apr 2022 12:39:04 +0200 Message-Id: <20220414103905.6929-2-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20220414103905.6929-1-hacks@slashdirt.org> References: <20220414103905.6929-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_033959_519598_9F9E0405 X-CRM114-Status: GOOD ( 11.90 ) X-Spam-Score: 0.2 (/) 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: ath9k is setting the TX PA DC bias level different on QCA9561 and QCA9565 although they have the same radio IP-core, which results in a very low output power and very low throughput as devices are fur [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 ath9k is setting the TX PA DC bias level different on QCA9561 and QCA9565 although they have the same radio IP-core, which results in a very low output power and very low throughput as devices are further away from the AP (compared to other 2.4GHz APs.) In real life testing, without this patch the 2.4GHz throughput on Yuncore XD3200 is around 10Mbps sitting close to the AP, and close to theoretical maximum with the patch applied. Signed-off-by: Clemens Hopfer [edit commit message] Signed-off-by: Thibaut VARÈNE --- .../580-ath9k_ar9561_xpa_bias_level_top.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 package/kernel/mac80211/patches/ath9k/580-ath9k_ar9561_xpa_bias_level_top.patch diff --git a/package/kernel/mac80211/patches/ath9k/580-ath9k_ar9561_xpa_bias_level_top.patch b/package/kernel/mac80211/patches/ath9k/580-ath9k_ar9561_xpa_bias_level_top.patch new file mode 100644 index 0000000000..25db3ab5ba --- /dev/null +++ b/package/kernel/mac80211/patches/ath9k/580-ath9k_ar9561_xpa_bias_level_top.patch @@ -0,0 +1,18 @@ +--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c ++++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +@@ -3604,10 +3604,13 @@ static void ar9003_hw_xpa_bias_level_app + { + int bias = ar9003_modal_header(ah, is2ghz)->xpaBiasLvl; + ++ ++ + if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah) || +- AR_SREV_9531(ah) || AR_SREV_9561(ah)) ++ AR_SREV_9531(ah)) + REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias); +- else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah)) ++ else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah) || ++ AR_SREV_9561(ah)) + REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); + else { + REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); From patchwork Thu Apr 14 10:39:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1617146 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=a/dzDT8V; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=GF2DScnH; 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 4KfGHq2Rx0z9sG3 for ; Thu, 14 Apr 2022 20:42:31 +1000 (AEST) 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:References:In-Reply-To: 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: List-Owner; bh=h0mcEQT5M2rGY9sx3TNYpzvjYO+HAbiQa2tywv3+Og8=; b=a/dzDT8V8pr1sl xj4dzkH8QOnVlCazSDIaGtUn8u2mFZYugmlE/nYnBo79sRFUggvwVzd6AoGtEIyJC0856Q+fvtNrw V1BOZr5YrrYelPEKcjyDyWSC3GTW4VlAxghsdENNMlwZI3nEdn4qSUeogKyy8puMzTAqpGcPjpBRf OZWMwtoEqeGd6Ulw1hpGy5MaOloPsMGCdDiI+ZR8gkF7nINj49uUxuYuQBHRrDYSN/8yJ2uLflM42 M9Hk9yHBWgU+yqlmRjAz9PELWYLeMl8zqvqxGM5aCAkIed0mFw6Fvq91qypcgsIKVSN5UL2GOG77R vTD0jRnfijS6EAfDrKpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1newta-0059xd-JM; Thu, 14 Apr 2022 10:40:14 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtL-0059v1-16 for openwrt-devel@lists.openwrt.org; Thu, 14 Apr 2022 10:40:01 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 8F4FF602B5; Thu, 14 Apr 2022 12:39:46 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.4.0 vps.slashdirt.org 8F4FF602B5 Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 8F4FF602B5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1649932786; bh=6G7ILR+rJ5+XQf5XMGuH4Yw8JLER5mGDH/3HCiwLXfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GF2DScnHOSyjasB3aLNtlbK/WTXoXgVa/Hc7ha4YnSw9Hf+zHuKvOgD9EOGpIMQ5F UlgzjqZM95tGV9cGsfeihFrudauq9VKnE5SJooUXCpldHoHR6I4MyeYnTLSMcqVWZh nPpa+wh9rUFU8KhNJgqGqqjuciUHeFaX7m1UQ0ic= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , Clemens Hopfer Subject: [PATCH 3/3] ath79: add support for Yuncore A930 Date: Thu, 14 Apr 2022 12:39:05 +0200 Message-Id: <20220414103905.6929-3-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20220414103905.6929-1-hacks@slashdirt.org> References: <20220414103905.6929-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_033959_522870_97313688 X-CRM114-Status: GOOD ( 14.95 ) X-Spam-Score: 0.2 (/) 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: Specification: - QCA9533 (650 MHz), 64 or 128MB RAM, 16MB SPI NOR - 2x 10/100 Mbps Ethernet, with 802.3at PoE support (WAN) - 2T2R 802.11b/g/n 2.4GHz Flash instructions: Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 Specification: - QCA9533 (650 MHz), 64 or 128MB RAM, 16MB SPI NOR - 2x 10/100 Mbps Ethernet, with 802.3at PoE support (WAN) - 2T2R 802.11b/g/n 2.4GHz Flash instructions: If your device comes with generic QSDK based firmware, you can login over telnet (login: root, empty password, default IP: 192.168.188.253), issue first (important!) 'fw_setenv' command and then perform regular upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download image to the device, SSH server is not available): fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000" sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin In case your device runs firmware with YunCore custom GUI, you can use U-Boot recovery mode: 1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with 'tftp' image renamed to 'upgrade.bin' 2. Power the device with reset button pressed and release it after 5-7 seconds, recovery mode should start downloading image from server (unfortunately, there is no visible indication that recovery got enabled - in case of problems check TFTP server logs) Signed-off-by: Clemens Hopfer Signed-off-by: Thibaut VARÈNE --- package/boot/uboot-envtools/files/ath79 | 1 + .../linux/ath79/dts/qca9533_yuncore_a930.dts | 118 ++++++++++++++++++ target/linux/ath79/image/generic.mk | 10 ++ 3 files changed, 129 insertions(+) create mode 100644 target/linux/ath79/dts/qca9533_yuncore_a930.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index ace5cab30f..c69a7c292c 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -69,6 +69,7 @@ samsung,wam250|\ ubnt,nanostation-m|\ yuncore,a770|\ yuncore,a782|\ +yuncore,a930|\ yuncore,xd3200|\ yuncore,xd4200|\ ziking,cpe46b|\ diff --git a/target/linux/ath79/dts/qca9533_yuncore_a930.dts b/target/linux/ath79/dts/qca9533_yuncore_a930.dts new file mode 100644 index 0000000000..089eebaa9c --- /dev/null +++ b/target/linux/ath79/dts/qca9533_yuncore_a930.dts @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include +#include + +/ { + compatible = "yuncore,a930", "qca,qca9533"; + model = "YunCore A930"; + + aliases { + label-mac-device = ð1; + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "green:system"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +ð1 { + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 33a72358b3..dc85fb60bf 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2528,6 +2528,16 @@ define Device/yuncore_a782 endef TARGET_DEVICES += yuncore_a782 +define Device/yuncore_a930 + SOC := qca9533 + DEVICE_VENDOR := YunCore + DEVICE_MODEL := A930 + IMAGE_SIZE := 16000k + IMAGES += tftp.bin + IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m +endef +TARGET_DEVICES += yuncore_a930 + define Device/yuncore_xd3200 SOC := qca9563 DEVICE_VENDOR := YunCore