Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp589072rdb; Thu, 1 Feb 2024 19:11:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLJ5bxBoDEUCzThtbF45kIx/8ethXYran4XeQx+tUzKum9tykkMDrxCRN8zw5TwX4Tj+3k X-Received: by 2002:a17:902:ce92:b0:1d9:4544:ed37 with SMTP id f18-20020a170902ce9200b001d94544ed37mr6466070plg.17.1706843518131; Thu, 01 Feb 2024 19:11:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706843518; cv=pass; d=google.com; s=arc-20160816; b=ukDG27fC/IrfrnTZhOAoJQN7Ci7+I+ou+oSVvJKjawvJdAPfXEOLviNjvcMuW9U6fE ddnY7qBG6+qCGrNciPkVdI/apY5X+M+6PpK8583EI4ZfeKbY9rPdWCoPMUwriB7g+X6o kRvJRrsYtUGNo3w/X65CYrzaSkkkSn5UBWf8Wioyl4jqhhf/gK62IszvR1UB1fHAU/FO rXjjv4jMaoZtlJIMqj2nTJcVutfENFc7UxCR4xTgIgVYv0PWYuTTPgArrbjzXhw8tYPr vgRa0nFW3pDn9REg9OcNGSrEKN0eFehZ6OyOmH/YJw69hajqJ4Q7TG+OZii/dQRoaVjI AEZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=BO0GXpoc8/p8dlDTq1EQHvdnXPj/FQA/OcfBM7PRz0s=; fh=7/CxaqYnnxv+B+4AQUtZT7UYfkfwpSGOp0MyCHxExBk=; b=VAAO37FKP5D1IJiDwNtA7VG2vNVc03dvTa0Ki2Z4PkDqt6ODJIXEzxBDXyBckbZJV1 3KVNbrBzDH0P3Zc1RaGAR7oLjo0oDhijC4a3dY6DuxNy1ben9/i4XS0lrRjrvsCqHewp f24wNpJg5itsizrSo4M06y8NV6kmDg+lt8yAL201rhFqmSgKEjfM7eKU9ZYXBi77yo1L FPZP4uGvBunsC6aDvm/DJHRrAo8fF/H7uvNvFB5xsv2LTfkpSjMO+vFHAvUsQSQhkyM4 wnPgr/SQ33Yi67e24rLxa1oQbPT+E1UFD6BX/epbc+hL+t2/IQlXHuPfWcU+nn1H6BKa XKlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-2981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2981-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXlolbxuj/MkHOTuNtZbR9EwMXdJhTKGb3D6ivA1EsqDaqUZIuX5tKHAl/REmI8DOZQxEoeAYWaaKVt9Vri8Z44LUnSaZuR00UxYrMuVw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p17-20020a170902ead100b001d52198a844si845824pld.614.2024.02.01.19.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 19:11:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-2981-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2981-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7BEB2B212F2 for ; Fri, 2 Feb 2024 03:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D88DCBE69; Fri, 2 Feb 2024 03:07:32 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D7C6BE5A for ; Fri, 2 Feb 2024 03:07:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706843252; cv=none; b=ZdD/Rci14geVSfsqEW+2wBrMw0ZFfwdN4XMGlKubv83cjW+Vv30OTxbssduyqf+DgEwt/0e7FG8PQpzMRgel+7UDAmjHNO+U75ujRvAdbKxw+C0nea40dcPhjt66IrdmQXGj8X3WpPvKLJA1wGo/29+rgbRlqbkHYSQ8u3zkL9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706843252; c=relaxed/simple; bh=fptnPP62aGzf2Pri6IdvlIA8hKByIpFKmAWtId9v4Xk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=VkU4PobXThyLobKs6MCp+fxLxeZ0evfN3MQ0QBGjkpt+EGgnvPZfIoSboQcn+t33b0g144y+1BqFQ6WMo9iY/TizqJ6U5PX0f4puKTK3OCU4royhq59duZKm8m1zLbte6FxjsKwjnXIF5sFMo8kN3UNPG92McqUHNMMUTuBZuMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 41237GjtC1862997, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 41237GjtC1862997 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Feb 2024 11:07:16 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Fri, 2 Feb 2024 11:07:17 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 2 Feb 2024 11:07:17 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 00/11] wifi: rtw89: 8922a: add firmware RF calibrations Date: Fri, 2 Feb 2024 11:06:31 +0800 Message-ID: <20240202030642.108385-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) For WiFi 7 chips, we move RF calibrations from driver to firmware. Driver must trigger them one by one, so add H2C commands to trigger each of them, and add a C2H event to know the result. Because H2C commands and C2H event go via PCI ring, we should trigger them after PCI enabled, so add a chip_ops::rfk_init_late for this purpose. Ping-Ke Shih (11): wifi: rtw89: rfk: add a completion to wait RF calibration report from C2H event wifi: rtw89: rfk: send channel information to firmware for RF calibrations wifi: rtw89: rfk: add H2C command to trigger IQK wifi: rtw89: rfk: add H2C command to trigger RX DCK wifi: rtw89: rfk: add H2C command to trigger DPK wifi: rtw89: rfk: add H2C command to trigger DACK wifi: rtw89: rfk: add H2C command to trigger TXGAPK wifi: rtw89: rfk: add H2C command to trigger TSSI wifi: rtw89: 8922a: rfk: implement chip_ops to call RF calibrations wifi: rtw89: 8922a: add chip_ops::rfk_init_late to do initial RF calibrations later wifi: rtw89: 8922a: add chip_ops::rfk_hw_init drivers/net/wireless/realtek/rtw89/coex.h | 1 + drivers/net/wireless/realtek/rtw89/core.c | 2 + drivers/net/wireless/realtek/rtw89/core.h | 51 +- drivers/net/wireless/realtek/rtw89/fw.c | 322 ++++++++ drivers/net/wireless/realtek/rtw89/fw.h | 134 +++ drivers/net/wireless/realtek/rtw89/mac.h | 2 + drivers/net/wireless/realtek/rtw89/phy.c | 775 ++++++++++++++++++ drivers/net/wireless/realtek/rtw89/phy.h | 30 + drivers/net/wireless/realtek/rtw89/reg.h | 8 + drivers/net/wireless/realtek/rtw89/rtw8851b.c | 2 + drivers/net/wireless/realtek/rtw89/rtw8852a.c | 2 + drivers/net/wireless/realtek/rtw89/rtw8852b.c | 2 + drivers/net/wireless/realtek/rtw89/rtw8852c.c | 2 + drivers/net/wireless/realtek/rtw89/rtw8922a.c | 79 ++ .../net/wireless/realtek/rtw89/rtw8922a_rfk.c | 202 +++++ .../net/wireless/realtek/rtw89/rtw8922a_rfk.h | 1 + 16 files changed, 1611 insertions(+), 4 deletions(-) -- 2.25.1