linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add BCM43752 chipset support
@ 2021-08-12 16:52 Angus Ainslie
  2021-08-12 16:52 ` [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization Angus Ainslie
  2021-08-12 16:52 ` [PATCH v3 2/2] btbcm: add patch ram for bluetooth Angus Ainslie
  0 siblings, 2 replies; 8+ messages in thread
From: Angus Ainslie @ 2021-08-12 16:52 UTC (permalink / raw)
  To: kernel
  Cc: Arend van Spriel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth, Angus Ainslie

The SparkLan AP6275 SDIO M.2 card contains a BCM43752 based module and these
patches were tested with that card.

This was tested on the 5.13 kernel with a minor substition BRCMF_FW_DEF for
BRCMF_FW_CLM_DEF.

It should apply and build on the wireless-next branch.

Changes since v2:

Squashed patches 1 and 2.
Fixed bluetooth patch subject.

Changes since v1:

Add bluetooth patchram definition

Angus Ainslie (2):
  brcmfmac: add 43752 SDIO ids and initialization
  btbcm: add patch ram for bluetooth

 drivers/bluetooth/btbcm.c                                 | 1 +
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 +
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c   | 3 +++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c   | 8 ++++++--
 .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 +
 include/linux/mmc/sdio_ids.h                              | 1 +
 6 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization
  2021-08-12 16:52 [PATCH v3 0/2] Add BCM43752 chipset support Angus Ainslie
