From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.simonwunderlich.de (mail.simonwunderlich.de [23.88.38.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 728043126AC; Wed, 24 Sep 2025 15:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=23.88.38.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758728066; cv=none; b=In7avjMjrdKG1yANfB8BoYXHOBMXintoIxRljbTSlGonslnvlvc4MnWo9thaxrxHGriE0ZsPoChbY3wlPyBdnOdshHndiQmf7ZC9HMVtgMxZjv+svN4Do7ddwNYZ+hYds5lMFctpTIKYQFqfl8TGXo4YsBL8r4F48dEfvYe8Sls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758728066; c=relaxed/simple; bh=HPCdnJqlxl6M69qaxiFPhdy4hQEQTelm8MdgW3vvcig=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=JF9tQQ32EVZO9jSIUi80Qwwl6rI5k2IwO4S7kD7znlTISG2YDcH44mOWKbp2M63WxBa42JSaschhhiM4SoLFYg2nOx97IPaVZQ1YZCjz0fTZi/nMAz6cjaDhAMFxu20KEliJPOu02Z4McSst7T79KHu800s+nW4bZxHTi13I39I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de; spf=pass smtp.mailfrom=simonwunderlich.de; arc=none smtp.client-ip=23.88.38.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=simonwunderlich.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=simonwunderlich.de Received: from sven-desktop.home.narfation.org (p200300c597296Be00000000000000c00.dip0.t-ipconnect.de [IPv6:2003:c5:9729:6be0::c00]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.simonwunderlich.de (Postfix) with ESMTPSA id 5B413FA12C; Wed, 24 Sep 2025 17:34:16 +0200 (CEST) From: "Sven Eckelmann (Plasma Cloud)" Subject: [PATCH 0/3] wifi: mt76: mt7915: Beamforming backoff limit table Date: Wed, 24 Sep 2025 17:33:08 +0200 Message-Id: <20250924-backoff-table-support-v1-0-20e50fbc59de@simonwunderlich.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIADQP1GgC/0XMTW7CMBCG4atEXnckjxPbmVylYuGfSWsVcLBDi hRxd9wiwfKd0ffsonJJXMXU7aLwlmrK5xb40Ynw7c5fDCm2FkoqLQkteBd+8jzD6vyRoV6XJZc ViBSOo+q1NVG07VJ4Trd/9/Pw7MKXa+PX5/GtT93LbhNY8i8XOKZTWivowNJ6ot6MOG34J3tXG UI+tf/U+d5ErQ1KhdqRNcpYJBtjIBxIqjDQYKWOVhzu9weSlabg6wAAAA== X-Change-ID: 20250917-backoff-table-support-99218823576d To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Maxime Coquelin , Alexandre Torgue , Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, devicetree@vger.kernel.org, "Sven Eckelmann (Plasma Cloud)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3052; i=se@simonwunderlich.de; h=from:subject:message-id; bh=HPCdnJqlxl6M69qaxiFPhdy4hQEQTelm8MdgW3vvcig=; b=owGbwMvMwCXmy1+ufVnk62nG02pJDBlX+BNiF5SkX15/deLjyH3dPIxpucda0iwUp77/ePGjU nfMFCm3jlIWBjEuBlkxRZY9V/LPb2Z/K/952sejMHNYmUCGMHBxCsBEbnsx/FMOPMIWvknq/BLH eZP+ZtdmmwQWrbxqF7TsYMirqtmLEmYzMuw7+ztjo9HjOXMdCyMTvCyVv0tceXmk/feZTd8nMdY wTWQFAA== X-Developer-Key: i=se@simonwunderlich.de; a=openpgp; fpr=522D7163831C73A635D12FE5EC371482956781AF It was noticed that Mediatek's MT7915 does not only require calibration of the normal rates (configured via DT) but also some backoff values for beamforming. The proprietary driver loads this from some file in the firmware folder. But for the the upstream driver, it is necessary to get them from the same place as the normal limits - in this case from the devicetree. They released the support for this [1,2] in their own SDK but without any kind of documentation. And it was (to my knowledge) never forwarded to upstream. But since also (in my case) OpenWrt needs correct calibration for this WiFi chip, we should get this upstreamed. I try to my best to provide some sensible information about the patch and the DT entries. If anyone else has more information about it (to improve the descriptions), please feel free to comment and provide some enhanced/corrected version. The patch from Shayne Chen was only rebased and modified to perform byte reads from the DT [3]. Besides this, only a commit message was added, MTK_DEBUG parts were dropped and some checkpatch problems were fixed. Regards, Sven [1] https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/f0d2527deb4f91592b6486a5c98ea3f584f76a61 [2] https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/737340322ab22b138fd200e020d61ffdbe3e36a9/autobuild/autobuild_5.4_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch [3] https://lore.kernel.org/r/20250917-fix-power-limits-v1-1-616e859a9881@simonwunderlich.de Signed-off-by: Sven Eckelmann (Plasma Cloud) --- Shayne Chen (1): wifi: mt76: mt7915: add bf backoff limit table support Sven Eckelmann (Plasma Cloud) (2): dt-bindings: net: wireless: mt76: Document power-limits country property dt-bindings: net: wireless: mt76: introduce backoff limit properties .../bindings/net/wireless/mediatek,mt76.yaml | 65 ++++++++ drivers/net/wireless/mediatek/mt76/debugfs.c | 4 +- drivers/net/wireless/mediatek/mt76/eeprom.c | 38 ++++- drivers/net/wireless/mediatek/mt76/mt76.h | 8 + .../net/wireless/mediatek/mt76/mt7915/debugfs.c | 74 ++++++++- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 + drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 182 ++++++++++++++++----- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 6 + drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 9 +- .../net/wireless/mediatek/mt76/mt7915/testmode.c | 2 +- 11 files changed, 342 insertions(+), 55 deletions(-) --- base-commit: b36d55610215a976267197ddc914902c494705d7 change-id: 20250917-backoff-table-support-99218823576d prerequisite-change-id: 20250917-fix-power-limits-5ce07b993681:v1 prerequisite-patch-id: 964626eea847052cefc907ef0f01286a080fdc3c Best regards, -- Sven Eckelmann (Plasma Cloud)