Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2173844rdh; Sun, 29 Oct 2023 04:19:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnETXc+5Tht8oOjnizyX2dpGNI+dDDwh8RYrwn4xkg7FjJ6dpZbiTyYXddyWQQaoJxIaag X-Received: by 2002:a05:6a00:16c3:b0:6be:7ee:9914 with SMTP id l3-20020a056a0016c300b006be07ee9914mr5986742pfc.11.1698578373263; Sun, 29 Oct 2023 04:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698578373; cv=none; d=google.com; s=arc-20160816; b=TXLxVQBmNVHM9oDB6HGGBBbEuvl9eygmGjlJcg1/qyKg1tJTuWP6xS/UE+/aTe4RFB EGq2y2KL2By3gOBPVjpljEtkv9hAzbxM40wEo4zxbLu9NYqo4I/IvwanHMoJV5O14+EN YKeO9M0ohi+LyVic5B0VpFwGBM/+BtPKDv2iwEpVhEZKn8kOYDClaZCYHkuwjpVA9xo4 Cx53RBCDtj307mT/b0yoWsDfRT6jW23QSiyqcVSW67l15Z8ziHEnbOWLH6y4yEJpqU34 NRK0ATYnPSgo++FFSDvARFrUVt6cWeY0wc6tcpi258snfb2ThHfjeaHL9agSKWsT1n2u B0uw== 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; bh=fT3mw16PxBm5oMmCYkAJPMO+kDKpTpQTH0PPnuBC3T8=; fh=MnWs4p80MwyJpRhld/EyN3LWHM+ABZud1/kTF6slAso=; b=J3iC6OvcRtgPznlv4GtdwQ2+Lh82dFzibHcY6UpoJdUY5NGhvOsp2ar49jpJ4JSfwH JZ7JYyYvbkbVHW9YS2eK5cdsy4HIJJCSK+9NzNpnGVBec/B3R3QT99SDN9zIZXEnDU7Q 972Y8dFrNs+dDQ8R4NhMfescXm281zlEDqB7AZz8cotmbMIb5skcxREMig39mDqfimpN epiCgeFMyaRDt/L7z7wtuHVdewn9kZC2sny4l0FoB+6JECVj/o3pXYonTnrS7ou91uTr ZAOZ5wCk03GWQ0QKj9oCZx7AK+r08pxT/2VD87vKn7+KJ/1MR/k7xiQrL7fxw+dPED+y VZjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v2-20020aa799c2000000b00690ca3d66bbsi3490800pfi.262.2023.10.29.04.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 04:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DFA5F80A9917; Sun, 29 Oct 2023 04:19:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbjJ2LT0 (ORCPT + 99 others); Sun, 29 Oct 2023 07:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjJ2LTS (ORCPT ); Sun, 29 Oct 2023 07:19:18 -0400 Received: from smtp1.ms.mff.cuni.cz (smtp1.ms.mff.cuni.cz [IPv6:2001:718:1e03:801::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEE38AB; Sun, 29 Oct 2023 04:19:15 -0700 (PDT) X-SubmittedBy: id balejk@matfyz.cz subject /postalCode=110+2000/O=Univerzita+20Karlova/street=Ovocn+5CxC3+5CxBD+20trh+20560/5/ST=Praha,+20Hlavn+5CxC3+5CxAD+20m+5CxC4+5Cx9Bsto/C=CZ/CN=Karel+20Balej/emailAddress=balejk@matfyz.cz serial F5FD910E8FE2121B897F7E55B84E351D issued by /C=NL/O=GEANT+20Vereniging/CN=GEANT+20Personal+20CA+204 auth type TLS.CUNI Received: from localhost (internet5.mraknet.com [185.200.108.250]) (authenticated) by smtp1.ms.mff.cuni.cz (8.16.1/8.16.1) with ESMTPS id 39TBItej065444 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Sun, 29 Oct 2023 12:18:57 +0100 (CET) (envelope-from balejk@matfyz.cz) From: Karel Balej To: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Brian Norris , Ulf Hansson , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: =?UTF-8?q?Duje=20Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Karel Balej Subject: [PATCH 2/2] net: mwifiex: add support for the SD8777 chipset Date: Sun, 29 Oct 2023 12:08:17 +0100 Message-ID: <20231029111807.19261-3-balejk@matfyz.cz> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029111807.19261-1-balejk@matfyz.cz> References: <20231029111807.19261-1-balejk@matfyz.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 29 Oct 2023 04:19:32 -0700 (PDT) Marvell SD8777 is a wireless chipset used for instance in the PXA1908 SoC found for example in the samsung,coreprimevelte smartphone, with which this was tested. The driver seems to be compatible with this chipset so enable this support by adding the necessary information based on the downstream code. Signed-off-by: Karel Balej --- drivers/net/wireless/marvell/mwifiex/Kconfig | 4 ++-- drivers/net/wireless/marvell/mwifiex/sdio.c | 19 +++++++++++++++++++ drivers/net/wireless/marvell/mwifiex/sdio.h | 1 + include/linux/mmc/sdio_ids.h | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/Kconfig b/drivers/net/wireless/marvell/mwifiex/Kconfig index b182f7155d66..a7bd2c5735f6 100644 --- a/drivers/net/wireless/marvell/mwifiex/Kconfig +++ b/drivers/net/wireless/marvell/mwifiex/Kconfig @@ -10,13 +10,13 @@ config MWIFIEX mwifiex. config MWIFIEX_SDIO - tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8978/SD8987/SD8997" + tristate "Marvell WiFi-Ex Driver for SD8777/SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8978/SD8987/SD8997" depends on MWIFIEX && MMC select FW_LOADER select WANT_DEV_COREDUMP help This adds support for wireless adapters based on Marvell - 8786/8787/8797/8887/8897/8977/8978/8987/8997 chipsets with + 8777/8786/8787/8797/8887/8897/8977/8978/8987/8997 chipsets with SDIO interface. SD8978 is also known as NXP IW416. If you choose to build it as a module, it will be called diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 774858cfe86f..c55f1f5669cb 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -318,6 +318,21 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd89xx = { 0x68, 0x69, 0x6a}, }; +static const struct mwifiex_sdio_device mwifiex_sdio_sd8777 = { + .firmware = SD8777_DEFAULT_FW_NAME, + .reg = &mwifiex_reg_sd87xx, + .max_ports = 16, + .mp_agg_pkt_limit = 8, + .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K, + .mp_tx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_16K, + .mp_rx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_16K, + .supports_sdio_new_mode = false, + .has_control_mask = true, + .can_dump_fw = false, + .can_auto_tdls = false, + .can_ext_scan = true, +}; + static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = { .firmware = SD8786_DEFAULT_FW_NAME, .reg = &mwifiex_reg_sd87xx, @@ -496,6 +511,7 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = { }; static const struct of_device_id mwifiex_sdio_of_match_table[] __maybe_unused = { + { .compatible = "marvell,sd8777" }, { .compatible = "marvell,sd8787" }, { .compatible = "marvell,sd8897" }, { .compatible = "marvell,sd8978" }, @@ -924,6 +940,8 @@ static void mwifiex_sdio_coredump(struct device *dev) /* WLAN IDs */ static const struct sdio_device_id mwifiex_ids[] = { + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8777_WLAN), + .driver_data = (unsigned long)&mwifiex_sdio_sd8777}, {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8786_WLAN), .driver_data = (unsigned long) &mwifiex_sdio_sd8786}, {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8787_WLAN), @@ -3180,6 +3198,7 @@ MODULE_AUTHOR("Marvell International Ltd."); MODULE_DESCRIPTION("Marvell WiFi-Ex SDIO Driver version " SDIO_VERSION); MODULE_VERSION(SDIO_VERSION); MODULE_LICENSE("GPL v2"); +MODULE_FIRMWARE(SD8777_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8786_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8787_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8797_DEFAULT_FW_NAME); diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h index ae94c172310f..ed92256b2302 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.h +++ b/drivers/net/wireless/marvell/mwifiex/sdio.h @@ -18,6 +18,7 @@ #include "main.h" +#define SD8777_DEFAULT_FW_NAME "mrvl/sd8777_uapsta.bin" #define SD8786_DEFAULT_FW_NAME "mrvl/sd8786_uapsta.bin" #define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin" #define SD8797_DEFAULT_FW_NAME "mrvl/sd8797_uapsta.bin" diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 7fada7a714fe..c46ab35ceb20 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -94,6 +94,7 @@ #define SDIO_DEVICE_ID_MARVELL_8797_BT 0x912a #define SDIO_DEVICE_ID_MARVELL_8897_WLAN 0x912d #define SDIO_DEVICE_ID_MARVELL_8897_BT 0x912e +#define SDIO_DEVICE_ID_MARVELL_8777_WLAN 0x9131 #define SDIO_DEVICE_ID_MARVELL_8887_F0 0x9134 #define SDIO_DEVICE_ID_MARVELL_8887_WLAN 0x9135 #define SDIO_DEVICE_ID_MARVELL_8887_BT 0x9136 -- 2.42.0