@ 2021-08-12 16:52 ` Angus Ainslie
  2021-08-21 16:59   ` Kalle Valo
  2021-08-12 16:52 ` [PATCH v3 2/2] btbcm: add patch ram for bluetooth Angus Ainslie
  1 sibling, 1 reply; 8+ messages in thread
From: Angus Ainslie @ 2021-08-12 16:52 UTC (permalink / raw)
  To: kernel
  Cc: Arend van Spriel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth, Angus Ainslie

Add HW and SDIO ids for use with the SparkLan AP6275S
Add the firmware mapping structures for the BRCM43752 chipset.
The 43752 needs some things setup similar to the 43012 chipset.
The WATERMARK shows better performance when initialized to the 4373 value.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 +
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c   | 3 +++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c   | 8 ++++++--
 .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 +
 include/linux/mmc/sdio_ids.h                              | 1 +
 5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index 633d0ab19031..485ddeb436ae 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -990,6 +990,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = {
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012),
+	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752),
 	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359),
 	{ /* end: all zeroes */ }
 };
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
index 45037decba40..cc41ba5421f4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
@@ -727,6 +727,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci)
 	case BRCM_CC_4364_CHIP_ID:
 	case CY_CC_4373_CHIP_ID:
 		return 0x160000;
+	case CY_CC_43752_CHIP_ID:
+		return 0x170000;
 	default:
 		brcmf_err("unknown chip: %s\n", ci->pub.name);
 		break;
@@ -1411,6 +1413,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 CY_CC_43752_CHIP_ID:
 	case CY_CC_43012_CHIP_ID:
 		addr = CORE_CC_REG(pmu->base, retention_ctl);
 		reg = chip->ops->read32(chip->ctx, addr);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 97ee9e2e2e35..84d8ddff2aef 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -624,6 +624,7 @@ BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-sdio");
 BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
 BRCMF_FW_CLM_DEF(4373, "brcmfmac4373-sdio");
 BRCMF_FW_CLM_DEF(43012, "brcmfmac43012-sdio");
+BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-sdio");
 
 /* firmware config files */
 MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
@@ -650,7 +651,8 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
 	BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
 	BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
 	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_43012_CHIP_ID, 0xFFFFFFFF, 43012),
+	BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752)
 };
 
 #define TXCTL_CREDITS	2
@@ -3416,7 +3418,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 == CY_CC_43012_CHIP_ID ||
+	    bus->ci->chip == CY_CC_43752_CHIP_ID)
 		return true;
 	else
 		return false;
@@ -4257,6 +4260,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
 
 		switch (sdiod->func1->device) {
 		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",
 				  CY_4373_F2_WATERMARK);
 			brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
index 00309b272a0e..9d81320164ce 100644
--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
@@ -52,6 +52,7 @@
 #define BRCM_CC_4371_CHIP_ID		0x4371
 #define CY_CC_4373_CHIP_ID		0x4373
 #define CY_CC_43012_CHIP_ID		43012
+#define CY_CC_43752_CHIP_ID		43752
 
 /* USB Device IDs */
 #define BRCM_USB_43143_DEVICE_ID	0xbd1e
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 12036619346c..a85c9f0bd470 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -75,6 +75,7 @@
 #define SDIO_DEVICE_ID_BROADCOM_43364		0xa9a4
 #define SDIO_DEVICE_ID_BROADCOM_43430		0xa9a6
 #define SDIO_DEVICE_ID_BROADCOM_43455		0xa9bf
+#define SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752	0xaae8
 
 #define SDIO_VENDOR_ID_MARVELL			0x02df
 #define SDIO_DEVICE_ID_MARVELL_LIBERTAS		0x9103
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] btbcm: add patch ram for bluetooth
  2021-08-12 16:52 [PATCH v3 0/2] Add BCM43752 chipset support Angus Ainslie
  2021-08-12 16:52 ` [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization Angus Ainslie
@ 2021-08-12 16:52 ` Angus Ainslie
  2021-08-16 15:58   ` Marcel Holtmann
  2021-08-16 21:58   ` Arend van Spriel
  1 sibling, 2 replies; 8+ messages in thread
From: Angus Ainslie @ 2021-08-12 16:52 UTC (permalink / raw)
  To: kernel
  Cc: Arend van Spriel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth, Angus Ainslie

Bluetooth on the BCM43752 needs a patchram file to function correctly.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
---
 drivers/bluetooth/btbcm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index e5d706ed55ea..e4182acee488 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -387,6 +387,7 @@ struct bcm_subver_table {
 };
 
 static const struct bcm_subver_table bcm_uart_subver_table[] = {
+	{ 0x1111, "BCM4362A2"	},	/* 000.017.017 */
 	{ 0x4103, "BCM4330B1"	},	/* 002.001.003 */
 	{ 0x410d, "BCM4334B0"	},	/* 002.001.013 */
 	{ 0x410e, "BCM43341B0"	},	/* 002.001.014 */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] btbcm: add patch ram for bluetooth
  2021-08-12 16:52 ` [PATCH v3 2/2] btbcm: add patch ram for bluetooth Angus Ainslie
@ 2021-08-16 15:58   ` Marcel Holtmann
  2021-08-16 21:58   ` Arend van Spriel
  1 sibling, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2021-08-16 15:58 UTC (permalink / raw)
  To: Angus Ainslie
  Cc: kernel, Arend van Spriel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth

Hi Angus,

> Bluetooth on the BCM43752 needs a patchram file to function correctly.
> 
> Signed-off-by: Angus Ainslie <angus@akkea.ca>
> ---
> drivers/bluetooth/btbcm.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] btbcm: add patch ram for bluetooth
  2021-08-12 16:52 ` [PATCH v3 2/2] btbcm: add patch ram for bluetooth Angus Ainslie
  2021-08-16 15:58   ` Marcel Holtmann
@ 2021-08-16 21:58   ` Arend van Spriel
  2021-08-19 15:26     ` Marcel Holtmann
  1 sibling, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2021-08-16 21:58 UTC (permalink / raw)
  To: Angus Ainslie, kernel
  Cc: Arend van Spriel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth

