From patchwork Sat Jun 18 08:55: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: 1644998 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=x0FZQ5rJ; 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=cM5SEbeo; 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 4LQ8vz0tNyz9s2R for ; Sat, 18 Jun 2022 18:58:39 +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=Wb4DnGaldxEBhua0VNW3U7DL3rppwlPDJz2+eYBTN5E=; b=x0FZQ5rJMZJ1th FBY4ufOEuvTlH8hhYJRm8vg91pxhxbFJETXrULkVMZ/VoI9iX1jJ4MYal2zarqUEp1miVKhCoixfs uPPDYJcGr4OEccZCHb4beHZ5CtRFcn4hDUKK8Lldi3eKx06ASdlrNAv9YqNQYJv4EyoAPC4TMBl0W WfwuoBwbxy3oGT0V+2QIO8KNuhcOXGWipQi1lj22nEh9+PxM4SwJevPnoqK044zFMB6ZSLwzFL8PP xjbgl0594KbDUVJ4I51dgew6I97j3WIst0oxRU4SBo6ctVsEJoTV8uxi3YDudDGSLJJJW58NfTIVi 4fZ1+oL68qmFMfPe93PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UGF-00Ansl-22; Sat, 18 Jun 2022 08:56:55 +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 1o2UFb-00AnlT-J8 for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56: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 A2F062EAAEC; Sat, 18 Jun 2022 10:56:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542572; 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=YLmAo6eoV5dCdtVXX10UxJYGoWTeeLS/Na1Hb09yano=; b=cM5SEbeoLNjijTj66+cD03hcTomeveI/eGx5hAxVLypg44ccOmkNtsjHknaD8GsnGfst87 upWqGy0PElDwwnYQrdZBP8uhOE93cIkFzcMNvWqu6po/JczFJmmkATonB4GQqg5jGDlZkh AR1BjrMMMJMVCqNBIrCIxfIabM12LrdmkTXQM8yJoA+Bw5jtXUf1DJ/ZU8JOPORhEwKK97 563MvJ1yyrJb3JExBopnp3BLZwvUBhLCitT+e0Dneo5+2euKy+pVJ7ZdR4bJQ0TGYJvE4Z 7CPD0HDXLO08xBNc0II0lQBtu+jKXBlzHbJ3T7FSkKTG0mJSiJb1Fu7biRlXGQ== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 1/6] ath79: D-Link DAP-2xxx (QCA955x): move art partition to DTSI Date: Sat, 18 Jun 2022 10:55:54 +0200 Message-Id: <66d20092806f51c4eb3295c3e25f967e252ee008.1655542439.git.sander@svanheule.net> 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-20220618_015615_835367_8B9AE45D X-CRM114-Status: UNSURE ( 7.44 ) 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: 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 refer to the sam [...] 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 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 refer to 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 99ff551adbb2..91df50fb45d9 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 18 08:55: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: 1644995 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=LHQ2YquP; 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=8oLJ9tzO; 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 4LQ8vp2vZPz9s2R for ; Sat, 18 Jun 2022 18:58: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=X2eDco85joLSjCxrOBhi92e2Ks/MuyxEfZN4b2aVyrk=; b=LHQ2YquPqPNWfm jYAEdXEsNdipCpWGxPNjswG7uJxrVuRax5b7TsTDCBtYRJaWENivAE95HEGzYP40gRjGev/JsTVuj 4FEZwE4SSrvFaQpZkm6ehw6b+9HKpyRCRg6tUZxZqvpccMr7FuVaY+LkWK+LV4P3Q+1HV66PNVZQT GYGAREVO8JG4Fzi5l2Udo9qpWU+HkiPyh5XA9XENoG8M/9vhMZrZIeqHEE7HCS+NmSp1gpRBVWdx2 svJCH/isnnX/qx0BvJwqI8nBmzEUFT+kH/i5gPA0GNrDtneVkxXnai6qgsy9RULfwcvv6lmaw2BmR oxeMfPix5KBn6fPSx1yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UFp-00AnpE-Dq; Sat, 18 Jun 2022 08:56:29 +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 1o2UFa-00AnlU-Vs for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56: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 008FA2EAAED; Sat, 18 Jun 2022 10:56:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542573; 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=Ztk/64hVy4euESesUY0JiTKSAUlnLJKXYGQQOwxI0aU=; b=8oLJ9tzOUQOZG64QWzX5Faw7RjxWB1gdV2btkyL3r8ljYxn+faUO7Gw7DbYo4RcRcELG6F 3F+FP66opVqmhZZ1baK771zWsj9mwrlCRpElKvYFCXCOBiKftBLoOZSP8I+cEhaZ9s964x X+rJCaPBStShoF8y0WJ7DrfaA9cnWuqaE7+Yeou/jwfHkkre1l82ZvU9lS5e9uT9zrkRHz JTyrM/34lrKecLLN5ubDlQ5Gvkuf5zuZYItrFFxd5UcxxVG8NsSPeS6TRgoEVJqceK8oRp imv0WlRje/KlNj3ZKbpL30HT6bI8X7XV2m1AqeD0lR+cHEMm8yNHoUhYCgzssQ== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 2/6] ath79: D-Link DAP-2xxx (QCA955x): convert ath9k caldata to nvmem Date: Sat, 18 Jun 2022 10:55:55 +0200 Message-Id: <1338212e100717107ded55293436b51c626f1aa7.1655542439.git.sander@svanheule.net> 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-20220618_015615_218463_B6C883FB X-CRM114-Status: UNSURE ( 7.17 ) 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 --- Changes in v2: - Put nvmem cell definition directly in partition node --- target/linux/at [...] 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 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 --- Changes in v2: - Put nvmem cell definition directly in partition node --- target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi | 11 ++++++++++- 1 file changed, 10 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..3e254fa494ea 100644 --- a/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi +++ b/target/linux/ath79/dts/qca955x_dlink_dap-2xxx.dtsi @@ -46,6 +46,14 @@ label = "art"; reg = <0xff0000 0x10000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_ath9k: calibration@1000 { + reg = <0x1000 0x440>; + }; }; }; }; @@ -54,5 +62,6 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&cal_ath9k>; + nvmem-cell-names = "calibration"; }; From patchwork Sat Jun 18 08:55:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1644997 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=rkjXNjrz; 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=T/vFanIx; 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 4LQ8vr3GXNz9sGD for ; Sat, 18 Jun 2022 18:58:32 +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=Rz5t5doQPGNLzXHd4i+6OJUAxxiBugoy093nrQ3lq/E=; b=rkjXNjrzS1JF06 h+fAZyN/dGtOL6nCxWw4kbg2/WQnu6J0s5EdQvEVWhUewukkShnwbojAB2BeqvXZ6YzNWHn0YwTNR R4LbU42loaq3bFvUNDmOc0uHmMpO6aJqsoMhMKbFJxRXOfscACbZ9uxqh7P74MsHlWxyYGF8XEsu9 esKghr11vGx9oqHPs3EFFYj95f5HH5UG2oV5NtpO7ga8Fi+UVQdsEykAUru9QFcPcJrYfsw0OAlwg thv0d6uINHHLICrm9/6K5tR5PD7a/6oWuxnZw4r1QSIRLdM0qn5uXNMqQMNLPrg3OgAsF6uMegtlY nZ/ZEb4OcquPMl+FeQ/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UG1-00AnqW-DD; Sat, 18 Jun 2022 08:56:41 +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 1o2UFb-00Anlh-J8 for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56: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 6C5892EAAEE; Sat, 18 Jun 2022 10:56:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542573; 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=zQQjD+sMJgVScSH2FBfzLn62u/LHSUhPGTDFyTi+mNA=; b=T/vFanIxh55p2iwXWslO0tUM4Dn6SYWp1mHP11T5TN15LNHIaY6pHlfVKbaX0vAZFYMJWK BfrniQqvyYrrfxI+kOXuJjyfUi0KTmjeqnIumFR9w8j0ucnUkHSaqZvbUJQPOxTt9EBcPo oE0p2SnMCkJfcAEivqkPtnIVoR8m+XGyzRu2eYUt4rT2uADZz6zNGIrdkF12gHG3qhgtNs RxeqaxVO5VVY1CIxy1YJPsMlmtFQC53rwxRoMnmxMWAgSskub+98mX1hpBH2hmYUxH3vLN gLJyGPbKQVhyZt6jQ+HgWuQQf1rIEluHxHNZ7JFFxrlko+44gy4TIJp2bukzfw== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 3/6] ath79: D-Link DAP-2680 A1: convert ath10k caldata to nvmem Date: Sat, 18 Jun 2022 10:55:56 +0200 Message-Id: <139c4cb3edac32de6e813618bd83442cd7cde2b3.1655542439.git.sander@svanheule.net> 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-20220618_015615_815411_08A21A49 X-CRM114-Status: UNSURE ( 8.84 ) 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 pre-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 pre-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..a688293ce6bc 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 = "pre-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 cb4a5797ec31..1ce3f00c7e4f 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 @@ -197,12 +197,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 18 08:55:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1644999 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=eyLEy1Yx; 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=KYps+aL6; 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 4LQ8wR6lhPz9s2R for ; Sat, 18 Jun 2022 18:59:03 +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=K4QA5jFRL+7iuKMxStz9t5LI8uOn/BH2f0zlWtjmX00=; b=eyLEy1Yx7AWISh 78oe0Dhwq6CXqKUiWPgNZM2xMQSysZ6/t2sUv6mxuQoSoX6LNUcGOnc6fMzRhN7Pw+0Y/Q5a9kOjm E0TtGGDqZYfCqK5vlmf0xKoluwLhGuV33ro9+OAKkv3FmziMe1RW8Vfb2G3t05xInGy5F81nEK14L TXtqaqv5FTBEYOTn9746XglCBECthDVsoP7e4LlLFjaUmfp/2+cMKQIXH2BifieC/oV4t1EJnzo6D 6VU85/TI1aD+6mqlvXHjwv/hXaeztQCzvVyQ/4o5qPZ39bd0VLXKA4muUIG0TTMHkcwT7THLoQNWc W2SFrPAVOYAJvjD8Y5QA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UGT-00Anwv-G9; Sat, 18 Jun 2022 08:57:09 +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 1o2UFc-00Anlm-8Q for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56: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 DC6F02EAAEF; Sat, 18 Jun 2022 10:56:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542574; 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=tiE1NIKPFD9dcQG9QH6AZHUCU2hH5VaJCamRU2NXJzk=; b=KYps+aL68KC3sDBYpPn1lLb88uMqCskT4cDklV4HKtbTwcPqIIoloPRM4jLFTh2gdDnQGC ib5RiMMAQ8COeEHO5CGuZeJGE88vRUyLVIHRP5xbJZ3eqV6mYl50LUQzb5/X9xBqQuVsjz HmG1HHAtEJJLsPXxDxo8xsiIy5HOigjid9TjpKLW4Cyel+cAKyh7ZQOIhj5CSoWpTt6Jd9 zM+bHMpQ12ClyQxWvA6CfAhuiFTUDAMHAEPBwMOOX9wKrtqjzXZXURxGfXS9+kkomLxriL R4pFDgzbARsGrV1GkqmTQz9t8HGtl8/9+BAhhj6LsdLLBjKacjnZUIXT1O3wMg== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 4/6] ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem Date: Sat, 18 Jun 2022 10:55:57 +0200 Message-Id: <058c7127f1e98e10b36b3b549965e6f308f47b6e.1655542439.git.sander@svanheule.net> 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-20220618_015616_493649_8A7CA84D X-CRM114-Status: UNSURE ( 9.15 ) 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 1ce3f00c7e4f..079b9ab150d4 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 18 08:55:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1645000 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=gkqqCH73; 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=NaExsXN7; 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 4LQ8wn4RQ2z9s2R for ; Sat, 18 Jun 2022 18:59:21 +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=W4gw3mE3dRyGezlIziazcsGnnMpW16ur4rKQakmDWt0=; b=gkqqCH73D7lH2V 8uzgkKglvQoqX5zyIzEVIqy+te8RJ277GgpwReVTK1b0GxqyOfoAciXvKac/BYQRvmUcK0UHTe1Fe tmNzN4fjEMvY9TFTeuiu0R/cgzD49DEqd8MMgwvFMhk71hwKicSrZtWp0p8LcQzZxyikUtPJYS7lw l4sNs6+FhUofaHO1VLJ9CKcG1HLdjNTfltzBbhG8jvBe9UA5TgfwcUNND37WWJlCNoWu7+YEs2E2z 6l91NQ0PUMcIPAQou69JPnQsFpJzWyt2ywMwWU8B8c+rCwKbCcjAQVGh+hf+LbQxBTEfRVoJml5cq OgLjxuRoNYd78FlXqHWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UGl-00Ao2b-4D; Sat, 18 Jun 2022 08:57:27 +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 1o2UFc-00Anm3-B6 for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56:18 +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 745172EAAF0; Sat, 18 Jun 2022 10:56:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542574; 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=L4yzxzK20yB41DBU2qQbMwbUAMARIzejJnOHK2v80qY=; b=NaExsXN72Z2LNhZjAMq7+FXZUnNgeMe7ZSj6t0OaZ7oUDrM5aQikf3zJ2YZt2dZ3dBgJ5g YbEoIL00MtDIX91WoQ/9dmQjOxOg2HXEZ9tFQNpdu6N8Um66EWUZpsdHz4uC5Uij4AdJnN /8s9T9rrt0YrR3YHekkV24Nqe6kKUjymMsc7n9SlylfP72+qC6vvOuTCSbbsJTWBfMjPoT dURzQTdbc7br6fLfVyci9eSYZBPcd9TkNvO2fHEqDrAgVwZjKgmQEfK99L2Vn7Hr+Om+p+ Y2jfdssdIgrMCvJbAJDZpJnzy4woKnTIrLxFbMgUgJjQDeyQ953HYJ8vGkk0FQ== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 5/6] ath79: D-Link DAP-2695 A1: convert ath10k caldata to nvmem Date: Sat, 18 Jun 2022 10:55:58 +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-20220618_015616_577794_2684F826 X-CRM114-Status: UNSURE ( 9.08 ) 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-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 91df50fb45d9..1985fa48d837 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts @@ -105,4 +105,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 079b9ab150d4..621f0c62b001 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 18 08:55:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1645001 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=GTJEWSsG; 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=sk4f699e; 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 4LQ8xN51tmz9s2R for ; Sat, 18 Jun 2022 18:59:52 +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=ybTjUDIUp1+j0GrHApe86TjyxSJx1MhRA8MxuHGVI60=; b=GTJEWSsGTYVQ9x mN73wSncSb6y1No0SqhBTtIvN+xz1v+akM9l1sqAYsjgRqVV4S9L2Nj0NK+jNdLK02PN6km+AmL87 ftwHgGqTsfF9iEGQmSSY+hgUftiD97lelEkmS8JojzQiDfGZ/hZB6X4PiQNelFqo93e/kHiCHh5Zf 8+Zt6rIdLCAofNwq+1XPFPv4G2WN/BrIO1+gLPkA9NAO6OpEPCI5PtLUkUmGJzqaqFUuYSAoI800o WofzxaGNzLaNwUFZfn6EYoH9UF2/wuDhapdGGsO03q4tF0itYmwtLKl9czIkLk8ulIXRQNYXlADZt 2IEJDJBN3u4WcbnebiWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UH8-00AoCI-D9; Sat, 18 Jun 2022 08:57:50 +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 1o2UFd-00Anmw-Kz for openwrt-devel@lists.openwrt.org; Sat, 18 Jun 2022 08:56: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 F27EB2EAAF1; Sat, 18 Jun 2022 10:56:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1655542575; 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=/TbkZ49jf8s/eyO3n212jwmSrsqhnrqSCm1rKF5QUXM=; b=sk4f699eItSGAZrlQRE3CmI9vA3luKmj2MvmzieR64RfmKUFC7kI9k/WTUt4xV/lo7U6kh BnJxUJTQvtqtO6eVVA8L4burGFBvH16zrLZ+xQoqzt1YZCYu2PHhLlcnqTkEErjDP7oFRp 1iMs2HsFLG3jmy0z/KETiZdaEkeQKpdNusDsc0O/hE7+j5gCmMtfOotWxk60ORRRnjx3RV 2jfQxjbhNR30+7rAoqKW5kwaILFEIwN9eqBeu/vTlf1IZV2l+FbjFyCcy/30UTj9n3DD4c EZMrXRaxwod1MCg3k21BJZexsNsk2MnygNqc35AZfhmZu//IyHoLwJ+Qg8+3pA== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , Sebastian Schaper , Sander Vanheule Subject: [PATCH v3 6/6] ath79: D-Link DAP-3662 A1: convert ath10k caldata to nvmem Date: Sat, 18 Jun 2022 10:55:59 +0200 Message-Id: <6773480e700024bfa1a1108badf5dacb1683ec3d.1655542439.git.sander@svanheule.net> 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-20220618_015617_875885_B980AEF6 X-CRM114-Status: UNSURE ( 8.30 ) 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 621f0c62b001..5c42ae4fac13 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 ] && \