Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp785610rdb; Fri, 2 Feb 2024 04:11:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCN7kHewLmKluDunOIIPsRy4lF7R/Deivo1onjA65GtPAfJomPyhRmL3gzqAigxV3SWXTf X-Received: by 2002:a17:90b:911:b0:296:350b:7865 with SMTP id bo17-20020a17090b091100b00296350b7865mr2595165pjb.8.1706875892453; Fri, 02 Feb 2024 04:11:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706875892; cv=pass; d=google.com; s=arc-20160816; b=pTpbNJWGctbCHwtFp4Ocg34yYCXrxK6SUVbra3QFLbEwu1NOblxGYCQ7DSNaOC3bY4 L7SMyWXlep2b7SKki/KCJ7Y+Xu1M6lsvXvvOz7TcfGazSWUXuChFiwiP+uDA2uvQsBuK JCSime51BTs2xviRm2kE2+LNTZWQe3yR0MBh/9KBS5q0cHtpht1tBFjBxCQ2XRCrRP34 AxAVDmy5u5QxzUX95K/UtvbMKMA67DMU5nB0LBZdZ8UJmxtcb2VZjxib0kFNk9RgjLYH xp18SdErdZ2H0xs4tx9VBLwo3QXx2TXWxLbUtfKWie57X6Etd5sSxlSTXTtAjLfYZQsZ 6K4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=pba/+0amTlhapN6pgdaPaY8EuzmdsTkeQgS9R/VWJLg=; fh=Y3hDs583SEwmJY0otJsTP6XDZ5YvqOUIxWhl0A28qso=; b=pwHz9RYYULd7g8i7e+4U4NRybY+CfjYTFmNP+9tC1O0P0VKg4G2mP1RqRsO+2DARpe ChmLtB7D0T/57G4uEWGYJmoJSM1BHM0iqFusNmyvYDuPCUzrmbtrQGOMWyZtRozYlCFM G9BFlfqrLcMaqiAyjTo20NK+jjpaxeZ8+hXsqDdeV91mui0FDtfMp1HqsAWJKQBPPuf7 9GWSjVoqxo2Wljx2NSktHGkni1omx46TEOnnWcRpHuYh/O/plfSEvjr2fLDu3wKHl8O1 Yck6s6A+OgEUpxCIH3oR5xOldVjJ9pi+kqeN4WxgaRmx+aATh9e4buScaTJg3i2hsIES 6Gaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=gpgu+1LA; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-wireless+bounces-3016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de X-Forwarded-Encrypted: i=1; AJvYcCXjnHmp82xVNWLygNB+lmopA8YBCrf7D9Snntn1Wtr9EjiSQDB7X4CdkIHTWDP5eb+SFG199vaJdtjlCsfkXscjPicr1m4LDI/LFyN3NQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x7-20020a17090a46c700b00295c11a9575si5361915pjg.170.2024.02.02.04.11.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:11:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=gpgu+1LA; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-wireless+bounces-3016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C15229B095 for ; Fri, 2 Feb 2024 12:11:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A884713DBA9; Fri, 2 Feb 2024 12:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=fiona.klute@gmx.de header.b="gpgu+1LA" X-Original-To: linux-wireless@vger.kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 6355213541C; Fri, 2 Feb 2024 12:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706875888; cv=none; b=HCW+/168rhH1aTneo7q9CAJ/KF9XLQcJVAOlGmEj04DOrOS2XSb2rW5iYrhOQckbKzMPOnIXhM6KEC1k7+p1gnu3PiZZDNd7ljhHohrs+gngFfyfyu9VHFmki/sx1CAFsLsxnUPaGjL9zh+kA/N//bS078q3Y83DA4JUku71mSU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706875888; c=relaxed/simple; bh=4AhjPzXaUJ5bsF3nimywB/bT0/Vklgsm0DU2i4x7WXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SbjXhNTc0qV2haZY6RQQlaQwXYfRSg+hcVv84i1U6rXa0mlMYCkAHqeWZ68RjCK1ut3AX62rgbGX/yRTEmgMvvDPSeQOZZHMcgVNs8cmNFfOAxEAvTgNynM6i+050QfLVaHhm9sAubWyaoB59U/9pHDwbKLjcp8mIjDeOkA4QCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=fiona.klute@gmx.de header.b=gpgu+1LA; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1706875873; x=1707480673; i=fiona.klute@gmx.de; bh=4AhjPzXaUJ5bsF3nimywB/bT0/Vklgsm0DU2i4x7WXA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=gpgu+1LA7ax/lLpYm9BVhiX3dRGmjLCRAYhlqegKU/Cv3neb8FYKqWQSu+3An9/W eA5o5SWXN/BJvugypmRVWg4y6blegKBXi5KiAWrzNOruBkJqoZhXKvmV+VHdvfdb5 ykerzqQH+Kpfk1gu2BjJAWpMfR62YPyDhELy18X2qANGT59saSyRdJBKl06hzqD51 doHb82zJ60qWs79WCtVfy8P+ppGXeIGEUCBVthgF2hPONO+AVqDE43X81QLErSx2o 3HcqMllK8vMYK5I9OKufwCMnAywxy9VTpIUvNTZm58W/iZK/E5dKQdjEcjnlHqNyT RdR7YqN6+97a2uAd2Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from haruka.lan ([85.22.17.32]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQMyZ-1rjGNM0lN3-00MJz4; Fri, 02 Feb 2024 13:11:13 +0100 From: Fiona Klute To: linux-wireless@vger.kernel.org, Ping-Ke Shih Cc: Kalle Valo , Ulf Hansson , linux-mmc@vger.kernel.org, Pavel Machek , =?UTF-8?q?Ond=C5=99ej=20Jirman?= , Fiona Klute Subject: [PATCH 0/9] rtw88: Add support for RTL8723CS/RTL8703B Date: Fri, 2 Feb 2024 13:10:39 +0100 Message-ID: <20240202121050.977223-1-fiona.klute@gmx.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:1F++Ow/K5+kHhUQ/XQf6G9ou6ba2ls07noywmqqqx8Y8WI4nnCn xTnaQTr3DutqufWflKdcxQW5EvrV6XqfOWqDLUgh88OOLCbvoCLAJWcnwy6ovJJ5UFy9Vpt m6SGwpCzo+UV3ko3cdaHQdpEFQ0T9I1zbdTBxfXxTHI2vBYcjPo05P0y6rSauIdpUO9tgvd TvR5jZKSiOgF53eG1A9nQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:YkD51cJZ2QY=;uxO7GGG5JJcUpU5uS+Ys28DPW62 oKtF7GSdUWjN/InDDpf8wDUV8gxuCVXGFkK3/RWLTuac9t5tT5zCX7eFljeuq0UHkW4P6J30O /vuUGMsIemLZcNKz29/QQLQVn7I2ih3dkdBfzb5L46XOCp7bzcREFj7X8hvRBEErF1LaIiFWG JxBt8CTGfMvFUkZrN4l96WBIvX6moLYCK+FUX+MbU70lC2LLomeakg0ScV2pgzggtKoCL8QXJ iCmSM2xhZ59Ahf6Bbr0xAHkWr18z3tnfweIgHrrBqlKpFwt4ywtr6lYGWTLRoI8fn417t7w9P bgFwHWpUYGiSlj6/81lWLlRFh9CKxdXpxFPFZ88yNbCITmjfOp8LVQbvtXUJ/dPE/XYHTpnr2 NM1nhs88P+B/eZngobRYfUgPqBT9A8XlV0uEyci9jx3e2WULLVrg32zoGyIEnJmB6CpYxlTMd vdR8AYD50IP3GKqNw3xi/SqXVXkVQrLoIhOwGLACo7uGcJTXz4KOFI4bvhLMBpt29Z3uX0Obd biCU6rIA1fmPBVsol8M94tsnLqdROPfYn3zb/uWcSxuioDDSJhvk6WKiPsTiiYQ8nwAhKRMkR fvItNIUVuBHi2pJs1GG4YYT9lwIvX82YlxdvRntZRuPRWbRgVE3dn+H60913pbXujbikePXpZ 4DGRGzSo1sPXoOB+Qn9UzaUnypFF2xDsFtrp/AZFlnbx0+4AVYEenTz2Aan6Dc/sTFjAlxCrX FDbhztRaIl8ueHd9EFHenk7av2qhcOSFv5v9JAs5jh/C3yHONZ8C5ETuKTpVSZe1UdHFFti6f 1lgBcaSjTn9LUVyIWUIlbbzmbwpdeZ91YAJj5/miwgAyg= This patch set adds a driver for RTL8723CS, which is used in the Pinephone and a few other devices. It is a combined wifi/bluetooth device, the wifi part is called RTL8703B. There is already a mainline driver for the bluetooth part. RTL8703B is similar to the RTL8723D chip already supported by rtw88. I've been using the out-of-tree rtl8723cs driver as reference. Station and monitor mode work well enough for daily use on my Pinephone, I have not tested other modes yet. WOW firmware is declared, but WOW isn't implemented yet. RX rates stay fairly low still. Ping-Ke Shih kindly offered to add the required s-o-b for the firmware and help get it into linux-firmware when it's time, for testing now please see the code I used to extract firmware from the out-of-tree driver [1]. I'm trying to follow the "one file per patch" rule for new drivers while integrating with the existing rtw88 code, please let me know if I should split it differently. I'll be including a few questions for reviewers in the relevant patch mails. Thanks to Ping-Ke Shih for advice, and Ond=C5=99ej Jirman for debug logs! Requests for testers: * I do not have any 8723d device. I made sure rtw88_8723d still compiles, testing would be very welcome to make sure I didn't break anything while moving common code to rtw8723x. * Does anyone actually get the "unexpected cck agc report type" warning? The out-of-tree driver also logs a warning and handles the 3 bit LNA index in that case, but the code could be simpler without the workaround if it isn't needed. * I've found mentions of RTL8703BS devices online which seem to be wifi-only SDIO devices using RTL8703B, and posts telling people they need to use the rtl8723cs driver to make them work. If anyone has one of those I'd be curious if this driver works with it. [1] https://github.com/airtower-luna/rtw8703b-fw-extractor Fiona Klute (9): wifi: rtw88: Shared module for rtw8723x devices wifi: rtw88: Debug output for rtw8723x EFUSE wifi: rtw88: Add definitions for 8703b chip wifi: rtw88: Add rtw8703b.h wifi: rtw88: Add rtw8703b.c wifi: rtw88: Add rtw8703b_tables.h wifi: rtw88: Add rtw8703b_tables.c wifi: rtw88: Reset 8703b firmware before download wifi: rtw88: SDIO device driver for RTL8723CS drivers/net/wireless/realtek/rtw88/Kconfig | 22 + drivers/net/wireless/realtek/rtw88/Makefile | 9 + drivers/net/wireless/realtek/rtw88/mac.c | 6 + drivers/net/wireless/realtek/rtw88/main.h | 3 + drivers/net/wireless/realtek/rtw88/rtw8703b.c | 2106 +++++++++++++++++ drivers/net/wireless/realtek/rtw88/rtw8703b.h | 62 + .../wireless/realtek/rtw88/rtw8703b_tables.c | 901 +++++++ .../wireless/realtek/rtw88/rtw8703b_tables.h | 14 + .../net/wireless/realtek/rtw88/rtw8723cs.c | 34 + drivers/net/wireless/realtek/rtw88/rtw8723d.c | 673 +----- drivers/net/wireless/realtek/rtw88/rtw8723d.h | 269 +-- drivers/net/wireless/realtek/rtw88/rtw8723x.c | 720 ++++++ drivers/net/wireless/realtek/rtw88/rtw8723x.h | 517 ++++ include/linux/mmc/sdio_ids.h | 1 + 14 files changed, 4437 insertions(+), 900 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b.h create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b_tables.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8703b_tables.h create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723cs.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723x.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723x.h =2D- 2.43.0