brcmfmac: add BCM43241 sdio interface driver support
authorFranky Lin <frankyl@broadcom.com>
Thu, 30 Aug 2012 17:42:59 +0000 (19:42 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Sep 2012 19:03:43 +0000 (15:03 -0400)
BCM43241 is an 11abg and 2x2 11n Wifi/BT/FM combo chip that
supports 40MHz channel width. This patch intends to enable
the driver support for the chip through SDIO bus interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
drivers/net/wireless/brcm80211/include/brcm_hw_ids.h

index 49765d34b4e0b43ac947aa360fb58d1fff88aa90..e0b313c7f5ce48ced1512cc7a3c6c2fc85260515 100644 (file)
@@ -42,6 +42,7 @@
 
 #define DMA_ALIGN_MASK 0x03
 
+#define SDIO_DEVICE_ID_BROADCOM_43241  0x4324
 #define SDIO_DEVICE_ID_BROADCOM_4329   0x4329
 #define SDIO_DEVICE_ID_BROADCOM_4330   0x4330
 #define SDIO_DEVICE_ID_BROADCOM_4334   0x4334
@@ -51,6 +52,7 @@
 
 /* devices we support, null terminated */
 static const struct sdio_device_id brcmf_sdmmc_ids[] = {
+       {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43241)},
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4329)},
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4330)},
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4334)},
index 472f2ef5c65237b9bb52f577723a3fed734a5041..2dd6b48b8825b6b9a1cf8fd3b6ad3ad3b16d9027 100644 (file)
@@ -3881,6 +3881,8 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)
 
 static bool brcmf_sdbrcm_chipmatch(u16 chipid)
 {
+       if (chipid == BCM43241_CHIP_ID)
+               return true;
        if (chipid == BCM4329_CHIP_ID)
                return true;
        if (chipid == BCM4330_CHIP_ID)
index 58155e23d220fecc5f985be109901bbfce42070b..9434440bbc6536054b592588f9ef4d1bce73bd22 100644 (file)
@@ -377,6 +377,23 @@ static int brcmf_sdio_chip_recognition(struct brcmf_sdio_dev *sdiodev,
 
        /* Address of cores for new chips should be added here */
        switch (ci->chip) {
+       case BCM43241_CHIP_ID:
+               ci->c_inf[0].wrapbase = 0x18100000;
+               ci->c_inf[0].cib = 0x2a084411;
+               ci->c_inf[1].id = BCMA_CORE_SDIO_DEV;
+               ci->c_inf[1].base = 0x18002000;
+               ci->c_inf[1].wrapbase = 0x18102000;
+               ci->c_inf[1].cib = 0x0e004211;
+               ci->c_inf[2].id = BCMA_CORE_INTERNAL_MEM;
+               ci->c_inf[2].base = 0x18004000;
+               ci->c_inf[2].wrapbase = 0x18104000;
+               ci->c_inf[2].cib = 0x14080401;
+               ci->c_inf[3].id = BCMA_CORE_ARM_CM3;
+               ci->c_inf[3].base = 0x18003000;
+               ci->c_inf[3].wrapbase = 0x18103000;
+               ci->c_inf[3].cib = 0x07004211;
+               ci->ramsize = 0x90000;
+               break;
        case BCM4329_CHIP_ID:
                ci->c_inf[1].id = BCMA_CORE_SDIO_DEV;
                ci->c_inf[1].base = BCM4329_CORE_BUS_BASE;
index bcc79b4e3267ba1434c3c0bfdec1b2de6f50d18b..e8682855b73a5189936576bc69367fb765d1bf7f 100644 (file)
@@ -34,6 +34,7 @@
 #define BCM43235_CHIP_ID       43235
 #define BCM43236_CHIP_ID       43236
 #define BCM43238_CHIP_ID       43238
+#define BCM43241_CHIP_ID       0x4324
 #define BCM4329_CHIP_ID                0x4329
 #define BCM4330_CHIP_ID                0x4330
 #define BCM4331_CHIP_ID                0x4331