* [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides
@ 2024-01-30 16:38 Dmitry Baryshkov
2024-01-30 16:38 ` [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property Dmitry Baryshkov
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 16:38 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On WCN3990 platforms actual firmware, wlanmdsp.mbn, is sideloaded to the
modem DSP via the TQFTPserv. These MBN files are signed by the device
vendor, can only be used with the particular SoC or device.
Unfortunately different firmware versions come with different features.
For example firmware for SDM845 doesn't use single-chan-info-per-channel
feature, while firmware for QRB2210 / QRB4210 requires that feature.
Allow board DT files to override the subdir of the fw dir used to lookup
the firmware-N.bin file decribing corresponding WiFi firmware.
For example, adding firmware-name = "qrb4210" property will make the
driver look for the firmware-N.bin first in ath10k/WCN3990/hw1.0/qrb4210
directory and then fallback to the default ath10k/WCN3990/hw1.0 dir.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dmitry Baryshkov (4):
dt-bindings: net: wireless: ath10k: describe firmware-name property
wifi: ath10k: support board-specific firmware overrides
arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
.../devicetree/bindings/net/wireless/qcom,ath10k.yaml | 6 ++++++
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 1 +
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 +
drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
drivers/net/wireless/ath/ath10k/core.h | 2 ++
drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
6 files changed, 23 insertions(+), 1 deletion(-)
---
base-commit: 596764183be8ebb13352b281a442a1f1151c9b06
change-id: 20240130-wcn3990-firmware-path-7a05a0cf8107
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
@ 2024-01-30 16:38 ` Dmitry Baryshkov
2024-01-31 8:27 ` Krzysztof Kozlowski
2024-01-30 16:38 ` [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 16:38 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
For WCN3990 platforms we need to look for the platform / board specific
firmware-N.mbn file which corresponds to the wlanmdsp.mbn loaded to the
modem DSP via the TQFTPserv. Add firmware-name property describing this
classifier.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
index 7758a55dd328..d978d850ce93 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
@@ -72,6 +72,12 @@ properties:
- sky85703-11
- sky85803
+ 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
additionalProperties: false
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
2024-01-30 16:38 ` [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property Dmitry Baryshkov
@ 2024-01-30 16:38 ` Dmitry Baryshkov
2024-02-12 11:12 ` Konrad Dybcio
2024-03-01 8:01 ` Kalle Valo
2024-01-30 16:38 ` [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node Dmitry Baryshkov
` (2 subsequent siblings)
4 siblings, 2 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 16:38 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
Different Qualcomm platforms using WCN3990 WiFI chip use SoC-specific
firmware versions with different features. For example firmware for
SDM845 doesn't use single-chan-info-per-channel feature, while firmware
for QRB2210 / QRB4210 requires that feature. Allow board DT files to
override the subdir of the fw dir used to lookup the firmware-N.bin file
decribing corresponding WiFi firmware.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
drivers/net/wireless/ath/ath10k/core.h | 2 ++
drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 0032f8aa892f..ef7ce8b3f8fb 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -942,11 +942,20 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
if (dir == NULL)
dir = ".";
+ if (ar->board_name) {
+ snprintf(filename, sizeof(filename), "%s/%s/%s",
+ dir, ar->board_name, file);
+ ret = firmware_request_nowarn(&fw, filename, ar->dev);
+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
+ filename, ret);
+ if (!ret)
+ return fw;
+ }
+
snprintf(filename, sizeof(filename), "%s/%s", dir, file);
ret = firmware_request_nowarn(&fw, filename, ar->dev);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
filename, ret);
-
if (ret)
return ERR_PTR(ret);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index c110d15528bd..3595c8abce02 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -1081,6 +1081,8 @@ struct ath10k {
*/
const struct ath10k_fw_components *running_fw;
+ const char *board_name;
+
const struct firmware *pre_cal_file;
const struct firmware *cal_file;
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index a1db5a973780..747de30e06ca 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1337,6 +1337,9 @@ static void ath10k_snoc_quirks_init(struct ath10k *ar)
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
struct device *dev = &ar_snoc->dev->dev;
+ /* ignore errors, default to empty string */
+ of_property_read_string(dev->of_node, "firmware-name", &ar->board_name);
+
if (of_property_read_bool(dev->of_node, "qcom,snoc-host-cap-8bit-quirk"))
set_bit(ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK, &ar_snoc->flags);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
2024-01-30 16:38 ` [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property Dmitry Baryshkov
2024-01-30 16:38 ` [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
@ 2024-01-30 16:38 ` Dmitry Baryshkov
2024-02-12 11:46 ` Konrad Dybcio
2024-01-30 16:38 ` [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: " Dmitry Baryshkov
2024-02-12 20:56 ` [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Jeff Johnson
4 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 16:38 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
Add firmware-name property to the WiFi device tree node to specify
board-specific lookup directory.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index 64b2ab286279..338a12f98bfe 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -540,6 +540,7 @@ &wifi {
vdd-1.3-rfa-supply = <&pm4125_l10>;
vdd-3.3-ch0-supply = <&pm4125_l22>;
qcom,ath10k-calibration-variant = "Thundercomm_RB1";
+ firmware-name = "qcm2290";
status = "okay";
};
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
` (2 preceding siblings ...)
2024-01-30 16:38 ` [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node Dmitry Baryshkov
@ 2024-01-30 16:38 ` Dmitry Baryshkov
2024-02-12 11:46 ` Konrad Dybcio
2024-02-12 20:56 ` [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Jeff Johnson
4 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-01-30 16:38 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
Add firmware-name property to the WiFi device tree node to specify
board-specific lookup directory.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index 7c19f874fa71..cf1d8d6f1546 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -632,6 +632,7 @@ &wifi {
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l23a_3p3>;
qcom,ath10k-calibration-variant = "Thundercomm_RB2";
+ firmware-name = "qrb4210";
status = "okay";
};
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property
2024-01-30 16:38 ` [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property Dmitry Baryshkov
@ 2024-01-31 8:27 ` Krzysztof Kozlowski
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-31 8:27 UTC (permalink / raw)
To: Dmitry Baryshkov, Kalle Valo, Jeff Johnson, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On 30/01/2024 17:38, Dmitry Baryshkov wrote:
> For WCN3990 platforms we need to look for the platform / board specific
> firmware-N.mbn file which corresponds to the wlanmdsp.mbn loaded to the
> modem DSP via the TQFTPserv. Add firmware-name property describing this
> classifier.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides
2024-01-30 16:38 ` [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
@ 2024-02-12 11:12 ` Konrad Dybcio
2024-02-12 13:23 ` Dmitry Baryshkov
2024-03-01 8:01 ` Kalle Valo
1 sibling, 1 reply; 13+ messages in thread
From: Konrad Dybcio @ 2024-02-12 11:12 UTC (permalink / raw)
To: Dmitry Baryshkov, Kalle Valo, Jeff Johnson, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On 30.01.2024 17:38, Dmitry Baryshkov wrote:
> Different Qualcomm platforms using WCN3990 WiFI chip use SoC-specific
> firmware versions with different features. For example firmware for
> SDM845 doesn't use single-chan-info-per-channel feature, while firmware
> for QRB2210 / QRB4210 requires that feature. Allow board DT files to
> override the subdir of the fw dir used to lookup the firmware-N.bin file
> decribing corresponding WiFi firmware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
> drivers/net/wireless/ath/ath10k/core.h | 2 ++
> drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
> 3 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index 0032f8aa892f..ef7ce8b3f8fb 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -942,11 +942,20 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
> if (dir == NULL)
> dir = ".";
>
> + if (ar->board_name) {
> + snprintf(filename, sizeof(filename), "%s/%s/%s",
> + dir, ar->board_name, file);
> + ret = firmware_request_nowarn(&fw, filename, ar->dev);
> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
> + filename, ret);
Perhaps it'd be useful to move to a more noisy loglevel
Konrad
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
2024-01-30 16:38 ` [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node Dmitry Baryshkov
@ 2024-02-12 11:46 ` Konrad Dybcio
0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2024-02-12 11:46 UTC (permalink / raw)
To: Dmitry Baryshkov, Kalle Valo, Jeff Johnson, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On 30.01.2024 17:38, Dmitry Baryshkov wrote:
> Add firmware-name property to the WiFi device tree node to specify
> board-specific lookup directory.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
2024-01-30 16:38 ` [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: " Dmitry Baryshkov
@ 2024-02-12 11:46 ` Konrad Dybcio
0 siblings, 0 replies; 13+ messages in thread
From: Konrad Dybcio @ 2024-02-12 11:46 UTC (permalink / raw)
To: Dmitry Baryshkov, Kalle Valo, Jeff Johnson, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On 30.01.2024 17:38, Dmitry Baryshkov wrote:
> Add firmware-name property to the WiFi device tree node to specify
> board-specific lookup directory.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides
2024-02-12 11:12 ` Konrad Dybcio
@ 2024-02-12 13:23 ` Dmitry Baryshkov
0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-02-12 13:23 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Kalle Valo, Jeff Johnson, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, ath10k, linux-wireless, netdev,
devicetree, linux-arm-msm
On Mon, 12 Feb 2024 at 13:12, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 30.01.2024 17:38, Dmitry Baryshkov wrote:
> > Different Qualcomm platforms using WCN3990 WiFI chip use SoC-specific
> > firmware versions with different features. For example firmware for
> > SDM845 doesn't use single-chan-info-per-channel feature, while firmware
> > for QRB2210 / QRB4210 requires that feature. Allow board DT files to
> > override the subdir of the fw dir used to lookup the firmware-N.bin file
> > decribing corresponding WiFi firmware.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
> > drivers/net/wireless/ath/ath10k/core.h | 2 ++
> > drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
> > 3 files changed, 15 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> > index 0032f8aa892f..ef7ce8b3f8fb 100644
> > --- a/drivers/net/wireless/ath/ath10k/core.c
> > +++ b/drivers/net/wireless/ath/ath10k/core.c
> > @@ -942,11 +942,20 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
> > if (dir == NULL)
> > dir = ".";
> >
> > + if (ar->board_name) {
> > + snprintf(filename, sizeof(filename), "%s/%s/%s",
> > + dir, ar->board_name, file);
> > + ret = firmware_request_nowarn(&fw, filename, ar->dev);
> > + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
> > + filename, ret);
>
> Perhaps it'd be useful to move to a more noisy loglevel
No, these are details. If the firmware is in place, it is loaded properly.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
` (3 preceding siblings ...)
2024-01-30 16:38 ` [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: " Dmitry Baryshkov
@ 2024-02-12 20:56 ` Jeff Johnson
2024-02-19 22:23 ` Dmitry Baryshkov
4 siblings, 1 reply; 13+ messages in thread
From: Jeff Johnson @ 2024-02-12 20:56 UTC (permalink / raw)
To: Dmitry Baryshkov, Kalle Valo, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bjorn Andersson, Konrad Dybcio
Cc: ath10k, linux-wireless, netdev, devicetree, linux-arm-msm
On 1/30/2024 8:38 AM, Dmitry Baryshkov wrote:
> On WCN3990 platforms actual firmware, wlanmdsp.mbn, is sideloaded to the
> modem DSP via the TQFTPserv. These MBN files are signed by the device
> vendor, can only be used with the particular SoC or device.
>
> Unfortunately different firmware versions come with different features.
> For example firmware for SDM845 doesn't use single-chan-info-per-channel
> feature, while firmware for QRB2210 / QRB4210 requires that feature.
>
> Allow board DT files to override the subdir of the fw dir used to lookup
> the firmware-N.bin file decribing corresponding WiFi firmware.
> For example, adding firmware-name = "qrb4210" property will make the
> driver look for the firmware-N.bin first in ath10k/WCN3990/hw1.0/qrb4210
> directory and then fallback to the default ath10k/WCN3990/hw1.0 dir.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Dmitry Baryshkov (4):
> dt-bindings: net: wireless: ath10k: describe firmware-name property
> wifi: ath10k: support board-specific firmware overrides
> arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
> arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
>
> .../devicetree/bindings/net/wireless/qcom,ath10k.yaml | 6 ++++++
> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 1 +
> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 +
> drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
> drivers/net/wireless/ath/ath10k/core.h | 2 ++
> drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
> 6 files changed, 23 insertions(+), 1 deletion(-)
> ---
> base-commit: 596764183be8ebb13352b281a442a1f1151c9b06
> change-id: 20240130-wcn3990-firmware-path-7a05a0cf8107
>
> Best regards,
This series looks OK to me, but would like Kalle to review as well
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides
2024-02-12 20:56 ` [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Jeff Johnson
@ 2024-02-19 22:23 ` Dmitry Baryshkov
0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-02-19 22:23 UTC (permalink / raw)
To: Jeff Johnson, Kalle Valo
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, ath10k, linux-wireless, netdev, devicetree,
linux-arm-msm
On Mon, 12 Feb 2024 at 22:56, Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
>
> On 1/30/2024 8:38 AM, Dmitry Baryshkov wrote:
> > On WCN3990 platforms actual firmware, wlanmdsp.mbn, is sideloaded to the
> > modem DSP via the TQFTPserv. These MBN files are signed by the device
> > vendor, can only be used with the particular SoC or device.
> >
> > Unfortunately different firmware versions come with different features.
> > For example firmware for SDM845 doesn't use single-chan-info-per-channel
> > feature, while firmware for QRB2210 / QRB4210 requires that feature.
> >
> > Allow board DT files to override the subdir of the fw dir used to lookup
> > the firmware-N.bin file decribing corresponding WiFi firmware.
> > For example, adding firmware-name = "qrb4210" property will make the
> > driver look for the firmware-N.bin first in ath10k/WCN3990/hw1.0/qrb4210
> > directory and then fallback to the default ath10k/WCN3990/hw1.0 dir.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > Dmitry Baryshkov (4):
> > dt-bindings: net: wireless: ath10k: describe firmware-name property
> > wifi: ath10k: support board-specific firmware overrides
> > arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
> > arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
> >
> > .../devicetree/bindings/net/wireless/qcom,ath10k.yaml | 6 ++++++
> > arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 1 +
> > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 +
> > drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++++-
> > drivers/net/wireless/ath/ath10k/core.h | 2 ++
> > drivers/net/wireless/ath/ath10k/snoc.c | 3 +++
> > 6 files changed, 23 insertions(+), 1 deletion(-)
> > ---
> > base-commit: 596764183be8ebb13352b281a442a1f1151c9b06
> > change-id: 20240130-wcn3990-firmware-path-7a05a0cf8107
> >
> > Best regards,
> This series looks OK to me, but would like Kalle to review as well
Kalle, gracious ping. This is my proposal to fix the issue that we
have discussed at some point, wlanmdsp.mbn for sdm845 and for qcm2290
/ sm6115 have different features, resulting in kernel log being
spammed on the RB1 / RB2 boards.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides
2024-01-30 16:38 ` [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
2024-02-12 11:12 ` Konrad Dybcio
@ 2024-03-01 8:01 ` Kalle Valo
1 sibling, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2024-03-01 8:01 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jeff Johnson, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bjorn Andersson, Konrad Dybcio, ath10k, linux-wireless, netdev,
devicetree, linux-arm-msm
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> writes:
> Different Qualcomm platforms using WCN3990 WiFI chip use SoC-specific
> firmware versions with different features. For example firmware for
> SDM845 doesn't use single-chan-info-per-channel feature, while firmware
> for QRB2210 / QRB4210 requires that feature. Allow board DT files to
> override the subdir of the fw dir used to lookup the firmware-N.bin file
> decribing corresponding WiFi firmware.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sorry for the delay, too many drivers... But this looks good to me, few
small comments.
In the commit message it would it would be good to have an example of
the new firmware path. And also mention that board file (board-2.bin)
handling is not affected, at least that's how understood from reading
the code.
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -942,11 +942,20 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
> if (dir == NULL)
> dir = ".";
>
> + if (ar->board_name) {
> + snprintf(filename, sizeof(filename), "%s/%s/%s",
> + dir, ar->board_name, file);
> + ret = firmware_request_nowarn(&fw, filename, ar->dev);
> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
> + filename, ret);
> + if (!ret)
> + return fw;
> + }
So here you test if ar->board_name is NULL.
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -1337,6 +1337,9 @@ static void ath10k_snoc_quirks_init(struct ath10k *ar)
> struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
> struct device *dev = &ar_snoc->dev->dev;
>
> + /* ignore errors, default to empty string */
> + of_property_read_string(dev->of_node, "firmware-name", &ar->board_name);
What do you mean with empty string in this case, "\n" (with length of 1)
or NULL? Should we also test for strlen(0) in ath10k_fetch_fw_file()?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-03-01 8:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 16:38 [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
2024-01-30 16:38 ` [PATCH RFC 1/4] dt-bindings: net: wireless: ath10k: describe firmware-name property Dmitry Baryshkov
2024-01-31 8:27 ` Krzysztof Kozlowski
2024-01-30 16:38 ` [PATCH RFC 2/4] wifi: ath10k: support board-specific firmware overrides Dmitry Baryshkov
2024-02-12 11:12 ` Konrad Dybcio
2024-02-12 13:23 ` Dmitry Baryshkov
2024-03-01 8:01 ` Kalle Valo
2024-01-30 16:38 ` [PATCH RFC 3/4] arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node Dmitry Baryshkov
2024-02-12 11:46 ` Konrad Dybcio
2024-01-30 16:38 ` [PATCH RFC 4/4] arm64: dts: qcom: qrb4210-rb1: " Dmitry Baryshkov
2024-02-12 11:46 ` Konrad Dybcio
2024-02-12 20:56 ` [PATCH RFC 0/4] wifi: ath10k: support board-specific firmware overrides Jeff Johnson
2024-02-19 22:23 ` Dmitry Baryshkov
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).