0001fb17a79e1a7813bccc8ef3c82d44501aaad3
[openwrt/staging/neocturne.git] /
1 From d4aef159394d5940bd7158ab789969dab82f7c76 Mon Sep 17 00:00:00 2001
2 From: Soeren Moch <smoch@web.de>
3 Date: Thu, 12 Dec 2019 00:52:49 +0100
4 Subject: [PATCH 5/7] brcmfmac: add support for BCM4359 SDIO chipset
5
6 BCM4359 is a 2x2 802.11 abgn+ac Dual-Band HT80 combo chip and it
7 supports Real Simultaneous Dual Band feature.
8
9 Based on a similar patch by: Wright Feng <wright.feng@cypress.com>
10
11 Signed-off-by: Soeren Moch <smoch@web.de>
12 Acked-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
13 Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 ++
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 +
18 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++
19 include/linux/mmc/sdio_ids.h | 2 ++
20 4 files changed, 7 insertions(+)
21
22 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
23 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
24 @@ -973,8 +973,10 @@ static const struct sdio_device_id brcmf
25 BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43455),
26 BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354),
27 BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356),
28 + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359),
29 BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373),
30 BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012),
31 + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_89359),
32 { /* end: all zeroes */ }
33 };
34 MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);
35 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
36 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
37 @@ -1408,6 +1408,7 @@ bool brcmf_chip_sr_capable(struct brcmf_
38 addr = CORE_CC_REG(base, sr_control0);
39 reg = chip->ops->read32(chip->ctx, addr);
40 return (reg & CC_SR_CTL0_ENABLE_MASK) != 0;
41 + case BRCM_CC_4359_CHIP_ID:
42 case CY_CC_43012_CHIP_ID:
43 addr = CORE_CC_REG(pmu->base, retention_ctl);
44 reg = chip->ops->read32(chip->ctx, addr);
45 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
46 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
47 @@ -616,6 +616,7 @@ BRCMF_FW_DEF(43455, "brcmfmac43455-sdio"
48 BRCMF_FW_DEF(43456, "brcmfmac43456-sdio");
49 BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
50 BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
51 +BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
52 BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
53 BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
54
55 @@ -638,6 +639,7 @@ static const struct brcmf_firmware_mappi
56 BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFDC0, 43455),
57 BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
58 BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
59 + BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
60 BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373),
61 BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012)
62 };
63 --- a/include/linux/mmc/sdio_ids.h
64 +++ b/include/linux/mmc/sdio_ids.h
65 @@ -41,8 +41,10 @@
66 #define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf
67 #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354
68 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356
69 +#define SDIO_DEVICE_ID_BROADCOM_4359 0x4359
70 #define SDIO_DEVICE_ID_CYPRESS_4373 0x4373
71 #define SDIO_DEVICE_ID_CYPRESS_43012 43012
72 +#define SDIO_DEVICE_ID_CYPRESS_89359 0x4355
73
74 #define SDIO_VENDOR_ID_INTEL 0x0089
75 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402