From patchwork Sat Jun 11 11:48:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642362 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=IM8woP01; 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=z+t5Qof3; 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 4LKx520k7Vz9sFw for ; Sat, 11 Jun 2022 21:51:49 +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=Xe34zV6xpKAgcNpsdxOLPwYpCY0OgZRZhdUpotnm3+I=; b=IM8woP01+Z6Ndh CgBWbJGnbOet2zO71p7pC3np10+OsuXAiDUvQULAk83Cr33gQjtkdV7zMuOzkwVQ+Jj/K2GDBRstY uaN4SnaZrEea+pdYAeqFHpOcBP2c3wBpl6H7JnpXCTDihbDN1VSyBzslU9miCwOw6LQkjZd2CEPhB Wr0au8v8hFsA9gGSq7ZLDdFCLJR2du8WmbV6mqjNv5X4V89TeKGEhSSDKGES1Lt2AF1tZEuWQ9HlR mpZHIUqCURDuH5bEnVQakudxHQ91syuLuTYv5wwdISh3zX38X3VJSY9JnAibq5bdYpVj4l0JgNQwq R4ckLrQxle9WM4mQWsVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzcr-00ClOU-Co; Sat, 11 Jun 2022 11:49:57 +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 1nzzcA-00ClC6-8D for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:17 +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 800A12E6347; Sat, 11 Jun 2022 13:49:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948145; 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=rzJ6eQ3+Em//yswm7L0aFkTh+/iOdijwPUkUCtArmlI=; b=z+t5Qof3EZqhRK5E8HGUcGF28qCexIXW34BiN3lvTQs2yEeQwPFMHEYTEPM/SJNoDPOAXd cIDMiOqTLonIqJhYud9GuziQ9G/F7f1MSPzWALCkh/3cazy9PydAh54gwLvTfwOajKu7PZ 23NXuxVmvUve52h/iDHtCpWZuGOLR10X0KGOLSdY2bor5+UhJGa14xkNHgbv/kQrgwPNtg YEez5dVF43YCXmgX7/ZgCAHEkEYLQSokaPHQUjKDE+XRz5QIYoXCLb09bFsoYwYIcidRUv 291TcOD7ygbTstVfokZIk/3gHCuWQJigZXDcQgq0daEzWdMGfW+YLxmiRjRKyw== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI Date: Sat, 11 Jun 2022 13:48:50 +0200 Message-Id: <20220611114855.84000-2-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044915_098282_F0BC9F07 X-CRM114-Status: UNSURE ( 6.99 ) 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: The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can reference the sa [...] 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 The art partition containing the radio calibration data is in the same location for all supported devices. Move the definition to the base file so the reference from the wmac node can reference the same file. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts | 6 ------ target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts | 6 ------ target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts | 6 ------ target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts | 6 ------ target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 6 ++++++ 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts index 622f4410b33f..039007942631 100644 --- a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts +++ b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts @@ -51,12 +51,6 @@ reg = <0xf50000 0xa0000>; read-only; }; - - art: partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - read-only; - }; }; &mdio0 { diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts index 7549c0a6970d..0593fd29f418 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts @@ -51,12 +51,6 @@ reg = <0xf50000 0xa0000>; read-only; }; - - art: partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - read-only; - }; }; &mdio0 { diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts index f5a350b33fd0..4a13f639d173 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts @@ -63,12 +63,6 @@ reg = <0xfe0000 0x010000>; read-only; }; - - art: partition@ff0000 { - label = "art"; - reg = <0xff0000 0x010000>; - read-only; - }; }; &mdio0 { 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 55ac061a56c8..1ecc987a4f2c 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts @@ -51,12 +51,6 @@ reg = <0xf60000 0x90000>; read-only; }; - - art: partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - read-only; - }; }; &mdio0 { diff --git a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi index 1047dfddeb14..21fde53cc867 100644 --- a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi +++ b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi @@ -41,6 +41,12 @@ reg = <0x60000 0x10000>; read-only; }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + read-only; + }; }; }; }; From patchwork Sat Jun 11 11:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642360 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=t30j7m3/; 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=6qrpMXtf; 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 4LKx534y3rz9sGF for ; Sat, 11 Jun 2022 21:51:47 +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=tJ/QIVefzmhmIiQMIsw1m+qOPruBjI+x03IZenfN3JE=; b=t30j7m3/VxRcIu DZMokwuOVCTt/a3YB0ySoTC+p794U9RNWp74sU66UoWEqgASMH1WnyfR6mnLDBfL6H4KWri6IldWH pvRsizZETqli+8yh8jCqwkrM8BvTbLKWHFUqfcjx5oj3Dvdd1nmy8CGxLp7RGphDsmAsFkovxWLnB y4U0xtT6CHr4YaB64HT4+2GHXtlKLQ/PTcrbey1aHPY04v3J8DntFvtNiCj7jQQ1XXWGPi6r+wgfM MfLaPbDHdj5TUm7a9T2en5wZKmGRAhGJMaOumXulBVnPt19k+kkGCajUq15e7YQvBPJoUxIuktyP6 m/+T0+ZwDxxcdS64hYjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzcR-00ClH5-0c; Sat, 11 Jun 2022 11:49:31 +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 1nzzcA-00ClC7-8C for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:16 +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 16C502E6348; Sat, 11 Jun 2022 13:49:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948146; 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=EfeOkZAbZr6q1Ll1aQIfDK6pKx9zoE6+0J3DeH/d4pY=; b=6qrpMXtfH1ECw38QJpCunYo+AgjZtg19RXoMKR2ivheLCyNoLej183Wp8xUFdA8IPeJB/L Z7K9DglNz7Xho1TLxSlH1qLYTyUM4sdd9NcZHDS8isyk7CEqkKLUT8CW5Z3oCBQd4Z0GQm 7rDKYPMmlfELUllG6lCRAEmZx+8rOS5MZLcdtXBdp4QTLndNwxETVkQRsWwr9RxzjVCjOL +ZGsPaVfrTIkqsBbaMbyzHbmeohSZoiQTOnEYG5Tu4R9DhEHy84QrLQ357C5yhmFiIj6vC cNO9PCQpA0gS4gBoZsSBYRaZUG66H7ZuytduuQfUCnV9GRJ45DpfKOREop3rFg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem Date: Sat, 11 Jun 2022 13:48:51 +0200 Message-Id: <20220611114855.84000-3-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044915_104392_66612731 X-CRM114-Status: UNSURE ( 6.43 ) 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: Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 13 ++++++++++++- 1 file changed, 12 [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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 -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] 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 Convert the calibration data reference for the ath9k radio to an nvmem-cell, replacing the downstream mtd-cal-data property. Cc: Sebastian Schaper Signed-off-by: Sander Vanheule --- target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi index 21fde53cc867..46eda3789f48 100644 --- a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi +++ b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi @@ -54,5 +54,16 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&cal_ath9k>; + nvmem-cell-names = "calibration"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_ath9k: calibration@1000 { + reg = <0x1000 0x440>; + }; }; From patchwork Sat Jun 11 11:48:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642364 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=ugHCe8Gd; 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=D39aCuQL; 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 4LKx5C2QSKz9sFw for ; Sat, 11 Jun 2022 21:51:59 +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=aK42A+pSsN/4sZ6tN/hnEFbIYFlBXGqJwICZK+809Yc=; b=ugHCe8GdtRp7dk M6iOgZxMA+eMf1+wv9v2hhhTI9Ea/NhnPYZ1TcecH1w1wEcnrkRdDwkF1c9PI64aXSQISxVJScpY2 XQmHRE5qiVSUCoEyoLzscj1ZNiiuNOPUyMd3TIYXvCHtK8RE3mB1xQ/d3TA8KjqUG4MTUJ4n28iIB 4k/Mp+hYLVQcFjT+aIWRcZj3hdJN2o7pNwz3Kj9VrQOQupd654TXeQGQli0kY0QsKL0pTLj0uKK5I JuFEEpFrOutjilHteegmYTsAwpWqVfbB2YhA+dtbaoMXFBsBrEFn0PrJoua+Q6fMfUwTgNc3Fzr8o u0Pa+ZjlBal7UqBEjuOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzd7-00ClUe-DB; Sat, 11 Jun 2022 11:50:13 +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 1nzzcA-00ClC8-8E for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:17 +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 95D402E6349; Sat, 11 Jun 2022 13:49:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948146; 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=VrofmKoT3XvbAA4ccCNXOo7BEvHp3KEMM3HJa/s/rgA=; b=D39aCuQLtOgwQQ+vg8gU9Y+RnGfxcVnHqAJN71E0VSB+ihucVfYLyKLDzNcPxSwpSMwbZT 1JrlOszRoW9xtDgE/jywCleKn3JLGYyaVJOnQq4f4jsfiSkSyNdbHrqf/ipkkNSIxXqA6i 2RwUsJ6nkGGCYZRj37+NYcGRHKiNCy8OtGrSDP4onbxpxtrYdwKhE7BKO8noxn5uoTvrQf iz9MIvUolJCTpeaCuUP65dTKDVHHfC9ClBfcSTxHANkL7URi4aeaS+gPvwzmFHUGck56L5 9SZNYoSAd0i0J0yta53KiGWvgHQ0EVZoAU9Tcz/UTrU80Z01OxVIG9s4+YYHCg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem Date: Sat, 11 Jun 2022 13:48:52 +0200 Message-Id: <20220611114855.84000-4-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044915_107864_1874B9E3 X-CRM114-Status: UNSURE ( 8.56 ) 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-2680-a1.dts | 14 ++++++++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 ------ .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 7 ++++++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts index 0593fd29f418..09503da52b60 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts @@ -79,4 +79,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 0x2f20>; + }; }; 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 668fd76af3a4..74a625ca840c 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 @@ -199,12 +199,6 @@ case "$FIRMWARE" in /lib/firmware/ath10k/QCA9888/hw2.0/board.bin rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin ;; - dlink,dap-2680-a1) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; dlink,dir-842-c1|\ dlink,dir-842-c2|\ dlink,dir-842-c3) 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 a4f82c54e271..d5a2471a99a9 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 @@ -27,12 +27,17 @@ case "$board" in mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; dlink,dap-2660-a1|\ - dlink,dap-2680-a1|\ dlink,dap-2695-a1|\ dlink,dap-3662-a1) [ "$PHYNBR" -eq 1 ] && \ mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; + dlink,dap-2680-a1) + [ "$PHYNBR" -eq 0 ] && \ + mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" -eq 1 ] && \ + mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress + ;; iodata,wn-ac1600dgr) # There is no eeprom data for 5 GHz wlan in "art" partition # which would allow to patch the macaddress From patchwork Sat Jun 11 11:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642361 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=eMula9gf; 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=NpForutw; 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 4LKx5302zXz9sGC for ; Sat, 11 Jun 2022 21:51:50 +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=phGPL6bCb9Y/ISJv3AttEO+A0VL6C4H1W39A53lFR50=; b=eMula9gf5y96WQ RnDg+OglqlFu1MVcdjfLxKj4WXOGqeUho6hjTGeiLr1rg0PxbKUPSUPsdjef94jh1XzWyXjHq6WJ4 jaJWr6OSoD7rIy+CyBnGVy04t/XOg42w+bX3xKFnhWjHi3ubmEouo+X5qbtt8W1GwIITtBVSHowEF IQx/btounCtYqxa1LJSfE6fF0F8monrHHKeOrGL7sqEJ7M8qUu/ijdz5Y7PUmqC3L8SZFvBKb42mb 7FaYFINkohc6XNM2/lhxFh08/Poir7ACvUZLCXXboltkj5QAmtIZ5+PzXQ8lTOhgDfkgGNeoaBGrt Wm/glCFetQEBQ9c2vfVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzce-00ClKL-3y; Sat, 11 Jun 2022 11:49:44 +0000 Received: from polaris.svanheule.net ([84.16.241.116]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzcA-00ClCF-7u for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:17 +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 097012E634A; Sat, 11 Jun 2022 13:49:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948147; 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=Lq+WEzUo5o6dfO4gr3M8+fRI7rDI/Skca5dwkyiXakk=; b=NpForutwalovkX0qSSokS3r9tRenXRPYBfvoLF0LLFAEm3g1iLRQrBTpG3MnLGYwDj/PCD IbOzpKionar+76zmIByn4WujHGoFfOLMyo4kWpA1aiyCRjNfGvUKiev/VZBVHrFiiUKamc dBxiNrMuUhOTJ6d2TTJ1zyRqH4gYtHHZn9tklbkNmY+LT/QAfyCDUUeWRaYJytz+qvW3bF 2L57gZXnOGDSemCZvjxl7Ky/Okr33qWyNZvHTuG8/gplHgg7vAWEzK63NGGPHe68mwYeTu X6oCW4eseNLkYmJWYzTM6tZImmRpvNFwGFzQMM7kmlzE15M6o4gC5J8RfT5lTg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem Date: Sat, 11 Jun 2022 13:48:53 +0200 Message-Id: <20220611114855.84000-5-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044915_122204_1FB4AE2B X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [84.16.241.116 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/qca9557_dlink_dap-2660-a1.dts | 14 ++++++++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts index 039007942631..93e2fc0d974d 100644 --- a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts +++ b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts @@ -79,4 +79,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 74a625ca840c..b27fbe415065 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,7 +67,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1) ;; - dlink,dap-2660-a1|\ dlink,dap-2695-a1|\ dlink,dap-3662-a1) caldata_extract "art" 0x5000 0x844 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 d5a2471a99a9..fbd5344a1e82 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,12 +26,12 @@ case "$board" in dlink,dap-3320-a1) mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; - dlink,dap-2660-a1|\ dlink,dap-2695-a1|\ dlink,dap-3662-a1) [ "$PHYNBR" -eq 1 ] && \ mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; + dlink,dap-2660-a1|\ dlink,dap-2680-a1) [ "$PHYNBR" -eq 0 ] && \ mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress From patchwork Sat Jun 11 11:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642365 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=jEodl3xs; 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=v+qx7Qcp; 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 4LKx660Wqqz9sFw for ; Sat, 11 Jun 2022 21:52:46 +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=aS3EyPDjL8G8tr0dPl/ZkDWDUFySP9no8NU/AXsocH8=; b=jEodl3xsNFDy+r whG3WctwUHSl9EDHDD8tknM+rxMzY90espCwYy02ow/Uv7ankTPXXjaAqyXnUsieQU/Rph1PsBzsb bLasP/Ur83FTEQioaHA14eXJTeCPw+5DxaPpUXXeX9izYJcZF8XCguyRpm5MoJ7cox3FohJt4aAoM 3qyj5+vYURnAx+ezNOokj1+XyNBf1kOo4v676Pswalr4FlOaaGkiaA8/qFsjSW5HaGX3Y9Fh/PMaQ 7LP1EW+ZfQm9SzfuyyqkofDlftUWr2x5s1qZKDhDPHyMYW2bPCx16UJPezB/0k2PBrIWS5JM0wvxe tbnXQifcqb3HPAaL0vGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzdR-00CldF-8e; Sat, 11 Jun 2022 11:50:33 +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 1nzzcD-00ClEj-OU for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:19 +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 6D25F2E634B; Sat, 11 Jun 2022 13:49:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948147; 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=+k0XjZQV4Mf9wl8rUX86xXsqDSJ0gDi2lh53V1seIR0=; b=v+qx7QcpHTzWVT81nryceHyG2KqNw88yFBd4tPjNQDAq/mPw7jzLiicpY6E1Q+r76bj7I4 m9fQmgKZ2ttheeJr3bb9okV+0SviaZauYdn6ii7Pe/5nWgdobcTN5WG6xNgHpn+sws7QfJ x4F+V+aLSSur0U6IqhFLLiH6dzCx4c92+QI6HMFiLdEFSlY6ugEBIGN9F91J8hBhyo+D+H imF6L+cATXwwKLydo8y93fpJv7tcda9/ialeRJoEMEMjjnmh71dUg+INEWdqbUG8Ios9+h UhUFefP075n/c/y+o3m0RchC3RRJjotXa/mE5/DCdDsgijSoNAXTWZE2Lff9qw== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem Date: Sat, 11 Jun 2022 13:48:54 +0200 Message-Id: <20220611114855.84000-6-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044917_975306_15AE6934 X-CRM114-Status: UNSURE ( 8.72 ) 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-2695-a1.dts | 14 ++++++++++++++ .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 - .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts index 4a13f639d173..e96ee79a98c2 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts @@ -106,4 +106,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 b27fbe415065..2223b8f33a95 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,7 +67,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1) ;; - dlink,dap-2695-a1|\ dlink,dap-3662-a1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) 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 fbd5344a1e82..fc74d3dd4a00 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,13 @@ case "$board" in dlink,dap-3320-a1) mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress ;; - dlink,dap-2695-a1|\ 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-2680-a1|\ + dlink,dap-2695-a1) [ "$PHYNBR" -eq 0 ] && \ mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress [ "$PHYNBR" -eq 1 ] && \ From patchwork Sat Jun 11 11:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1642366 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=YGHWHrvZ; 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=Yhi8i3bQ; 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 4LKx6F73Y5z9sFw for ; Sat, 11 Jun 2022 21:52:53 +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=YGHWHrvZHeSLDR q16Li3pfi+qlEVTNf3Xnl+dj+xmy4WmcBFfkMrCKzt3UkYZotwYNdK9ed88NfdGZg6lY9a3UNllCr sHfuSv+n4L1Ug5Ldlu2Rux5qxbStcrqbp57Kbku/Tn44yd+Ek9jbRj3R0bqL4YZApwuQ3+ix42Ar0 Knbt46RiK2x/VLzWmKXrd+y0gogKOn+lXdtnJUTsd+K4UPnUuHoSmLHDIm0rzWbNwUPqyWULaxLn0 R7ZCV1dffSdNWaHGBTcDVJ64Lzgrbyx9oF17y5/FmxHfQbnZ1GJ7EdwD6Dbis/vqJKNnO3oaJZbFQ srdOanHcne0qcib+FL7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzdw-00ClrS-Ne; Sat, 11 Jun 2022 11:51:05 +0000 Received: from polaris.svanheule.net ([84.16.241.116]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzzcD-00ClEl-Tj for openwrt-devel@lists.openwrt.org; Sat, 11 Jun 2022 11:49:19 +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 E431C2E634C; Sat, 11 Jun 2022 13:49:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1654948148; 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=Yhi8i3bQlJ+mSAXr0L5Uj2Qz3eE5hOCKJtpfyef/+96vP1wQ3Wq/zqtVorUfDlcX1COa3i CLvnz7qiWj2r1Bdb14nqkpQph0drijLpGoutLBGLm+WXeQ79kfqMIulGW7o++XjUy9zNXB VrYYt+s31DoCnEnEyiWTnt8DIlmn01L7sUjBTrTcGpDzSAeZ/5TEnzFAS9FDCti6sHO0b+ wxr23eOqHcnOF90H+KiEfP/6l6BB2iBwys9k/6nf+cRv8Ko6TudLDfMKz1NdPfhTpcqORv BKDhZ07ybSdl+Lb92W/A5U9e9RlXD/YYTOP4dmqb4s62ZUSxsIXoshoGiZAoqQ== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sebastian Schaper , Sander Vanheule Subject: [PATCH v1 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem Date: Sat, 11 Jun 2022 13:48:55 +0200 Message-Id: <20220611114855.84000-7-sander@svanheule.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611114855.84000-1-sander@svanheule.net> References: <20220611114855.84000-1-sander@svanheule.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_044918_135254_2E3644C6 X-CRM114-Status: UNSURE ( 8.01 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [84.16.241.116 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 ] && \