mbox series

[v13,0/5] Add AP6276P wireless support

Message ID 20240828-wireless-mainline-v13-0-9998b19cfe7e@wesion.com
Headers show
Series Add AP6276P wireless support | expand

Message

Jacobe Zang Aug. 28, 2024, 8:49 a.m. UTC
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
Changes in v13:
 - CC devicetree list that forget last version

 - Link to v12: https://lore.kernel.org/all/20240828034915.969383-1-jacobe.zang@wesion.com/

These add AP6275P wireless support on Khadas Edge2. Enable 32k clock
for Wi-Fi module and extend the hardware IDs table in the brcmfmac
driver for it to attach.

Changes in v12:
 - Add "brcm,bcm4329-fmac" as fallback compatible for PCI ID based devices.

 - Link to v11: https://lore.kernel.org/all/20240816020635.1273911-1-jacobe.zang@wesion.com/

Changes in v11:
 - Retain interrupt check in of.c
 - Split DTS and submit separately 

 - Link to v10: https://lore.kernel.org/all/20240813082007.2625841-1-jacobe.zang@wesion.com/

Changes in v10:
 - Use ret instead unused probe_attach_result in sdio.c 

 - Link to v9: https://lore.kernel.org/all/20240810035141.439024-1-jacobe.zang@wesion.com/

Changes in v9:
 - Add return -ENODEV error pointer from brcmf_sdio_probe as the default for the fail path
 - Add if statement for brcmf_of_probe in common.c
 - Retain modifications to of.c other than the return values

 - Link to v8: https://lore.kernel.org/all/20240805073425.3492078-1-jacobe.zang@wesion.com/

Changes in v8:
 - Add appropriate errno's for return values that will be
    send to bus when error occurred.
 
 - Link to v7: https://lore.kernel.org/all/20240802025715.2360456-1-jacobe.zang@wesion.com/

Changes in v7:
 - Change brcmf_of_probe prototypes from void to int, add appropriate errno's for return
    value, move clock check to the end of brcmf_of_probe
 - Add "brcm,bcm4329-fmac" compatible for wifi node

 - Link to v6: https://lore.kernel.org/all/20240731061132.703368-1-jacobe.zang@wesion.com/

Changes in v6:
 - Move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe in of.c
 - Add return if clk didn't set in DTS

 -Link to v5: https://lore.kernel.org/all/20240730033053.4092132-1-jacobe.zang@wesion.com/

Changes in v5:
 - Add more commit message to the clock in bindings
 - Use IS_ERR_OR_NULL as a judgment condition of clk

 - Link to v4: https://lore.kernel.org/all/20240729070102.3770318-1-jacobe.zang@wesion.com/

Changes in v4:
 - Change clock description in dt-bindings
 - Move enable clk from pcie.c to of.c
 - Add compatible for wifi node in DTS
 - Add random seed flag for firmware download

 - Link to v3: https://lore.kernel.org/all/20240630073605.2164346-1-jacobe.zang@wesion.com/

Changes in v3:
 - Dropped redundant parts in dt-bindings.
 - Change driver patch title prefix as 'wifi: brcmfmac:'.
 - Change DTS Wi-Fi node clock-name as 'lpo'.
 
 - Link to v2: https://lore.kernel.org/all/20240624081906.1399447-1-jacobe.zang@wesion.com/

Changes in v2:
 - Add SoB tags for original developer.
 - Add dt-bindings for pci14e4,449d and clocks.
 - Replace dev_info to brcmf_dbg in pcie.c

 - Link to v1: https://lore.kernel.org/all/20240620020015.4021696-1-jacobe.zang@wesion.com/

---
Jacobe Zang (5):
      dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d
      dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P
      dt-bindings: net: wireless: brcm4329-fmac: change properties enum structure
      wifi: brcmfmac: Add optional lpo clock enable support
      wifi: brcmfmac: add flag for random seed during firmware download

 .../bindings/net/wireless/brcm,bcm4329-fmac.yaml   | 27 +++++++----
 .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c  |  4 +-
 .../wireless/broadcom/brcm80211/brcmfmac/common.c  |  3 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/of.c  | 29 ++++++++----
 .../net/wireless/broadcom/brcm80211/brcmfmac/of.h  |  9 ++--
 .../wireless/broadcom/brcm80211/brcmfmac/pcie.c    | 55 ++++++++++++++++++----
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    | 20 +++++---
 .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c |  3 ++
 .../broadcom/brcm80211/include/brcm_hw_ids.h       |  2 +
 9 files changed, 113 insertions(+), 39 deletions(-)
---
base-commit: dabcfd5e116800496eb9bec2ba7c015ca2043aa0
change-id: 20240828-wireless-mainline-bccba9d69efb

Best regards,

Comments

Simon Horman Aug. 28, 2024, 3:20 p.m. UTC | #1
On Wed, Aug 28, 2024 at 04:49:25PM +0800, Jacobe Zang wrote:
> WiFi modules often require 32kHz clock to function. Add support to
> enable the clock to PCIe driver and move "brcm,bcm4329-fmac" check
> to the top of brcmf_of_probe. Change function prototypes from void
> to int and add appropriate errno's for return values that will be
> send to bus when error occurred.
> 
> Co-developed-by: Ondrej Jirman <megi@xff.cz>
> Signed-off-by: Ondrej Jirman <megi@xff.cz>
> Co-developed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>

...

> @@ -4452,7 +4454,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
>  	/* Allocate private bus interface state */
>  	bus = kzalloc(sizeof(*bus), GFP_ATOMIC);
>  	if (!bus)
> +		ret = -ENOMEM;
>  		goto fail;
> +	}
>  

Perhaps a local change didn't make it into git, or something like that.
But this does not compile. As was also the case in v12.
Please take time to test your patches, not just the local tree.

>  	bus->sdiodev = sdiodev;
>  	sdiodev->bus = bus;
Jacobe Zang Aug. 29, 2024, 12:05 a.m. UTC | #2
On 2024/8/28 23:20, Simon Horman wrote:
> On Wed, Aug 28, 2024 at 04:49:25PM +0800, Jacobe Zang wrote:
>> WiFi modules often require 32kHz clock to function. Add support to
>> enable the clock to PCIe driver and move "brcm,bcm4329-fmac" check
>> to the top of brcmf_of_probe. Change function prototypes from void
>> to int and add appropriate errno's for return values that will be
>> send to bus when error occurred.
>>
>> Co-developed-by: Ondrej Jirman <megi@xff.cz>
>> Signed-off-by: Ondrej Jirman <megi@xff.cz>
>> Co-developed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
>> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> 
> ...
> 
>> @@ -4452,7 +4454,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
>>   	/* Allocate private bus interface state */
>>   	bus = kzalloc(sizeof(*bus), GFP_ATOMIC);
>>   	if (!bus)
>> +		ret = -ENOMEM;
>>   		goto fail;
>> +	}
>>   
> 
> Perhaps a local change didn't make it into git, or something like that.
> But this does not compile. As was also the case in v12.
> Please take time to test your patches, not just the local tree.
> 

Thanks for your correction. I will fix it.

>>   	bus->sdiodev = sdiodev;
>>   	sdiodev->bus = bus;
>