From patchwork Mon Jun 13 20:15:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642989 X-Patchwork-Delegate: sander@svanheule.net 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=QLCGTojj; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=G0vOygb+; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::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:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LMNNv0PF7z9s2R for ; Tue, 14 Jun 2022 06:25:35 +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=NUZ/BDI6wgV6p35/HXFBpUhfnlRYKNprwlXESDE7r2M=; b=QLCGTojjPT5sfY DoWS8sx9Sje+XYOQBmGMa59Ny4w0btGfd5IYkegu7DXrMleIK9cU3N1KSbrdp89BiJY7Lmgbt5JV9 Y+cxPrUyyOEoE1eu6eW0lXJ+Q71ULeYj3t0lmPHU3HUKwwRPUcmpO/rt9Zh+nmHxDrnE94dQWPAe0 IIvKQrNDkHTpJmniG7queFALw4v/ZKjyAP4cttRmGIHhWA9WdBx3iQbRdKi/ihtOBnNcDPnI7hx+Z R/XuOmbMaGQ/h1RE5K/M4Ws/iIgdUMuSROvZRE+uQQVQn6MAOT4lly4e/ncGKh+quDT1SDPIOisqG 7q0eUNb5g4UdoCK4Pz1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0qas-005bwU-3u; Mon, 13 Jun 2022 20:23:26 +0000 Received: from polaris.svanheule.net ([2a00:c98:2060:a004:1::200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0qTH-005YHd-JH for openwrt-devel@lists.openwrt.org; Mon, 13 Jun 2022 20:15:38 +0000 Received: from terra.. (unknown [IPv6:2a02:a03f:eaf9:8401:aa9f:5d01:1b2a:e3cd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 283EA2E833F; Mon, 13 Jun 2022 22:15:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655151333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a+erFdgnj6AKR08/K0u/hfiDlWCA5Qg3d+Spj1MunOE=; b=G0vOygb+TKMDJ1qHJUSrCelZVD7gkIHxumKktfhVWqcc6r1kEOgE/bNNovmJBZb1tHxgL4 xEnT9rZxyH4Rvy7EFNVJ8mPSVNI9J8M44a0wymDGT5sI1T8AbpLM4azc1OiOmz91Hgi2NR d61b+yIu8Jhbd9SL1ptzuiaGn5imAxEd/PLaIMErHI3pfHRuBzF7uIxzUdFR240j84fkJK jv765EIZdT8ON/BZd7mBT/IwgsG7K8DN40wxqYy2P1+JXoMlpFvIqFy6iko0F9Qy2JSzzr OU1OZfkcdVnG0i8jL8DVaXoX5gGIVIN7J6fnD0ccSntNDp6Ljq9syX+UGxgxPg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v2 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem Date: Mon, 13 Jun 2022 22:15:25 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_131535_868450_33AE1EC6 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) 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: Add the PCIe node for the ath10k radio to the devicetree, and refer to the art partition for the calibration data using nvmem-cells. MAC address assignment is moved to '10_fix_wifi_mac', so the device can then be removed from the caldata extraction script '11-ath10k-caldata'. Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a00:c98:2060:a004:1:0:0:200 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches 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 Add the PCIe node for the ath10k radio to the devicetree, and refer to the art partition for the calibration data using nvmem-cells. MAC address assignment is moved to '10_fix_wifi_mac', so the device can then be removed from the caldata extraction script '11-ath10k-caldata'. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- .../linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 14 ++++++++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 ---- .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 7 ++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts index 1ecc987a4f2c..27883f721cf5 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts @@ -93,4 +93,18 @@ &pcie0 { status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0 0 0 0 0>; + + nvmem-cells = <&cal_ath10k>; + nvmem-cell-names = "calibration"; + }; +}; + +&art { + cal_ath10k: calibration@5000 { + reg = <0x5000 0x844>; + }; }; 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 2223b8f33a95..55604c7562f2 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 @@ -67,10 +67,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1) ;; - dlink,dap-3662-a1) - caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) - ;; dlink,dir-859-a1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac") diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index fc74d3dd4a00..95ff6083c7f8 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -26,13 +26,10 @@ case "$board" in dlink,dap-3320-a1) mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; - dlink,dap-3662-a1) - [ "$PHYNBR" -eq 1 ] && \ - mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress - ;; dlink,dap-2660-a1|\ dlink,dap-2680-a1|\ - dlink,dap-2695-a1) + dlink,dap-2695-a1|\ + dlink,dap-3662-a1) [ "$PHYNBR" -eq 0 ] && \ mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress [ "$PHYNBR" -eq 1 ] && \