ath11k: support IPQ9574
Subsystems (3)
cover ath11k: support IPQ9574
Hi,
This is my attempt to make ath11k work on IPQ9574. IPQ9574 is intended for wifi-7 devices, so it seems the exception rather than the rule to pair it with a wifi-6 chip. That's exactly what my Archer BE550 does.
This consists of a wifi-6 (QCN5024) chip connected via PCIe to the SoC, but exposed to the OS via AHB. The Q6 firmware [4] requires remoteproc support introduced in a separate series [3]. The QMI firmware interface is very similar to IPQ6018, such that almost no new code is needed.
I am not including the wifi@c000000 devicetree node in this series, as it depends on nodes from the remoteproc series [3].
I have been successfully doogfooding this for a few of weeks in AP mode. There dependencies to this series. [2] is a compile-time dependency, whereas [1] and [3] are needed for full functionality. I was adivsed to leave [1] and [2] as separate patches and not add them to this series.
[1] https://lore.kernel.org/ath11k/[email protected]/
[2] https://lore.kernel.org/ath11k/[email protected]/
[3] https://lore.kernel.org/linux-remoteproc/[email protected]/
[4] https://github.com/quic/upstream-wifi-fw
Alexandru Gagniuc (2):
dt: bindings: net: ath11k: add IPQ9574 compatible
wifi: ath11k: support ipq9574
.../bindings/net/wireless/qcom,ath11k.yaml | 3 + drivers/net/wireless/ath/ath11k/ahb.c | 4 + drivers/net/wireless/ath/ath11k/core.c | 82 +++++++++++++++++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/hw.c | 51 ++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 6 files changed, 142 insertions(+)
Signature · 1 line
2.45.1
PATCH 1/2 dt: bindings: net: ath11k: add IPQ9574 compatible
Add IPQ9574 device support for ath11k. The schema is identical to ipq6018, so add the compatible string where needed.
--- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +3 -0
@@ -17,6 +17,7 @@ description: | properties: compatible: enum: + - qcom,ipq9574-wifi - qcom,ipq8074-wifi - qcom,ipq6018-wifi - qcom,wcn6750-wifi
@@ -102,6 +103,7 @@ allOf: compatible: contains: enum: + - qcom,ipq9574-wifi - qcom,ipq8074-wifi - qcom,ipq6018-wifi then:
@@ -220,6 +222,7 @@ allOf: compatible: contains: enum: + - qcom,ipq9574-wifi - qcom,ipq8074-wifi - qcom,ipq6018-wifi then:
Signature · 1 line
2.45.1
Re: [PATCH 1/2] dt: bindings: net: ath11k: add IPQ9574 compatible
Quoted 13 lines · Alexandru Gagniuc
Add IPQ9574 device support for ath11k. The schema is identical to ipq6018, so add the compatible string where needed.
Signed-off-by Alexandru Gagniuc <[email protected]>--- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +0
-0
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml description: | · line 22
Quoted 6 lines
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +1
-0@@ -17,6 +17,7 @@ description: | properties: compatible: enum: + - qcom,ipq9574-wifi - qcom,ipq8074-wifi - qcom,ipq6018-wifi
Although it looks like reverse-sorted, but Qualcomm bindings use always alphabetical sorting (non-reverse), so please place it after qcom,ipq8074-wifi.
Same in further places.
Best regards,
Krzysztof
PATCH 2/2 wifi: ath11k: support ipq9574
In reply to Alexandru GagniucThe IPQ9574 can be coupled with wifi-6 chips, like QCN5024 to expose a wifi device over AHB. Add the data structures necessarry to describe the IPQ9574 wifi hardware.
The CE configs are identical to IPQ6018, as confirmed by inspecting the out-of-tree qca-wifi-host-cmn (cnss2) driver.
Coldboot calibration does not seem to work. One of two issues are seen. (1) The remoteproc firmware crashes with a fatal error, or
(2) the firmware stops sending qmi responses, appearing to hang. Leave coldboot calibration disabled for now.
Tested-on: IPQ5974 WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1
---
Most information about the fields cames from the donwstream patch [1]. Analysis of the out-of-tree driver [2] shows that the IPQ9574 uses the same CE configs as IPQ6018.
[1] https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open/-/raw/NHSS.QSDK.12.4.5.r2/mac80211/patches/324-ath11k-ipq9574-support.patch?inline=false
[2] https://git.codelinaro.org/clo/external-wlan/qca-wifi-host-cmn/-/blob/caf_migration/wlan-cmn.driver.lnx.2.13/hif/src/ce/ce_assignment.h?ref_type=heads
--- drivers/net/wireless/ath/ath11k/ahb.c | 4 ++ drivers/net/wireless/ath/ath11k/core.c | 82 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/hw.c | 51 ++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 5 files changed, 139 insertions(+)
drivers/net/wireless/ath/ath11k/ahb.c +4 -0
@@ -25,6 +25,9 @@ static const struct of_device_id ath11k_ahb_of_match[] = {/* TODO: Should we change the compatible string to something similar * to one that ath10k uses? */ + { .compatible = "qcom,ipq9574-wifi", + .data = (void *)ATH11K_HW_IPQ9574, + }, { .compatible = "qcom,ipq8074-wifi", .data = (void *)ATH11K_HW_IPQ8074, },
@@ -1117,6 +1120,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev) hw_rev = (uintptr_t )device_get_match_data (&pdev->dev);switch (hw_rev) { +case ATH11K_HW_IPQ9574 :case ATH11K_HW_IPQ8074 :case ATH11K_HW_IPQ6018_HW10 :case ATH11K_HW_IPQ5018_HW10 :
drivers/net/wireless/ath/ath11k/core.c +82 -0
88 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/core.h +1 -0
@@ -142,6 +142,7 @@ struct ath11k_skb_rxcb { };enum ath11k_hw_rev { +ATH11K_HW_IPQ9574 ,ATH11K_HW_IPQ8074 ,ATH11K_HW_QCA6390_HW20 ,ATH11K_HW_IPQ6018_HW10 ,
drivers/net/wireless/ath/ath11k/hw.c +51 -0
63 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -273,6 +273,7 @@ struct ath11k_hw_ops {u32 (*get_ring_selector)(struct sk_buff *skb); }; +extern const struct ath11k_hw_ops ipq9574_ops;extern const struct ath11k_hw_ops ipq8074_ops;extern const struct ath11k_hw_ops ipq6018_ops;extern const struct ath11k_hw_ops qca6390_ops;
Signature · 1 line
2.45.1