Skip to contentSkip to conversation

ath11k: support IPQ9574

PATCH In review Alexandru Gagniuc 3 participants 5 messages Jan 9 – Jan 29

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover ath11k: support IPQ9574

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

Changes since v1:
- place compatible strings after instead of before ipq8074

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(+)

--
2.45.1

#1 lore raw

PATCH v2 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.

---
Changes since v1:
- place compatible strings after instead of before ipq8074

---
 .../devicetree/bindings/net/wireless/qcom,ath11k.yaml          | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +3 -0
index c089677702cf..5efb2ce0a6be 100644
@@ -18,6 +18,7 @@ properties:
   compatible:
     enum:
       - qcom,ipq8074-wifi
+      - qcom,ipq9574-wifi
       - qcom,ipq6018-wifi
       - qcom,wcn6750-wifi
       - qcom,ipq5018-wifi
@@ -103,6 +104,7 @@ allOf:
           contains:
             enum:
               - qcom,ipq8074-wifi
+              - qcom,ipq9574-wifi
               - qcom,ipq6018-wifi
     then:
       properties:
@@ -221,6 +223,7 @@ allOf:
           contains:
             enum:
               - qcom,ipq8074-wifi
+              - qcom,ipq9574-wifi
               - qcom,ipq6018-wifi
     then:
       required:
Signature · 1 line
2.45.1
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] dt: bindings: net: ath11k: add IPQ9574 compatible

Quoted 10 lines · Alexandru Gagniuc

Add IPQ9574 device support for ath11k. The schema is identical to ipq6018, so add the compatible string where needed.

---
Changes since v1:
- place compatible strings after instead of before ipq8074

---
 .../devicetree/bindings/net/wireless/qcom,ath11k.yaml          | 3 +++
 1 file changed, 3 insertions(+)

Best regards,
Krzysztof

#3 lore raw

PATCH v2 2/2 wifi: ath11k: support ipq9574

In reply to Alexandru Gagniuc

The 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
index 8dfe9b40c126..e68bcc6b6069 100644
@@ -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
index e8780b05ce11..9a4acde3acfa 100644
@@ -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
index 52d9f4c13b13..0ea36c8ebb66 100644
@@ -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
#4 lore raw
In reply to Alexandru Gagniuc
Quoted 6 lines · Alexandru Gagniuc

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.

Pls note that IPQ9574 has internal wifi-6 which is connected AHB not PCIe. Also, host driver does not really need to worry about QCN5024 (that is not connected over PCIe either anyway). You may also want to change the commit message of "[PATCH v2 2/2] wifi: ath11k: support ipq9574" accordingly.

Vasanth