Skip to contentSkip to conversation

wifi: nxpwifi: add support for SDIO IW610

PATCH In review Jeff Chen 2 participants 7 messages Sep 8 – Sep 11

Subsystems (3)
lore
Share & tools
lore

Jeff Chen

author
#0 lore raw

cover wifi: nxpwifi: add support for SDIO IW610

From: Jeff Chen <[email protected]>

This series adds support for the NXP SDIO IW610 to the nxpwifi driver.

IW610 uses different SDIO device IDs and a different firmware image from the existing IW61x devices. It shares the same SDIO register layout, so most of the existing SDIO support can be reused.

The first two patches update the MMC subsystem. They add the SDIO IDs needed by IW610 and apply the required MMC_QUIRK_BLKSZ_FOR_BYTE_MODE quirk. The last two patches add SDIO IW610 support to nxpwifi and limit channel width requests based on firmware capabilities.

Ulf, could you please Ack patches 1 and 2?

[1/4] mmc: sdio: add NXP IW610 device ID

        Add SDIO device ID 0x0215 for IW610.

[2/4] mmc: core: add IW610 base ID and block-size quirk

        Add base card ID 0x0214 and apply
        MMC_QUIRK_BLKSZ_FOR_BYTE_MODE.

[3/4] wifi: nxpwifi: add support for SDIO IW610
Add the IW610 device descriptor and firmware name.

[4/4] wifi: nxpwifi: restrict channel width on 20 MHz-only hardware
Do not request 40 MHz or 80 MHz operation when the firmware does not support it.

Tested on:
- NXP i.MX93 EVK running the NXP BSP kernel
- Lenovo ThinkPad T430 running current wireless-next

Jeff Chen (4):
mmc: sdio: add NXP IW610 device ID
mmc: core: add NXP IW610 base ID and block size quirk
wifi: nxpwifi: Add support for SDIO-based IW610
wifi: nxpwifi: Limit channel width based on firmware capability

 drivers/mmc/core/quirks.h               |  3 +++
 drivers/net/wireless/nxp/nxpwifi/11n.c  |  4 +++-
 drivers/net/wireless/nxp/nxpwifi/fw.h   |  2 ++
 drivers/net/wireless/nxp/nxpwifi/sdio.c | 16 ++++++++++++++++
 drivers/net/wireless/nxp/nxpwifi/sdio.h |  1 +
 include/linux/mmc/sdio_ids.h            |  2 ++
 6 files changed, 27 insertions(+), 1 deletion(-)

base-commit: 1b60ed34f712e9f606d80951f1586f4274ebadf1

Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/4 mmc: sdio: add NXP IW610 device ID

From: Jeff Chen <[email protected]>

Add SDIO device ID (0x0215) for NXP IW610 to sdio_ids.h. It is used by the nxpwifi driver to probe the IW610 chip over SDIO.

---
 include/linux/mmc/sdio_ids.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/mmc/sdio_ids.h +1 -0
index afae93f6f245..5eff5e348eb0 100644
@@ -123,6 +123,7 @@
 #define SDIO_VENDOR_ID_NXP			0x0471
 #define SDIO_DEVICE_ID_NXP_IW61X_BASE		0x0204
 #define SDIO_DEVICE_ID_NXP_IW61X		0x0205
+#define SDIO_DEVICE_ID_NXP_IW610		0x0215
 
 #define SDIO_VENDOR_ID_REALTEK			0x024c
 #define SDIO_DEVICE_ID_REALTEK_RTW8723BS	0xb723
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH 2/4 mmc: core: add NXP IW610 base ID and block size quirk

In reply to Jeff Chen

From: Jeff Chen <[email protected]>

The NXP IW610 SDIO chipset identifies itself with a base card ID (0x0214) during the initial MMC bus scan, whereas the WLAN function reports a different ID (0x0215).

Like the IW61x, the IW610 requires MMC_QUIRK_BLKSZ_FOR_BYTE_MODE for correct byte-mode block size handling. Since SDIO fixups are applied before function devices are enumerated, the quirk must be associated with the base card ID rather than the WLAN function ID.

Add the SDIO_DEVICE_ID_NXP_IW610_BASE definition and apply the required fixup in the SDIO quirk table.

---
 drivers/mmc/core/quirks.h    | 3 +++
 include/linux/mmc/sdio_ids.h | 1 +
 2 files changed, 4 insertions(+)
