Skip to contentSkip to conversation

wifi: brcmfmac: Add support for the SDIO 43751 device

PATCH In review Fabio Estevam 2 participants 3 messages Jul 12, 2025 – Jul 18, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wifi: brcmfmac: Add support for the SDIO 43751 device

Add the SDIO ID and firmware matching for the 43751 device.

Based on the previous work from Marc Gonzalez <[email protected]>.

Tested on an i.MX6DL board connected to an AP6398SV chip with the brcmfmac43752-sdio.bin firmware taken from:

https://source.puri.sm/Librem5/firmware-brcm43752-nonfree

---
Changes since v1:
- Do not declare 43751 as a Infineon/Cypress device. (Gokul)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c    | 1 +
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c      | 2 ++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c      | 5 ++++-
 .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h    | 1 +
 include/linux/mmc/sdio_ids.h                                 | 1 +
 5 files changed, 9 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +1 -0
index 6bc107476a2a..8ab7d1e34a6e 100644
@@ -996,6 +996,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = {
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354, WCC),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356, WCC),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359, WCC),
+	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43751, WCC),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373, CYW),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012, CYW),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752, CYW),
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +2 -0
index 2ef92ef25517..9074ab49e806 100644
@@ -739,6 +739,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)
 	case CY_CC_4373_CHIP_ID:
 		return 0x160000;
 	case CY_CC_43752_CHIP_ID:
+	case BRCM_CC_43751_CHIP_ID:
 	case BRCM_CC_4377_CHIP_ID:
 		return 0x170000;
 	case BRCM_CC_4378_CHIP_ID:
@@ -1450,6 +1451,7 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub)
 		reg = chip->ops->read32(chip->ctx, addr);
 		return (reg & CC_SR_CTL0_ENABLE_MASK) != 0;
 	case BRCM_CC_4359_CHIP_ID:
+	case BRCM_CC_43751_CHIP_ID:
 	case CY_CC_43752_CHIP_ID:
 	case CY_CC_43012_CHIP_ID:
 		addr = CORE_CC_REG(pmu->base, retention_ctl);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +4 -1
index cf26ab15ee0c..8a0bad5119a0 100644
@@ -654,6 +654,7 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
 	BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
 	BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
 	BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
+	BRCMF_FW_ENTRY(BRCM_CC_43751_CHIP_ID, 0xFFFFFFFF, 43752),
 	BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373),
 	BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012),
 	BRCMF_FW_ENTRY(CY_CC_43439_CHIP_ID, 0xFFFFFFFF, 43439),
@@ -3424,7 +3425,8 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus,
 
 static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus)
 {
-	if (bus->ci->chip == CY_CC_43012_CHIP_ID ||
+	if (bus->ci->chip == BRCM_CC_43751_CHIP_ID ||
+	    bus->ci->chip == CY_CC_43012_CHIP_ID ||
 	    bus->ci->chip == CY_CC_43752_CHIP_ID)
 		return true;
 	else
@@ -4275,6 +4277,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
 				   bus->hostintmask, NULL);
 
 		switch (sdiod->func1->device) {
+		case SDIO_DEVICE_ID_BROADCOM_43751:
 		case SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373:
 		case SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752:
 			brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n",
drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +1 -0
index c1e22c589d85..6564616a57df 100644
@@ -52,6 +52,7 @@
 #define BRCM_CC_43664_CHIP_ID		43664
 #define BRCM_CC_43666_CHIP_ID		43666
 #define BRCM_CC_4371_CHIP_ID		0x4371
+#define BRCM_CC_43751_CHIP_ID		43751
 #define BRCM_CC_43752_CHIP_ID		43752
 #define BRCM_CC_4377_CHIP_ID		0x4377
 #define BRCM_CC_4378_CHIP_ID		0x4378
include/linux/mmc/sdio_ids.h +1 -0
index 7cddfdac2f57..fe3d6d98f8da 100644
@@ -76,6 +76,7 @@
 #define SDIO_DEVICE_ID_BROADCOM_43430		0xa9a6
 #define SDIO_DEVICE_ID_BROADCOM_43439		0xa9af
 #define SDIO_DEVICE_ID_BROADCOM_43455		0xa9bf
+#define SDIO_DEVICE_ID_BROADCOM_43751		0xaae7
 #define SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752	0xaae8
 
 #define SDIO_VENDOR_ID_CYPRESS			0x04b4
Signature · 1 line
2.34.1
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · Fabio Estevam

Add the SDIO ID and firmware matching for the 43751 device.

Based on the previous work from Marc Gonzalez <[email protected]>.

Tested on an i.MX6DL board connected to an AP6398SV chip with the brcmfmac43752-sdio.bin firmware taken from:

https://source.puri.sm/Librem5/firmware-brcm43752-nonfree

These chips seem to be shipped by Synaptics so maybe worth adding that in the commit message(?). Other than that it looks fine so...

Quoted 10 lines

---
Changes since v1:
- Do not declare 43751 as a Infineon/Cypress device. (Gokul)

  drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c    | 1 +
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c      | 2 ++
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c      | 5 ++++-
  .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h    | 1 +
  include/linux/mmc/sdio_ids.h                                 | 1 +
  5 files changed, 9 insertions(+), 1 deletion(-)
#2 lore raw

Hi Arend,

Quoted 6 lines · Arend van Spriel
Quoted 4 lines · Fabio Estevam

Add the SDIO ID and firmware matching for the 43751 device.

Based on the previous work from Marc Gonzalez <[email protected]>.

Quoted 7 lines
Quoted 4 lines

Tested on an i.MX6DL board connected to an AP6398SV chip with the brcmfmac43752-sdio.bin firmware taken from:

https://source.puri.sm/Librem5/firmware-brcm43752-nonfree

These chips seem to be shipped by Synaptics so maybe worth adding that in the commit message(?). Other than that it looks fine so...

I don't have any evidence that the Ampak AP6398SV contains a Synaptics chip.

The link you shared earlier is about the AP6398S (without the V):

https://www.ampak.com.tw/product/WiFi-Bluetooth/Stamp-Type-2T2R/AP6398S

The AP6398S works out of the box with mainline Linux. The AP6398SV does not work with mainline Linux and requires the patch I sent here.

Quoted 1 line

Thanks!