Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp132788lqk; Sat, 9 Mar 2024 03:58:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXc8X35qtIGa3U110R5VA2urFQZXsuakBB48vwvs6qTjkVDo/HY+d+Q8USrpzE8QwPtI9IO1lcm4o+2nQr9gdDGQxqFVqnmmVSZS9wT1A== X-Google-Smtp-Source: AGHT+IFvsCBoYFiUtxx8lziqRR+HVZBq9/+Ly0fx0nMRsqnUWnMXWTSHQsxOpsJxY9JG3hSNw8Nz X-Received: by 2002:ac2:4829:0:b0:513:30ff:681e with SMTP id 9-20020ac24829000000b0051330ff681emr988003lft.30.1709985509246; Sat, 09 Mar 2024 03:58:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709985509; cv=pass; d=google.com; s=arc-20160816; b=DN9TtIJL0bPkvs96byRMrb8eYe4IAb7gzzFYTAkc+AISg5bfQ3pTrFEXQ9whhFvtNR 19ZYwE2vd8Dd5+CGF+7EIe5GvcjszKMzwuVYaEwRUBLRAeqhnYMLuDHMoPwExiMLWnQk JMeKtpfWaOnqowqyJR5BOYZQA75YKFWB9O7/apZONc+tz3MnZg8kdpd2c0/5m6bRt4CP miN4WTtmELA6ktMggoMCU2puGEa2EXVJA7g0REeeFiricRQmzQEW5PbFkaaEteluZ2wc /Cy05GRYTSNkR/B7uIh8rSaEIZ+nUSEy9RNMM2XDHkO8VABjv/scoBnN2pZq7WnqfjxR aw1w== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=yDfj+aYpq3Ueq38vf9E0hdSN9dg9i6XjO7nJebLbxQw=; fh=vioCFxE9EDeLWBo4RaQu0jJXdc5Dsw8ZcaS0cbULLd0=; b=A4j6472RRdC9DbcF3xJj+EEwDPxOcKwn4udCWgtSm9NbBpOuZLOprtacnOUqkUcmP/ RvUSXuGnj+AAODvrSf+C5bXt94XMdplXppRfLhs1wv9LfzTd/cZL7PuigOwfBJjjopSe +OJL5FB++7BRDUeebe2wJTqpVbpROTzVD8fMxrbLoiyq5SpLrRvh4Noke35FCNOmgFAY I1eLxcXZfM4gDp6s0hHyFNDB6vC+6xVqYGmVmD1cnLcP6hnuUodCKGqj+jKa2yQgcoSq M3U5KnevQpQZq/GTRqBdrkncUFhsTWpGPiGcvGQCpZl8bKzu0bFeelGflYk61aedNIKo wXTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=LX14kvBY; 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-4515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h17-20020a1709063b5100b00a43a87e54d2si683942ejf.301.2024.03.09.03.58.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 03:58:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=LX14kvBY; 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-4515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4515-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EAF131F21776 for ; Sat, 9 Mar 2024 11:58:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA5C33BBF1; Sat, 9 Mar 2024 11:57:51 +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="LX14kvBY" X-Original-To: linux-wireless@vger.kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 A52EB3A8F9; Sat, 9 Mar 2024 11:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709985471; cv=none; b=MPAvjm7srYKaVcVYqDKoR92rp2yfxoKwijlRrLjbwOcQDRhP7ao0EP1YSQ/ltkTXSksrprmxCtEqZ+sEhio11LX7bFNeaTtksSPCpt3MKsmdZXF3STdf8/Gc+lw4vGKWH1JFUtdi9XSPxsVTiJf+oWMxhBE7QJr2IV9lijubfcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709985471; c=relaxed/simple; bh=lir2t2pdVtLxfOYmeHCDbRJi+Djx6fijtKcExQHW/WU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PbOwpiXIrJFfdcu3LN3BJVzhZ7JH3qA7QsVHHzNJep7T/1vaOJzn2nXsD062w0MnvScvMTSjM/CsTbK9aT4HpbCJD8pWHhioYi/DihM/GKujPX5S+ZaW7kvwDMV17geBOU55kX2w3w0J+gldXAI3pR5Jvgq1hyIVkJwkcyxjEi4= 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=LX14kvBY; arc=none smtp.client-ip=212.227.15.18 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=1709985457; x=1710590257; i=fiona.klute@gmx.de; bh=lir2t2pdVtLxfOYmeHCDbRJi+Djx6fijtKcExQHW/WU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=LX14kvBYsTDPLLDkUNJa8VYsBZ+0NHDFJY/Y478Y5gtjtRhx9LB/rsbNhvHmF5e8 i2cKx+AFs9njqOF/30zh7jDBrLVgbrjHLNyjJ5tiJisOONuF18Ph2+c545DbVjiQB Uxwoj6cq5lj2+iGu6Fi1BwZrFGez6KaP79VWEEfIutrdjTmReYPJsFHwCZxWjKxx9 MiAlY22qV0DOmwN+4Jp+lgQkpfd6sJO0DIf9lOwQvX0wOXR6njU3X+snylQG/tOEL YTVGOPAhWC0/qYpLsX2nqpAR42WoJxHvx3OmzDtk/cjvx5nSh3IeCAH7/33nwLCoF xNJb6CCsdSRCulzM2Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from haruka.lan ([85.22.112.71]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNbp3-1rUHxS27x5-00P5X4; Sat, 09 Mar 2024 12:57:37 +0100 From: Fiona Klute To: linux-wireless@vger.kernel.org, Ping-Ke Shih Cc: Fiona Klute , Kalle Valo , Ulf Hansson , linux-mmc@vger.kernel.org, Pavel Machek , =?UTF-8?q?Ond=C5=99ej=20Jirman?= Subject: [PATCH v3 9/9] wifi: rtw88: SDIO device driver for RTL8723CS Date: Sat, 9 Mar 2024 12:56:45 +0100 Message-ID: <20240309115650.367204-10-fiona.klute@gmx.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240309115650.367204-1-fiona.klute@gmx.de> References: <20240309115650.367204-1-fiona.klute@gmx.de> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:WNZSjhbM9GWxzJcfU9uH56tkLyDLRbN3WLO8RW78lg8b5lXlm9H k/rFiUV+cyBBQEsREIAjvG5+1pyjwl6L2+98F5o0NO/ltaKxwQZy1hR8E4aLO/YI52Iou0t oItak8CIz/cauRBsxJIt+K+XOjElrBqU979UoRoXLEPpsjfvLd+zkbTy2Rv1cULtCmmarX2 x7+ubcxteW553f1ie7MOQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:XZp3ocSsxUo=;2jZpIZ5nQHDm8LeGRWG/jpYobcP 8qbjzdvK9WU5GAW4Ix1Ep+vMh5441L9uhLxUe24KPfucfGQMtCQB9AWJ7HU08R+jBnzheJ1Mj AfsMXaR2YxcM7Em/BnaDMaVsXy/t6bwEWW2P+PP0sLWyL9mlzCzBCCuNW0P0J4YA/JQYIKqnO evCjg3bKRfzkjNJo4+e1H/8TqA6dpqBAFPms3hsaxxNZbVHbIGiBZTkbEm47iM/72NnqBvQF3 su7vibkzZ2aZL1OmTr60/vyCySTzTRUNIQPOCOYsS940xkVXK683VtjDqmzUdRrDi0UZDEWkW AYmtKXGnDt0IidDrFYeBxWPtIWVsVtJ4TyhBmshc8yMxkDGPWt5/Z6EKHbdA6j+/EVB6S6faa 100YCMC1mF/D6OZbIbOOfyqp8iz5WYMZVKhoKCeDIyDxGA3yqVUHzQ6YLtDKxnK9HcEey5vfq V0HDtUbRJhOMqQCx8TYKVgrFcxerhTtAm4FcdZnR2kzbiyggMDLj0O0mC72P9k3eaYMhmauwQ Gc6K0FbiyNb2mZuUWbxaGICHNxSIRYYGJr2o5FKGTzias9+EMQb2jsfWPRvGfoQnCwr78zn49 sOTEcCKMoPQSYkB+oWHci3buFgX5kjwoXCEG7wqbOsdEfjPtmi37/MqY09n21GbVmblDaVkLC Ei6Oc33H/2oQ4lfPww6+qgYUermqp+ieBDJoO2IcSdLNhp39XLp66RIdBbFzwzvGbHCrNG7j4 DdN5nGasO8S7bJDhVK+oF0GGQ/xsdEXboiRtOwq7A3I1d/5bIXM35JR4pOoQxOZZ9NimtcNT7 TquyvkMtA6OvJVOugJ19kfZQFV5vZesENuYnAj4T0a2wk= This driver uses the new rtw8703b chip driver code. Acked-by: Ping-Ke Shih Acked-by: Ulf Hansson # For SDIO Tested-by: Pavel Machek Signed-off-by: Fiona Klute =2D-- drivers/net/wireless/realtek/rtw88/Kconfig | 18 ++++++++++ drivers/net/wireless/realtek/rtw88/Makefile | 6 ++++ .../net/wireless/realtek/rtw88/rtw8723cs.c | 34 +++++++++++++++++++ include/linux/mmc/sdio_ids.h | 1 + 4 files changed, 59 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723cs.c diff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wire= less/realtek/rtw88/Kconfig index 07b5b2f6eef..22838ede03c 100644 =2D-- a/drivers/net/wireless/realtek/rtw88/Kconfig +++ b/drivers/net/wireless/realtek/rtw88/Kconfig @@ -31,6 +31,10 @@ config RTW88_8822C config RTW88_8723X tristate +config RTW88_8703B + tristate + select RTW88_8723X + config RTW88_8723D tristate select RTW88_8723X @@ -126,6 +130,20 @@ config RTW88_8723DS 802.11n SDIO wireless network adapter +config RTW88_8723CS + tristate "Realtek 8723CS SDIO wireless network adapter" + depends on MMC + select RTW88_CORE + select RTW88_SDIO + select RTW88_8703B + help + Select this option to enable support for 8723CS chipset (EXPERIMENTAL) + + This module adds support for the 8723CS 802.11n SDIO + wireless network adapter. + + If you choose to build a module, it'll be called rtw88_8723cs. + config RTW88_8723DU tristate "Realtek 8723DU USB wireless network adapter" depends on USB diff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wir= eless/realtek/rtw88/Makefile index 22516c98460..8f47359b438 100644 =2D-- a/drivers/net/wireless/realtek/rtw88/Makefile +++ b/drivers/net/wireless/realtek/rtw88/Makefile @@ -47,6 +47,12 @@ rtw88_8822cu-objs :=3D rtw8822cu.o obj-$(CONFIG_RTW88_8723X) +=3D rtw88_8723x.o rtw88_8723x-objs :=3D rtw8723x.o +obj-$(CONFIG_RTW88_8703B) +=3D rtw88_8703b.o +rtw88_8703b-objs :=3D rtw8703b.o rtw8703b_tables.o + +obj-$(CONFIG_RTW88_8723CS) +=3D rtw88_8723cs.o +rtw88_8723cs-objs :=3D rtw8723cs.o + obj-$(CONFIG_RTW88_8723D) +=3D rtw88_8723d.o rtw88_8723d-objs :=3D rtw8723d.o rtw8723d_table.o diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723cs.c b/drivers/net/= wireless/realtek/rtw88/rtw8723cs.c new file mode 100644 index 00000000000..8d38d36be8c =2D-- /dev/null +++ b/drivers/net/wireless/realtek/rtw88/rtw8723cs.c @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright Fiona Klute */ + +#include +#include +#include +#include "main.h" +#include "rtw8703b.h" +#include "sdio.h" + +static const struct sdio_device_id rtw_8723cs_id_table[] =3D { + { + SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, + SDIO_DEVICE_ID_REALTEK_RTW8723CS), + .driver_data =3D (kernel_ulong_t)&rtw8703b_hw_spec, + }, + {} +}; +MODULE_DEVICE_TABLE(sdio, rtw_8723cs_id_table); + +static struct sdio_driver rtw_8723cs_driver =3D { + .name =3D "rtw8723cs", + .id_table =3D rtw_8723cs_id_table, + .probe =3D rtw_sdio_probe, + .remove =3D rtw_sdio_remove, + .drv =3D { + .pm =3D &rtw_sdio_pm_ops, + .shutdown =3D rtw_sdio_shutdown + }}; +module_sdio_driver(rtw_8723cs_driver); + +MODULE_AUTHOR("Fiona Klute "); +MODULE_DESCRIPTION("Realtek 802.11n wireless 8723cs driver"); +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 7fada7a714f..7cddfdac2f5 100644 =2D-- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -124,6 +124,7 @@ #define SDIO_DEVICE_ID_REALTEK_RTW8723DS_2ANT 0xd723 #define SDIO_DEVICE_ID_REALTEK_RTW8723DS_1ANT 0xd724 #define SDIO_DEVICE_ID_REALTEK_RTW8821DS 0xd821 +#define SDIO_DEVICE_ID_REALTEK_RTW8723CS 0xb703 #define SDIO_VENDOR_ID_SIANO 0x039a #define SDIO_DEVICE_ID_SIANO_NOVA_B0 0x0201 =2D- 2.43.0