Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1189234rwl; Wed, 5 Apr 2023 13:08:30 -0700 (PDT) X-Google-Smtp-Source: AKy350ZqW003hWW1fgh7kqimkDlocCwtXbavRH1GiZM76eLCOIiXKxmxfkBpkuCBbtaCsKn2LSLI X-Received: by 2002:a17:906:7110:b0:8b1:3467:d71b with SMTP id x16-20020a170906711000b008b13467d71bmr4035662ejj.48.1680725310113; Wed, 05 Apr 2023 13:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680725310; cv=none; d=google.com; s=arc-20160816; b=ToA/zSrGwiblcSkijk+J693QBdvL4yc5fxxS8r6LLEjEpqC2F1jPW0Hpp94kTFtex+ s7oOcxERt/hGqw8aKIJCOwB2a79KkrqDoJMsk5HimQXOj4IabIlzLA0g25t/KEBaBzSG 5UBjs1Gol9fnq2OAY6ITgwWKcB2omGP1vD5ZTyUji5m6gkCoxrlRyBSizjWSKhgnm2Fr TbWdIxXTO/c4sbuHPhiGBgeJNdfccVEAeU3lidjdQ/EPIZhDUp1rST+UOiQCMoWb3I2E I2uNqXFfAoaFTQNXYcX07t9oRLFJi2Mv0bdx/jWcoM+ACABts/UInq18cKoT/4YaaN7H 5zrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bp+R7zQ4RuR3/A5CmEUbZnCQbbZRzAWmXQ+x2H2Nqa8=; b=CfgjBCzKWYXxyqkoDKq3cBJsrSteZYaX2XvI6xbUln3cP2md2ltGwn+9lNEoymv8M5 gf4OO6hB6yibsh+pN5jwN/AMp7E1E9ZK7weGXwa02rqwJUXTIqdThYVsqe7ruGQhQAYj zyfz6Vb7Y6ZUzbqQXIp0pTSg1xdGq2JjY0/QlNhG6/2xCHPA/dB7fT+qpyoP6jedxaZJ 3Um4IkR2SsQl5DFeZ15h5cFP4XmdJOTSwFq7MmERvr3CCFjYHZfzTEkGpIbfdW+y9+ZH JSt1//qk6elc/X7Ur95yVHqm2TZAQbriv8dbrnFRWFWcYMeILKmX5PHdLVjQWk4lomZV XEPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=EDHQ9Nc5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a170906641100b008b178585afcsi2623344ejm.250.2023.04.05.13.08.15; Wed, 05 Apr 2023 13:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=EDHQ9Nc5; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234251AbjDEUH4 (ORCPT + 59 others); Wed, 5 Apr 2023 16:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233907AbjDEUHr (ORCPT ); Wed, 5 Apr 2023 16:07:47 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE166E91; Wed, 5 Apr 2023 13:07:45 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id w9so144018411edc.3; Wed, 05 Apr 2023 13:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1680725264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bp+R7zQ4RuR3/A5CmEUbZnCQbbZRzAWmXQ+x2H2Nqa8=; b=EDHQ9Nc5Iomho0GsndGePOSpQlAz/HeGIfX75oWnLOtolzyu/3bPyndHWHabBMU0v/ VLkcpcBiiEzM4pHW9acpmCvDh5o++dbLLundv++CrmpIAKyUDSzCk1A2bhZ8KP1d/NmZ wzqsol8TjCIe+oy4iM2/uqkLXPr3EiwdWUG1wNYOhtAS7SkFM+D3v0O2MwtMjeGxhZPm PJHDB+LlBghrkdcrBJt0IEdo/SMtvTpzJEyVEvrj+BRZh/NHz/79Qh1xZWb9lS4K7JkL jarxEVtpT/eWwgeYPkjO2fOrGUHA1kh4uSkS7jFTSl8WCk64a77IOwA5nLW95+7fCkMM cqyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680725264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bp+R7zQ4RuR3/A5CmEUbZnCQbbZRzAWmXQ+x2H2Nqa8=; b=mTiNolVzLKHQBeng5ZBA81C+3qdnGYwtaPLAF2AvlWBvgISHqGXCS3+oyewSMeuS6u 1ULHurcqYwAzVHC0TyBTj8oNclJnoZ3TBWt6OTq8AG9IjTVeCSXUOFv3oAQCJaprE51E 8PnLR67wA9lbe/Zau0vsTSGo0bVF28kr7KzntKBCFH08ETGLx/8s1UInGjdjAZ3hgCk3 2+ojcdoJDcaBTYCX1PI1WiNtsVoZSkxl8+X9nKsR1f1UO8Af4qGomRgy6mjowr1tm5om 6wyfXlGUJeRCUCybb0cBMAWl5hpYXVxh4Jey8Fj2N3gP2MCG2GmYRGLy5XIoox8N4T7Z KxyA== X-Gm-Message-State: AAQBX9fCn0W3t0HE2pkBzr09DU9yxi7wME6f1eeBb5KQSLeoM5Of1maE 0rJK/kvb2wpviQqqSaTwM94FWypYVoyWPA== X-Received: by 2002:a17:906:c2c2:b0:933:2f77:ca78 with SMTP id ch2-20020a170906c2c200b009332f77ca78mr3967185ejb.28.1680725263699; Wed, 05 Apr 2023 13:07:43 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a01-0c22-7a4e-3100-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:7a4e:3100::e63]) by smtp.googlemail.com with ESMTPSA id a23-20020a170906369700b0092a59ee224csm7724873ejc.185.2023.04.05.13.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 13:07:43 -0700 (PDT) From: Martin Blumenstingl To: linux-wireless@vger.kernel.org Cc: Yan-Hsuan Chuang , Kalle Valo , Ulf Hansson , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, Chris Morgan , Nitin Gupta , Neo Jou , Pkshih , Jernej Skrabec , Larry Finger , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Simon Horman , Martin Blumenstingl Subject: [PATCH v5 8/9] wifi: rtw88: Add support for the SDIO based RTL8822CS chipset Date: Wed, 5 Apr 2023 22:07:28 +0200 Message-Id: <20230405200729.632435-9-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405200729.632435-1-martin.blumenstingl@googlemail.com> References: <20230405200729.632435-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wire up RTL8822CS chipset support using the new rtw88 SDIO HCI code as well as the existing RTL8822C chipset code. Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl --- Changes since v4: - none Changes since v3: - add Ping-Ke's reviewed-by Changes since v2: - sort includes alphabetically as suggested by Ping-Ke - add missing #include "main.h" (after it has been removed from sdio.h in patch 2 from this series) Changes since v1: - use /* ... */ style for copyright comments drivers/net/wireless/realtek/rtw88/Kconfig | 11 ++++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 ++ .../net/wireless/realtek/rtw88/rtw8822cs.c | 36 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cs.c diff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig index 0cfc68dcc416..6b65da81127f 100644 --- a/drivers/net/wireless/realtek/rtw88/Kconfig +++ b/drivers/net/wireless/realtek/rtw88/Kconfig @@ -78,6 +78,17 @@ config RTW88_8822CE 802.11ac PCIe wireless network adapter +config RTW88_8822CS + tristate "Realtek 8822CS SDIO wireless network adapter" + depends on MMC + select RTW88_CORE + select RTW88_SDIO + select RTW88_8822C + help + Select this option will enable support for 8822CS chipset + + 802.11ac SDIO wireless network adapter + config RTW88_8822CU tristate "Realtek 8822CU USB wireless network adapter" depends on USB diff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile index 2b8f4dd9707f..6105c2745bda 100644 --- a/drivers/net/wireless/realtek/rtw88/Makefile +++ b/drivers/net/wireless/realtek/rtw88/Makefile @@ -38,6 +38,9 @@ rtw88_8822c-objs := rtw8822c.o rtw8822c_table.o obj-$(CONFIG_RTW88_8822CE) += rtw88_8822ce.o rtw88_8822ce-objs := rtw8822ce.o +obj-$(CONFIG_RTW88_8822CS) += rtw88_8822cs.o +rtw88_8822cs-objs := rtw8822cs.o + obj-$(CONFIG_RTW88_8822CU) += rtw88_8822cu.o rtw88_8822cu-objs := rtw8822cu.o diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822cs.c b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c new file mode 100644 index 000000000000..975e81c824f2 --- /dev/null +++ b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) Martin Blumenstingl + */ + +#include +#include +#include +#include "main.h" +#include "rtw8822c.h" +#include "sdio.h" + +static const struct sdio_device_id rtw_8822cs_id_table[] = { + { + SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, + SDIO_DEVICE_ID_REALTEK_RTW8822CS), + .driver_data = (kernel_ulong_t)&rtw8822c_hw_spec, + }, + {} +}; +MODULE_DEVICE_TABLE(sdio, rtw_8822cs_id_table); + +static struct sdio_driver rtw_8822cs_driver = { + .name = "rtw_8822cs", + .probe = rtw_sdio_probe, + .remove = rtw_sdio_remove, + .id_table = rtw_8822cs_id_table, + .drv = { + .pm = &rtw_sdio_pm_ops, + .shutdown = rtw_sdio_shutdown, + } +}; +module_sdio_driver(rtw_8822cs_driver); + +MODULE_AUTHOR("Martin Blumenstingl "); +MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822cs driver"); +MODULE_LICENSE("Dual BSD/GPL"); -- 2.40.0