drivers/mmc/core/quirks.h +3 -0
index ae3ece89d0aa..98cb680e3ace 100644
@@ -211,6 +211,9 @@ static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = {
 	SDIO_FIXUP(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW61X_BASE,
 		   add_quirk, MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
 
+	SDIO_FIXUP(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW610_BASE,
+		   add_quirk, MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
+
 	END_FIXUP
 };
 
include/linux/mmc/sdio_ids.h +1 -0
index 5eff5e348eb0..dfffda3d8002 100644
@@ -123,6 +123,7 @@
 #define SDIO_VENDOR_ID_NXP			0x0471
 #define SDIO_DEVICE_ID_NXP_IW61X_BASE		0x0204
 #define SDIO_DEVICE_ID_NXP_IW61X		0x0205
+#define SDIO_DEVICE_ID_NXP_IW610_BASE		0x0214
 #define SDIO_DEVICE_ID_NXP_IW610		0x0215
 
 #define SDIO_VENDOR_ID_REALTEK			0x024c
Signature · 1 line
2.34.1
author
#5 lore raw

PATCH 3/4 wifi: nxpwifi: Add support for SDIO-based IW610

In reply to Jeff Chen

From: Jeff Chen <[email protected]>

Add the IW610 SDIO device ID to the supported device table. This enables driver probing, interface initialization, and firmware download for the NXP IW610 wireless chipset.

Assisted-by Claude:claude-opus-4-8
---
 drivers/net/wireless/nxp/nxpwifi/sdio.c | 16 ++++++++++++++++
 drivers/net/wireless/nxp/nxpwifi/sdio.h |  1 +
 2 files changed, 17 insertions(+)
drivers/net/wireless/nxp/nxpwifi/sdio.c +16 -0
index 8ef0f6eb49e2..f4de494bf2f2 100644
@@ -96,6 +96,19 @@ static const struct nxpwifi_sdio_device nxpwifi_sdio_iw61x = {
 	.can_ext_scan = true,
 };
 
+static const struct nxpwifi_sdio_device nxpwifi_sdio_iw610 = {
+	.firmware = IW610_SDIO_FW_NAME,
+	.reg = &nxpwifi_reg_iw61x,
+	.max_ports = 32,
+	.mp_agg_pkt_limit = 16,
+	.tx_buf_size = NXPWIFI_TX_DATA_BUF_SIZE_4K,
+	.mp_tx_agg_buf_size = NXPWIFI_MP_AGGR_BSIZE_MAX,
+	.mp_rx_agg_buf_size = NXPWIFI_MP_AGGR_BSIZE_MAX,
+	.can_dump_fw = true,
+	.fw_dump_enh = true,
+	.can_ext_scan = true,
+};
+
 static struct memory_type_mapping generic_mem_type_map[] = {
 	{"DUMP", NULL, 0, 0xDD},
 };
@@ -458,6 +471,8 @@ static void nxpwifi_sdio_coredump(struct device *dev)
 static const struct sdio_device_id nxpwifi_ids[] = {
 	{SDIO_DEVICE(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW61X),
 		.driver_data = (unsigned long)&nxpwifi_sdio_iw61x},
+	{SDIO_DEVICE(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW610),
+		.driver_data = (unsigned long)&nxpwifi_sdio_iw610},
 	{},
 };
 
@@ -2326,3 +2341,4 @@ MODULE_DESCRIPTION("NXP WiFi SDIO Driver version " SDIO_VERSION);
 MODULE_VERSION(SDIO_VERSION);
 MODULE_LICENSE("GPL");
 MODULE_FIRMWARE(IW61X_SDIO_FW_NAME);
+MODULE_FIRMWARE(IW610_SDIO_FW_NAME);
drivers/net/wireless/nxp/nxpwifi/sdio.h +1 -0
index de5c884a5b14..e9881448fe2f 100644
@@ -11,6 +11,7 @@
 #include "main.h"
 
 #define IW61X_SDIO_FW_NAME     "nxp/sd_w61x_v1.bin.se"
+#define IW610_SDIO_FW_NAME     "nxp/sd_iw610.bin.se"
 
 #define BLOCK_MODE	1
 #define BYTE_MODE	0
Signature · 1 line
2.34.1
author
#6 lore raw

PATCH 4/4 wifi: nxpwifi: Limit channel width based on firmware capability

In reply to Jeff Chen

From: Jeff Chen <[email protected]>

nxpwifi_cmd_append_11n_tlv() derived the channel width solely from the AP's advertised operating bandwidth and could request 40/80 MHz operation even when the firmware did not support it.

On 20 MHz-only devices such as IW610, this may cause the firmware to be configured with an unsupported channel width.

Check firmware bandwidth capabilities before selecting the channel width:
- Allow 80 MHz only when ISSUPP_NO_80MHZ() is false.
- Allow 40 MHz only when ISSUPP_40MHZ_ENABLED() is true.
- Otherwise fall back to 20 MHz operation.

Assisted-by Claude:claude-opus-4-8
---
 drivers/net/wireless/nxp/nxpwifi/11n.c | 4 +++-
 drivers/net/wireless/nxp/nxpwifi/fw.h  | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/net/wireless/nxp/nxpwifi/11n.c +3 -1
index c2a54d781b42..a83e29ecc466 100644
@@ -349,6 +349,7 @@ nxpwifi_cmd_append_11n_tlv(struct nxpwifi_private *priv,
 			nxpwifi_band_to_radio_type((u8)bss_desc->bss_band);
 
 		if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
+		    !ISSUPP_NO_80MHZ(priv->adapter->fw_cap_ext) &&
 		    bss_desc->bcn_vht_oper &&
 		    bss_desc->bcn_vht_oper->chan_width ==
 		    IEEE80211_VHT_CHANWIDTH_80MHZ) {
@@ -359,7 +360,8 @@ nxpwifi_cmd_append_11n_tlv(struct nxpwifi_private *priv,
 				((CHAN_BW_80MHZ <<
 				  BAND_CFG_CHAN_WIDTH_SHIFT_BIT) &
 				 BAND_CFG_CHAN_WIDTH_MASK);
-		} else if (sband->ht_cap.cap &
+		} else if (ISSUPP_40MHZ_ENABLED(priv->adapter->fw_cap_ext) &&
+			   sband->ht_cap.cap &
 			   IEEE80211_HT_CAP_SUP_WIDTH_20_40 &&
 			   bss_desc->bcn_ht_oper->ht_param &
 			   IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) {
drivers/net/wireless/nxp/nxpwifi/fw.h +2 -0
index 188110b020cf..124728a72442 100644
@@ -334,6 +334,8 @@ enum NXPWIFI_802_11_PRIVACY_FILTER {
 #define DFS_CHAN_MOVE_TIME      10000
 
 #define ISSUPP_11AXENABLED(fw_cap_ext) ((fw_cap_ext) & BIT(7))
+#define ISSUPP_NO_80MHZ(fw_cap_ext)      ((fw_cap_ext) & BIT(8))
+#define ISSUPP_40MHZ_ENABLED(fw_cap_ext) ((fw_cap_ext) & BIT(15))
 
 #define HOST_CMD_GET_HW_SPEC                       0x0003
 #define HOST_CMD_802_11_SCAN                       0x0006
Signature · 1 line
2.34.1
Acked-by on v1 1/4
#2 lore raw

Re: [PATCH wireless-next 1/4] mmc: sdio: add NXP IW610 device ID

In reply to Jeff Chen
Quoted 7 lines · Jeff Chen

From: Jeff Chen <[email protected]>

Add SDIO device ID (0x0215) for NXP IW610 to sdio_ids.h. It is used by the nxpwifi driver to probe the IW610 chip over SDIO.

Kind regards
Uffe

Quoted 19 lines
---
 include/linux/mmc/sdio_ids.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/mmc/sdio_ids.h +1 -1
index afae93f6f245..5eff5e348eb0 100644
@@ -123,6 +123,7 @@
 #define SDIO_VENDOR_ID_NXP                     0x0471
 #define SDIO_DEVICE_ID_NXP_IW61X_BASE          0x0204
 #define SDIO_DEVICE_ID_NXP_IW61X               0x0205
+#define SDIO_DEVICE_ID_NXP_IW610               0x0215
 
 #define SDIO_VENDOR_ID_REALTEK                 0x024c
 #define SDIO_DEVICE_ID_REALTEK_RTW8723BS       0xb723
--

2.34.1

Acked-by on v1 2/4
#4 lore raw

Re: [PATCH wireless-next 2/4] mmc: core: add NXP IW610 base ID and block size quirk

In reply to Jeff Chen
Quoted 12 lines · Jeff Chen

From: Jeff Chen <[email protected]>

The NXP IW610 SDIO chipset identifies itself with a base card ID (0x0214) during the initial MMC bus scan, whereas the WLAN function reports a different ID (0x0215).

Like the IW61x, the IW610 requires MMC_QUIRK_BLKSZ_FOR_BYTE_MODE for correct byte-mode block size handling. Since SDIO fixups are applied before function devices are enumerated, the quirk must be associated with the base card ID rather than the WLAN function ID.

Quoted 4 lines

Add the SDIO_DEVICE_ID_NXP_IW610_BASE definition and apply the required fixup in the SDIO quirk table.

Kind regards
Uffe

Quoted 34 lines
---
 drivers/mmc/core/quirks.h    | 3 +++
 include/linux/mmc/sdio_ids.h | 1 +
 2 files changed, 4 insertions(+)
drivers/mmc/core/quirks.h +3 -0
index ae3ece89d0aa..98cb680e3ace 100644
@@ -211,6 +211,9 @@ static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = {
        SDIO_FIXUP(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW61X_BASE,
                   add_quirk, MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
 
+       SDIO_FIXUP(SDIO_VENDOR_ID_NXP, SDIO_DEVICE_ID_NXP_IW610_BASE,
+                  add_quirk, MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
+
        END_FIXUP
 };
 
include/linux/mmc/sdio_ids.h +1 -1
index 5eff5e348eb0..dfffda3d8002 100644
@@ -123,6 +123,7 @@
 #define SDIO_VENDOR_ID_NXP                     0x0471
 #define SDIO_DEVICE_ID_NXP_IW61X_BASE          0x0204
 #define SDIO_DEVICE_ID_NXP_IW61X               0x0205
+#define SDIO_DEVICE_ID_NXP_IW610_BASE          0x0214
 #define SDIO_DEVICE_ID_NXP_IW610               0x0215
 
 #define SDIO_VENDOR_ID_REALTEK                 0x024c
--

2.34.1