On 8/12/2021 6:52 PM, Angus Ainslie wrote:
> Bluetooth on the BCM43752 needs a patchram file to function correctly.
> 
> Signed-off-by: Angus Ainslie <angus@akkea.ca>
> ---
>   drivers/bluetooth/btbcm.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
> index e5d706ed55ea..e4182acee488 100644
> --- a/drivers/bluetooth/btbcm.c
> +++ b/drivers/bluetooth/btbcm.c
> @@ -387,6 +387,7 @@ struct bcm_subver_table {
>   };
>   
>   static const struct bcm_subver_table bcm_uart_subver_table[] = {
> +	{ 0x1111, "BCM4362A2"	},	/* 000.017.017 */

Noticed Marcel applied this one already, but as I asked in earlier patch 
I would like to know why the commit message says 43752 but this entry 
says 4362? Still confused.

Regards,
Arend

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] btbcm: add patch ram for bluetooth
  2021-08-16 21:58   ` Arend van Spriel
@ 2021-08-19 15:26     ` Marcel Holtmann
  2021-08-19 15:43       ` Arend van Spriel
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2021-08-19 15:26 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Angus Ainslie, kernel, Arend van Spriel, Franky Lin, Kalle Valo,
	linux-wireless, brcm80211-dev-list.pdl, linux-bluetooth

Hi Arend,

>> Bluetooth on the BCM43752 needs a patchram file to function correctly.
>> Signed-off-by: Angus Ainslie <angus@akkea.ca>
>> ---
>>  drivers/bluetooth/btbcm.c | 1 +
>>  1 file changed, 1 insertion(+)
>> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
>> index e5d706ed55ea..e4182acee488 100644
>> --- a/drivers/bluetooth/btbcm.c
>> +++ b/drivers/bluetooth/btbcm.c
>> @@ -387,6 +387,7 @@ struct bcm_subver_table {
>>  };
>>    static const struct bcm_subver_table bcm_uart_subver_table[] = {
>> +	{ 0x1111, "BCM4362A2"	},	/* 000.017.017 */
> 
> Noticed Marcel applied this one already, but as I asked in earlier patch I would like to know why the commit message says 43752 but this entry says 4362? Still confused.

seems I missed that part. Can you look internally what this hardware is and we fix it?

Regards

Marcel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] btbcm: add patch ram for bluetooth
  2021-08-19 15:26     ` Marcel Holtmann
@ 2021-08-19 15:43       ` Arend van Spriel
  0 siblings, 0 replies; 8+ messages in thread
From: Arend van Spriel @ 2021-08-19 15:43 UTC (permalink / raw)
  To: Marcel Holtmann, Arend van Spriel
  Cc: Angus Ainslie, kernel, Franky Lin, Kalle Valo, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth

On August 19, 2021 5:26:42 PM Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Arend,
>
>>> Bluetooth on the BCM43752 needs a patchram file to function correctly.
>>> Signed-off-by: Angus Ainslie <angus@akkea.ca>
>>> ---
>>> drivers/bluetooth/btbcm.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
>>> index e5d706ed55ea..e4182acee488 100644
>>> --- a/drivers/bluetooth/btbcm.c
>>> +++ b/drivers/bluetooth/btbcm.c
>>> @@ -387,6 +387,7 @@ struct bcm_subver_table {
>>> };
>>> static const struct bcm_subver_table bcm_uart_subver_table[] = {
>>> + { 0x1111, "BCM4362A2" }, /* 000.017.017 */
>>
>> Noticed Marcel applied this one already, but as I asked in earlier patch I 
>> would like to know why the commit message says 43752 but this entry says 
>> 4362? Still confused.
>
> seems I missed that part. Can you look internally what this hardware is and 
> we fix it?

I will check although not internally as this is probably a Cypress chipset. 
Anyway, I will follow up on this.

Regards,
Arend




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization
  2021-08-12 16:52 ` [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization Angus Ainslie
@ 2021-08-21 16:59   ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2021-08-21 16:59 UTC (permalink / raw)
  To: Angus Ainslie
  Cc: kernel, Arend van Spriel, Franky Lin, linux-wireless,
	brcm80211-dev-list.pdl, linux-bluetooth, Angus Ainslie

Angus Ainslie <angus@akkea.ca> wrote:

> Add HW and SDIO ids for use with the SparkLan AP6275S
> Add the firmware mapping structures for the BRCM43752 chipset.
> The 43752 needs some things setup similar to the 43012 chipset.
> The WATERMARK shows better performance when initialized to the 4373 value.
> 
> Signed-off-by: Angus Ainslie <angus@akkea.ca>

Patch applied to wireless-drivers-next.git, thanks.

d2587c57ffd8 brcmfmac: add 43752 SDIO ids and initialization

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210812165218.2508258-2-angus@akkea.ca/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-21 16:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 16:52 [PATCH v3 0/2] Add BCM43752 chipset support Angus Ainslie
2021-08-12 16:52 ` [PATCH v3 1/2] brcmfmac: add 43752 SDIO ids and initialization Angus Ainslie
2021-08-21 16:59   ` Kalle Valo
2021-08-12 16:52 ` [PATCH v3 2/2] btbcm: add patch ram for bluetooth Angus Ainslie
2021-08-16 15:58   ` Marcel Holtmann
2021-08-16 21:58   ` Arend van Spriel
2021-08-19 15:26     ` Marcel Holtmann
2021-08-19 15:43       ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).