Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1220271rwd; Thu, 18 May 2023 09:20:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7tqphLFd9px+DFXk8j+Bk9riqPGZ+OqLGIfq1l02/XhOfDpfJaeKb4NF3NEVqToN6nuJyN X-Received: by 2002:a05:6a20:7350:b0:101:1e75:78e with SMTP id v16-20020a056a20735000b001011e75078emr228673pzc.14.1684426830873; Thu, 18 May 2023 09:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684426830; cv=none; d=google.com; s=arc-20160816; b=iVH5b6bj2gWVUYPPL7yZDNdwqUObvcbXIQFCR3xMWvdRNm4udZqJ6NoMR7nH9QeSqV 4io7LiChsL4bXuwZ2ULsfSkj1gz9iRUCHrClFsLysZy0wTMP+znUH/7IMNhu8UR5xAF4 7DVdlaDywSIQm6gMLjwpUC6UKAUQXr4HlIUGfVu8yWtW63YDCe9LCFOkZx4uWGXVVX2W kyacQSI9YzJSiCnM1raIB/DtOWn28280GbupW7+zz6hXWWeHLsG4H2BqbmUojXsMnW5D LBf+ppZuDLMwMCZE8+NnOeFje77j42IDICJ8BuP9FbhfRk2vp1Q3yfGyOlaZ4IvxLOkc 5Odw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=SKIzA8OB0gilXLQ3wYoxY0i9z9L2Q2SdHoNduhfgknM=; b=TkZwHxtSpgffPA6G9X61Ssr1DivJCJ2FLUB2eGAFv9yYIfvRA6AStf5pEdjzYvKPFd sectbLJZUnoHytH51UOXjYIGdt0KR//WBVHowsTEVshIYrA7dkL8Ithb70zT/w62znIf GVK4kf8/H3NjvyKCxLyffdlXAcVSSpcJHFsZVoH9KxPPQ0sAjeArtnVoWbFIBZ0Ubd5D sAycVzI3B/dCk+M+QP8yOsfxM96e3tFmTWvZXdJ9jV8AfXs+uDGA48GeJ3640Ecee0bb 5x0iQl3Nrb5/51t4DVpT3Mtv82JSsdJClJThqqRqtl88rRK9ZZvXJZDGhTIQfu4pvXWs EDMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20221208 header.b=PmPdJtWO; 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 nu8-20020a17090b1b0800b0023af4ee47dasi5083581pjb.65.2023.05.18.09.20.20; Thu, 18 May 2023 09:20: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=20221208 header.b=PmPdJtWO; 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 S229555AbjERQSB (ORCPT + 62 others); Thu, 18 May 2023 12:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjERQSA (ORCPT ); Thu, 18 May 2023 12:18:00 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AD43130; Thu, 18 May 2023 09:17:59 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-510bcd2d6b8so9599002a12.0; Thu, 18 May 2023 09:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1684426678; x=1687018678; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SKIzA8OB0gilXLQ3wYoxY0i9z9L2Q2SdHoNduhfgknM=; b=PmPdJtWONd5ndRhu4uX2FqTKZFQjaR/onE8LgQ91YW2uSV7I+i+ScER16pPJa53JCS UlbSoMxwKX4d2UxCQHVm0kPhQZqP9dIuLCE3oVS4VS0RIvY9VjgEqchkjFTumehugKZh AyxLM7jkG4pbLmFlJU9z4K5Oaj1XdxiJLr8WBZ7yvexuXOzz7NIbYxMMzMXKHGx+LyXC 5u20Rh/tfPwV1V5J/NjwS+aHNTHcOyuusDCncp6lw6IohpdpmlaM7J/ZlzlVylB6Fn1l deZK47bTGnPw6+C1nywTTSWSn+VxLPJwnCJ8xshbxPKp92gHOSso9yZxaTX11as3fJ2Z irzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684426678; x=1687018678; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SKIzA8OB0gilXLQ3wYoxY0i9z9L2Q2SdHoNduhfgknM=; b=Ir2zV6o1FM3Z9tMdcIOEzKOlT7OwrujFf8iiI22WzR8V4RLOqlMh7/Jg2UWMYpU2i6 vvrvQXSBvz3kVDQVtef8D7d9LpQlu+6cRGALDXPO5FDIKRuu0d4HeB5PHjEIqJ7cMoJY UoZNKiyuP7duS7Pd8dM4MRaTtc/m6XwJjKjToHPIa2e1HeJ7iCVNTiNYpffCaRO1OCST E9GFh4sLyg+OIx6wXPpXRc1ICpVGmqGbLqZN1TjJIAb6glNE7ujZkuyWzOXRDDih0Yor IjQ64YuC3c1nGI7GAeRCAR5Nq3DMQxmgecZFBzNIu8Dk0WhqCND6OkyoPKvFIlCpRv0J mRrw== X-Gm-Message-State: AC+VfDz+tHjV1Q35S1ATcxOOZ8AAq/spCP4r3w+kluxQaa71wphpxLMh VcBQVzEPvEK8SgzGUebbxAbu+GwTyn8= X-Received: by 2002:aa7:da95:0:b0:50b:c456:a72a with SMTP id q21-20020aa7da95000000b0050bc456a72amr6359652eds.19.1684426677397; Thu, 18 May 2023 09:17:57 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a01-0c22-73e5-9e00-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:73e5:9e00::e63]) by smtp.googlemail.com with ESMTPSA id c14-20020aa7c74e000000b0050bc13e5aa9sm756307eds.63.2023.05.18.09.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:17:57 -0700 (PDT) From: Martin Blumenstingl To: linux-wireless@vger.kernel.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, kvalo@kernel.org, tony0620emma@gmail.com, Peter Robinson , Ping-Ke Shih , jernej.skrabec@gmail.com, Martin Blumenstingl Subject: [PATCH wireless-next v1 0/4] wifi: rtw88: Add support for the RTL8723DS SDIO wifi chip Date: Thu, 18 May 2023 18:17:45 +0200 Message-Id: <20230518161749.1311949-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 This series adds support for the RTL823DS SDIO wifi chip. It builds on the SDIO support which was recently merged into the rtw88 driver. With the initial rtw88 SDIO support code the aim was to support these older (802.11n) chips as well but we didn't have any way to test that. Overall we spotted all corner cases in the vendor driver except one: On these older chips REG_SDIO_RX0_REQ_LEN should only be read when REG_SDIO_HISR has the REG_SDIO_HISR_RX_REQUEST bit set. Patch 1 adds support for that. RTL8723DS comes in two variant and each of them has their own SDIO ID: - 0xd723 can connect two antennas. The WiFi part is still 1x1 so the second antenna can be dedicated to Bluetooth - 0xd724 can only connect one antenna so it's shared between WiFi and Bluetooth Thanks to Ping-Ke for these insights! This series adds the missing SDIO ID and renames the existing 0xd723 SDIO ID (which we previously added) with patch 3. The rest is straight forward: patch 2 adds support for parsing the eFuse and patch 4 wires everything together by creating a driver for the RTL8723DS. In my own tests on a MangoPi MQ-Quad I get the following results in iperf3 (with the device being better placed than my RTL8822CS): - RX: 48 Mbit/s - TX: 33 Mbit/s Dependencies: - commit cb0ddaaa5db0 ("wifi: rtw88: sdio: Always use two consecutive bytes for word operations") from wireless.git is needed for patch 1 from this series to apply with the exact line numbers. This commit is a runtime dependency on Allwinner SoCs (like it's used on the MangoPI MQ-Quad). Martin Blumenstingl (4): wifi: rtw88: sdio: Check the HISR RX_REQUEST bit in rtw_sdio_rx_isr() wifi: rtw88: rtw8723d: Implement RTL8723DS (SDIO) efuse parsing mmc: sdio: Add/rename SDIO ID of the RTL8723DS SDIO wifi cards wifi: rtw88: Add support for the SDIO based RTL8723DS chipset drivers/net/wireless/realtek/rtw88/Kconfig | 11 +++++ drivers/net/wireless/realtek/rtw88/Makefile | 3 ++ drivers/net/wireless/realtek/rtw88/rtw8723d.c | 9 ++++ drivers/net/wireless/realtek/rtw88/rtw8723d.h | 6 +++ .../net/wireless/realtek/rtw88/rtw8723ds.c | 41 +++++++++++++++++++ drivers/net/wireless/realtek/rtw88/sdio.c | 23 +++++++++-- include/linux/mmc/sdio_ids.h | 3 +- 7 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723ds.c -- 2.40.1