Search Linux Wireless

Re: [PATCH v2 2/4] brcmfmac: Support 89459 pcie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 22/09/2022 19.41, Ian Lin wrote:
> From: Alexander Prutskov <alep@xxxxxxxxxxx>
> 
> Adds support of 89459 chip pcie device and save restore support.
> 
> Signed-off-by: Alexander Prutskov <alep@xxxxxxxxxxx>
> Signed-off-by: Joseph chuang <jiac@xxxxxxxxxxx>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@xxxxxxxxxxx>
> Signed-off-by: Ian Lin <ian.lin@xxxxxxxxxxxx>
[...]

Can you explain how the CYW89459 is related to the BCM4355 family? I
have a patch [1] to add support for the BCM4355 variant present in some
Apple laptops which I was hoping to submit again for 6.2, and this patch
conflicts with it.

[1] https://lore.kernel.org/lkml/20220104072658.69756-19-marcan@xxxxxxxxx/

>  BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie");
>  BRCMF_FW_DEF(4371, "brcmfmac4371-pcie");
>  BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie");
> +BRCMF_FW_DEF(4355, "brcmfmac89459-pcie");
>  
>  /* firmware config files */
>  MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt");
> @@ -90,6 +91,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = {
>  	BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C),
>  	BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371),
>  	BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* revision ID 3 */
> +	BRCMF_FW_ENTRY(CY_CC_89459_CHIP_ID, 0xFFFFFFFF, 4355),
>  };

Is the CYW89459 just a rebrand of the BCM4355, or just a subset? If it
is a rebrand, it's okay if we call our Apple firmware
brcmfmac89459-pcie* (note that we use per-board firmware names, so it
wouldn't conflict with a generic one). However, if CYW89459 only refers
to specific variants, I think the firmware should be named after the
overall bcm4355 family.

I'm guessing you intend to ship firmware for this. Would that firmware
work for all 4355 variants, or only the CYW one? If only the CYW one, is
it possible to differentiate between them based on PCI revision ID? Note
that our 4355 has revision ID 12, and Apple specifically calls it 4355C1
(different chip revisions have different firmware builds, which is why I
named our firmware brcmfmac4355c1-pcie). If the CYW variant uses other
revision IDs that do not overlap, maybe we should have different
firmware entries for them with different masks.

>  
> 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 1003f123ec25..f4939cf62767 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
> @@ -56,6 +56,7 @@
>  #define CY_CC_43012_CHIP_ID		43012
>  #define CY_CC_43439_CHIP_ID		43439
>  #define CY_CC_43752_CHIP_ID		43752
> +#define CY_CC_89459_CHIP_ID		0x4355

This seems suspicious. If the chip ID is 4355 and applies to non-Cypress
products, unlike the other constants in this list, this constant should
probably be named after BCM4355, not the Cypress part number.

>  
>  /* USB Device IDs */
>  #define BRCM_USB_43143_DEVICE_ID	0xbd1e
> @@ -90,7 +91,8 @@
>  #define BRCM_PCIE_4366_5G_DEVICE_ID	0x43c5
>  #define BRCM_PCIE_4371_DEVICE_ID	0x440d
>  #define BRCM_PCIE_4378_DEVICE_ID	0x4425
> -
> +#define CY_PCIE_89459_DEVICE_ID         0x4415
> +#define CY_PCIE_89459_RAW_DEVICE_ID     0x4355

Note that the PCI device ID for our 4355 is 0x43dc. Other sources call
this "BCM4355 D11AC", which is distinct from 0x4355 ("BCM43237 D11N")
and 0x4415 ("BCM43596 D11AC").

- Hector



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux