Skip to contentSkip to conversation

ath11k: add driver [q6_rproc DTS property)

PATCH Sven Eckelmann 1 participant 2 messages Apr 8, 2019 – Apr 10, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · On Tuesday, 5 February 2019 17:22:34 CEST Kalle Valo wrote:

Initial commit for ath11k, Qualcomm 802.11ax driver.

---

[...]

Quoted 11 lines
(quoted diff) +11 -0
+int ath11k_core_init(struct ath11k_base *sc)
+{
+	struct device *dev = sc->dev;
+	struct rproc *prproc;
+	phandle rproc_phandle;
+	int ret;
+
+#ifndef CONFIG_IPQ_SUBSYSTEM_RESTART
+	if (of_property_read_u32(dev->of_node, "q6_rproc", &rproc_phandle)) {
+		ath11k_err(sc, "failed to get q6_rproc handle\n");
+		return -ENOENT;

Review

Quoted 10 lines
(quoted diff) +10 -0
+	}
+
+	prproc = rproc_get_by_phandle(rproc_phandle);
+	if (!prproc) {
+		ath11k_err(sc, "failed to get rproc\n");
+		return -EINVAL;
+	}
+	sc->tgt_rproc = prproc;
+#endif
+

What is this q6_rproc DTS property (and why doesn't have it a qcom, prefix and not just called qcom,rproc)? I cannot find a public use of this and there also doesn't seem to be documentation for it. Still it is required to bring up the device without IPQ_SUBSYSTEM_RESTART (which is not available in the upstream kernel) but with remoteproc.

The first reference I could find this in your internal linux-msm [1] was also in this driver. There were also some function named similar in the q6v6 adsp/ q6v5 wcss driver [2] but no actual use in a dts or documentation. A wcss pil driver for remoteproc seems to be upstream now [3] but it isn't used anywhere.

Back to your QCA kernel to try out the remoteproc based image loading code (which I wanted to use to check if there is a difference regarding the BDF loading problem mentioned in the other mail):

I have now tried to set it to q6v5_wcss (compatible qca,q6v5-wcss-rproc) for your internal 4.4 tree

    --- linux-4.4.60.orig/arch/arm64/boot/dts/qcom/qcom-ipq807x-soc.dtsi
    +++ linux-4.4.60/arch/arm64/boot/dts/qcom/qcom-ipq807x-soc.dtsi
    @@ -1741,7 +1741,8 @@
     		};
     
     		wifi0: wifi@c0000000 {
    -			compatible = "qcom,cnss-qca8074";
    +			compatible = "qcom,ipq8074-wifi";
    +			q6_rproc = <&q6v5_wcss>;
     			reg = <0xc000000 0x2000000>;
     			qcom,hw-mode-id = <1>;
     			qcom,tgt-mem-mode = <0>;

But this one is not accepted as rproc. Problem is that start_q6 isn't called (which would register it as rproc). Without this, it will not come find the rproc and thus stop the startup of the ath11k driver. Unsure who is responsible here to call the subsys_desc.powerup because subsystem_restart.c is the only thing implementing this code (but it is depending on CONFIG_IPQ_SUBSYSTEM_RESTART - the thing which was disabled here to have the rproc code path for image loading).

Btw. there is also q6v5_m3 - unsure whether this is also related. But its start_m3 is also not called.

As as start, it would be good to know first what q6_rproc should refer to.

Kind regards,
Sven

[1] https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/
[2] https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/commit/?id=e421b7cd70b302e1f19cba6c9f2b88a38e20e9a0

    https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/commit/?id=184547bc8366dcf30e4b162d7f54d709e827331a
    https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/commit/?id=251c755e69dfebd6144ab25965c8f869d6f2472f
    https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/commit/?id=ae52a5c5c01c687370cabc2e462dd86d243619cb
    https://source.codeaurora.org/quic/cc-qrdk/oss/kernel/linux-msm/commit/?id=d7dce7a374bad6dd5c7db5bc772b14745f8aaf53

[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3a3d4163e0bfde184ffbc54c887f5b1ec9969c90

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k

#1 lore raw

On Monday, 8 April 2019 19:42:24 CEST Sven Eckelmann wrote:
[...]

Quoted 11 lines

What is this q6_rproc DTS property (and why doesn't have it a qcom, prefix and not just called qcom,rproc)? I cannot find a public use of this and there also doesn't seem to be documentation for it. Still it is required to bring up the device without IPQ_SUBSYSTEM_RESTART (which is not available in the upstream kernel) but with remoteproc.

The first reference I could find this in your internal linux-msm [1] was also in this driver. There were also some function named similar in the q6v6 adsp/ q6v5 wcss driver [2] but no actual use in a dts or documentation. A wcss pil driver for remoteproc seems to be upstream now [3] but it isn't used anywhere.

I just saw the commit

    Subject: ath11k: add qmi API support and rproc_boot for Q6
    
    rproc_boot() is used to power up the Q6 remote processor.
    Q6 has the QMI server running. on Q6 power up 'qrtr-cfg'
    and 'qrtr-ns' applications will send the .new_server()
    notification to ath11k driver.
      - qrtr source 'https://github.com/andersson/qrtr'
    
    Load the BDF/cal-data and share the CE config to Q6 target
    using the below list of QMI messages.
    
    QMI Client [ATH11K]             QMI server [Q6 FW]
            <-----  ATH11K_QMI_EVENT_SERVER_ARRIVE  ----
            ---- QMI_WLANFW_IND_REGISTER_REQ_V01 ----->
            <---- QMI_WLANFW_IND_REGISTER_RESP_V01 ----
            ---- QMI_WLANFW_HOST_CAP_REQ_V01 ---->
            <---- QMI_WLFW_HOST_CAP_RESP_V01 ----
            <---- ATH11K_QMI_EVENT_REQUEST_MEM ----
            ---- QMI_WLANFW_RESPOND_MEM_REQ_V01 ---->
            <---- QMI_WLANFW_RESPOND_MEM_RESP_V01 ----
            <---- ATH11K_QMI_EVENT_FW_MEM_READY ----
            ---- QMI_WLANFW_CAP_REQ_V01 ---->
            <---- QMI_WLANFW_CAP_RESP_V01 ----
            ---- QMI_WLANFW_BDF_DOWNLOAD_REQ_V01 ---->
            <---- QMI_WLANFW_BDF_DOWNLOAD_RESP_V01 ----
            ---- QMI_WLANFW_BDF_DOWNLOAD_REQ_V01 ---->
            <---- QMI_WLANFW_BDF_DOWNLOAD_RESP_V01 ----
            ---- QMI_WLANFW_M3_INFO_REQ_V01 ---->
            <---- QMI_WLANFW_M3_INFO_RESP_V01 ----
            <---- ATH11K_QMI_EVENT_FW_READY ----
            ---- QMI_WLANFW_WLAN_CFG_REQ_V01 ---->
            <---- QMI_WLANFW_WLAN_CFG_RESP_V01 ----
            ---- QMI_WLANFW_WLAN_MODE_REQ_V01 ---->
            <---- QMI_WLANFW_WLAN_MODE_RESP_V01 ----

This one basically removes the support for the QCA 4.4 kernel with IPQ_SUBSYSTEM_RESTART - which is the one we tried to use in the past. What is now the correct one to use and where can I find the info what qcom,rproc refers to in the DTS?

Kind regards,
Sven

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k