* [PATCH 0/2] add firmware-name device tree property for ath11k
@ 2024-10-01 3:30 Miaoqing Pan
2024-10-01 3:30 ` [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property Miaoqing Pan
2024-10-01 3:30 ` [PATCH 2/2] wifi: ath11k: add firmware-name device tree property Miaoqing Pan
0 siblings, 2 replies; 8+ messages in thread
From: Miaoqing Pan @ 2024-10-01 3:30 UTC (permalink / raw)
To: kvalo
Cc: quic_jjohnson, ath11k, linux-wireless, devicetree, linux-kernel,
Miaoqing Pan
QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
firmware, which is customized for IoE platforms. And the 'pci-device-id +
soc-hw-version + soc-hw-sub-version' may not be enough to identify the
correct firmware directory path.
The device tree allows "firmware-name" to define the firmware path,
wifi@c000000 {
firmware-name = "QCA6698AQ";
status = "okay";
};
Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
---
Miaoqing Pan (2):
dt-bindings: net: wireless: ath11k: add firmware-name property
wifi: ath11k: add firmware-name device tree property
.../bindings/net/wireless/qcom,ath11k.yaml | 7 +++++++
drivers/net/wireless/ath/ath11k/core.c | 12 ++++++++++++
drivers/net/wireless/ath/ath11k/core.h | 11 +++--------
3 files changed, 22 insertions(+), 8 deletions(-)
base-commit: 8ed36fe71fd60c851540839b105fd1fddc870c61
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property
2024-10-01 3:30 [PATCH 0/2] add firmware-name device tree property for ath11k Miaoqing Pan
@ 2024-10-01 3:30 ` Miaoqing Pan
2024-10-01 16:30 ` Conor Dooley
2024-10-01 3:30 ` [PATCH 2/2] wifi: ath11k: add firmware-name device tree property Miaoqing Pan
1 sibling, 1 reply; 8+ messages in thread
From: Miaoqing Pan @ 2024-10-01 3:30 UTC (permalink / raw)
To: kvalo
Cc: quic_jjohnson, ath11k, linux-wireless, devicetree, linux-kernel,
Miaoqing Pan
This is the same optional property that defined in qcom,ath10k.yaml. It's
useful for the platform / board to specify firmware through device-tree.
Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
---
.../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
index ff5763dc66a8..2f9fa96cbed1 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/wireless/qcom,ath11k.yaml#
@@ -61,6 +62,12 @@ properties:
ieee80211-freq-limit: true
+ firmware-name:
+ maxItems: 1
+ description:
+ If present, a board or platform specific string used to lookup firmware
+ files for the device.
+
wifi-firmware:
type: object
description: |
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] wifi: ath11k: add firmware-name device tree property
2024-10-01 3:30 [PATCH 0/2] add firmware-name device tree property for ath11k Miaoqing Pan
2024-10-01 3:30 ` [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property Miaoqing Pan
@ 2024-10-01 3:30 ` Miaoqing Pan
2024-10-22 9:57 ` Dmitry Baryshkov
1 sibling, 1 reply; 8+ messages in thread
From: Miaoqing Pan @ 2024-10-01 3:30 UTC (permalink / raw)
To: kvalo
Cc: quic_jjohnson, ath11k, linux-wireless, devicetree, linux-kernel,
Miaoqing Pan
QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
firmware, which is customized for IoE platforms. And the 'pci-device-id +
soc-hw-version + soc-hw-sub-version' may not be enough to identify the
correct firmware directory path.
The device tree allows "firmware-name" to define the firmware path,
wifi@c000000 {
firmware-name = "QCA6698AQ";
status = "okay";
};
Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04402-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
---
drivers/net/wireless/ath/ath11k/core.c | 12 ++++++++++++
drivers/net/wireless/ath/ath11k/core.h | 11 +++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index be67382c00f6..7720f467b11b 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -1178,6 +1178,18 @@ static int ath11k_core_create_chip_id_board_name(struct ath11k_base *ab, char *n
ATH11K_BDF_NAME_CHIP_ID);
}
+void ath11k_core_create_firmware_path(struct ath11k_base *ab,
+ const char *filename,
+ void *buf, size_t buf_len)
+{ const char *variant = NULL;
+
+ of_property_read_string(ab->dev->of_node, "firmware-name", &variant);
+
+ snprintf(buf, buf_len, "%s/%s/%s", ATH11K_FW_DIR,
+ variant ? : ab->hw_params.fw.dir, filename);
+}
+EXPORT_SYMBOL(ath11k_core_create_firmware_path);
+
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
const char *file)
{
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index 09c37e19a168..ce4102cfed4d 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -1249,6 +1249,9 @@ bool ath11k_core_coldboot_cal_support(struct ath11k_base *ab);
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
const char *filename);
+void ath11k_core_create_firmware_path(struct ath11k_base *ab,
+ const char *filename,
+ void *buf, size_t buf_len);
static inline const char *ath11k_scan_state_str(enum ath11k_scan_state state)
{
@@ -1295,14 +1298,6 @@ static inline struct ath11k *ath11k_ab_to_ar(struct ath11k_base *ab,
return ab->pdevs[ath11k_hw_mac_id_to_pdev_id(&ab->hw_params, mac_id)].ar;
}
-static inline void ath11k_core_create_firmware_path(struct ath11k_base *ab,
- const char *filename,
- void *buf, size_t buf_len)
-{
- snprintf(buf, buf_len, "%s/%s/%s", ATH11K_FW_DIR,
- ab->hw_params.fw.dir, filename);
-}
-
static inline const char *ath11k_bus_str(enum ath11k_bus bus)
{
switch (bus) {
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property
2024-10-01 3:30 ` [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property Miaoqing Pan
@ 2024-10-01 16:30 ` Conor Dooley
0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2024-10-01 16:30 UTC (permalink / raw)
To: Miaoqing Pan
Cc: kvalo, quic_jjohnson, ath11k, linux-wireless, devicetree,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
On Tue, Oct 01, 2024 at 11:30:51AM +0800, Miaoqing Pan wrote:
> This is the same optional property that defined in qcom,ath10k.yaml. It's
> useful for the platform / board to specify firmware through device-tree.
>
> Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] wifi: ath11k: add firmware-name device tree property
2024-10-01 3:30 ` [PATCH 2/2] wifi: ath11k: add firmware-name device tree property Miaoqing Pan
@ 2024-10-22 9:57 ` Dmitry Baryshkov
2024-10-22 10:20 ` Miaoqing Pan
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-22 9:57 UTC (permalink / raw)
To: Miaoqing Pan
Cc: kvalo, quic_jjohnson, ath11k, linux-wireless, devicetree,
linux-kernel
On Tue, Oct 01, 2024 at 11:30:52AM +0800, Miaoqing Pan wrote:
> QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
> firmware, which is customized for IoE platforms. And the 'pci-device-id +
> soc-hw-version + soc-hw-sub-version' may not be enough to identify the
> correct firmware directory path.
Why is it so? What makes it so different from the existing platforms
that you can not use WCN6855 firmware?
>
> The device tree allows "firmware-name" to define the firmware path,
> wifi@c000000 {
You are describing platform node, while the commit message talks about
the PCIe devices. Could you please clarify, whether it is a PCIe device
or an AHB device?
> firmware-name = "QCA6698AQ";
Could we please follow the approach that has been defined in the commit
5abf259772df ("wifi: ath10k: support board-specific firmware
overrides")? In other words, instead of creating another directory under
ath11k, create a subdir under the WCN6855/hwN.M/ which contains your
device-specific data.
> status = "okay";
> };
>
> Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04402-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
>
> Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
P.S. please CC linux-arm-msm for future respins of this series or for
all other submissions that concern board-specific DT data on MSM
platforms.
> ---
> drivers/net/wireless/ath/ath11k/core.c | 12 ++++++++++++
> drivers/net/wireless/ath/ath11k/core.h | 11 +++--------
> 2 files changed, 15 insertions(+), 8 deletions(-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] wifi: ath11k: add firmware-name device tree property
2024-10-22 9:57 ` Dmitry Baryshkov
@ 2024-10-22 10:20 ` Miaoqing Pan
2024-10-22 13:55 ` Dmitry Baryshkov
2024-10-22 15:58 ` Kalle Valo
0 siblings, 2 replies; 8+ messages in thread
From: Miaoqing Pan @ 2024-10-22 10:20 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: kvalo, quic_jjohnson, ath11k, linux-wireless, devicetree,
linux-kernel
On 10/22/2024 5:57 PM, Dmitry Baryshkov wrote:
> On Tue, Oct 01, 2024 at 11:30:52AM +0800, Miaoqing Pan wrote:
>> QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
>> firmware, which is customized for IoE platforms. And the 'pci-device-id +
>> soc-hw-version + soc-hw-sub-version' may not be enough to identify the
>> correct firmware directory path.
>
> Why is it so? What makes it so different from the existing platforms
> that you can not use WCN6855 firmware?
Just as I said, a new customized firmware for IoE devices.
>
>>
>> The device tree allows "firmware-name" to define the firmware path,
>> wifi@c000000 {
>
> You are describing platform node, while the commit message talks about
> the PCIe devices. Could you please clarify, whether it is a PCIe device
> or an AHB device?
PCIe device. The change is for sa8775p/qcs8300 those non-AHB boards.
>
>> firmware-name = "QCA6698AQ";
>
> Could we please follow the approach that has been defined in the commit
> 5abf259772df ("wifi: ath10k: support board-specific firmware
> overrides")? In other words, instead of creating another directory under
> ath11k, create a subdir under the WCN6855/hwN.M/ which contains your
> device-specific data.
Sure, thanks, will update.
>
>> status = "okay";
>> };
>>
>> Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04402-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
>>
>> Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
>
> P.S. please CC linux-arm-msm for future respins of this series or for
> all other submissions that concern board-specific DT data on MSM
> platforms.
ok.
>
>> ---
>> drivers/net/wireless/ath/ath11k/core.c | 12 ++++++++++++
>> drivers/net/wireless/ath/ath11k/core.h | 11 +++--------
>> 2 files changed, 15 insertions(+), 8 deletions(-)
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] wifi: ath11k: add firmware-name device tree property
2024-10-22 10:20 ` Miaoqing Pan
@ 2024-10-22 13:55 ` Dmitry Baryshkov
2024-10-22 15:58 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-22 13:55 UTC (permalink / raw)
To: Miaoqing Pan
Cc: kvalo, quic_jjohnson, ath11k, linux-wireless, devicetree,
linux-kernel
On Tue, 22 Oct 2024 at 13:20, Miaoqing Pan <quic_miaoqing@quicinc.com> wrote:
>
>
>
> On 10/22/2024 5:57 PM, Dmitry Baryshkov wrote:
> > On Tue, Oct 01, 2024 at 11:30:52AM +0800, Miaoqing Pan wrote:
> >> QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
> >> firmware, which is customized for IoE platforms. And the 'pci-device-id +
> >> soc-hw-version + soc-hw-sub-version' may not be enough to identify the
> >> correct firmware directory path.
> >
> > Why is it so? What makes it so different from the existing platforms
> > that you can not use WCN6855 firmware?
>
> Just as I said, a new customized firmware for IoE devices.
This answers the "what" question, not "why". Please provide a reason
and a description. Can the hardware work with the default firmware?
Does your custom firmware provide additional features? Is it just
signed for a different SoC? Is there anything else?
> >> The device tree allows "firmware-name" to define the firmware path,
> >> wifi@c000000 {
> >
> > You are describing platform node, while the commit message talks about
> > the PCIe devices. Could you please clarify, whether it is a PCIe device
> > or an AHB device?
>
> PCIe device. The change is for sa8775p/qcs8300 those non-AHB boards.
Then why are you patching the AHB schema and why are you providing a
platform-based example? It makes it harder to follow your arguments.
>
> >
> >> firmware-name = "QCA6698AQ";
> >
> > Could we please follow the approach that has been defined in the commit
> > 5abf259772df ("wifi: ath10k: support board-specific firmware
> > overrides")? In other words, instead of creating another directory under
> > ath11k, create a subdir under the WCN6855/hwN.M/ which contains your
> > device-specific data.
>
> Sure, thanks, will update.
>
> >
> >> status = "okay";
> >> };
> >>
> >> Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04402-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
> >>
> >> Signed-off-by: Miaoqing Pan <quic_miaoqing@quicinc.com>
> >
> > P.S. please CC linux-arm-msm for future respins of this series or for
> > all other submissions that concern board-specific DT data on MSM
> > platforms.
>
> ok.
>
> >
> >> ---
> >> drivers/net/wireless/ath/ath11k/core.c | 12 ++++++++++++
> >> drivers/net/wireless/ath/ath11k/core.h | 11 +++--------
> >> 2 files changed, 15 insertions(+), 8 deletions(-)
> >>
> >
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] wifi: ath11k: add firmware-name device tree property
2024-10-22 10:20 ` Miaoqing Pan
2024-10-22 13:55 ` Dmitry Baryshkov
@ 2024-10-22 15:58 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2024-10-22 15:58 UTC (permalink / raw)
To: Miaoqing Pan
Cc: Dmitry Baryshkov, quic_jjohnson, ath11k, linux-wireless,
devicetree, linux-kernel
Miaoqing Pan <quic_miaoqing@quicinc.com> writes:
> On 10/22/2024 5:57 PM, Dmitry Baryshkov wrote:
>> On Tue, Oct 01, 2024 at 11:30:52AM +0800, Miaoqing Pan wrote:
>>> QCA6698AQ uses different firmware/bdf/regdb with existing WCN6855
>>> firmware, which is customized for IoE platforms. And the 'pci-device-id +
>>> soc-hw-version + soc-hw-sub-version' may not be enough to identify the
>>> correct firmware directory path.
>> Why is it so? What makes it so different from the existing platforms
>> that you can not use WCN6855 firmware?
>
> Just as I said, a new customized firmware for IoE devices.
I know in Qualcomm it's common practise to fork the firmware multiple
times per project and what not, but in the community the preference is
to have one mainline branch. Having different firmware forks/branches is
a lot more difficult to maintain.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-10-22 15:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 3:30 [PATCH 0/2] add firmware-name device tree property for ath11k Miaoqing Pan
2024-10-01 3:30 ` [PATCH 1/2] dt-bindings: net: wireless: ath11k: add firmware-name property Miaoqing Pan
2024-10-01 16:30 ` Conor Dooley
2024-10-01 3:30 ` [PATCH 2/2] wifi: ath11k: add firmware-name device tree property Miaoqing Pan
2024-10-22 9:57 ` Dmitry Baryshkov
2024-10-22 10:20 ` Miaoqing Pan
2024-10-22 13:55 ` Dmitry Baryshkov
2024-10-22 15:58 ` Kalle Valo
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).