* [PATCH qca6390-bringup] ath11k: enable internal sleep clock
@ 2019-12-20 3:28 Carl Huang
2019-12-20 14:18 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Carl Huang @ 2019-12-20 3:28 UTC (permalink / raw
To: ath11k
For QCA6390 on x86 and non-qcom platfrom, host need explicitly tell firmware
to use internal sleep clock. Some QCA6390 modules have OTP burnt with external
sleep clock selected, and these moduesl usually can't work normally on
these platforms unless firmware selects internal sleep clock.
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/qmi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index d96446c..6612637 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -14,6 +14,8 @@
#define BDF_FILE_NAME_PREFIX "bdwlan"
#define MAX_M3_FILE_NAME_LENGTH 13
#define DEFAULT_M3_FILE_NAME "m3.bin"
+#define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02
+#define HOST_CSTATE_BIT 0x04
static struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
{
@@ -1537,6 +1539,15 @@ static int ath11k_qmi_host_cap_send(struct ath11k_base *ab)
req.cal_done_valid = 1;
req.cal_done = ab->qmi.cal_done;
+ req.nm_modem_valid = 1;
+ /*notify firmware that os is X86*/
+ req.nm_modem |= HOST_CSTATE_BIT;
+ /* notify firmware about the sleep clock selection,
+ * discussed with firmware, nm_modem_bit[1] used for this purpose
+ * x86 host driver should select internal sleep clock.
+ */
+ req.nm_modem |= SLEEP_CLOCK_SELECT_INTERNAL_BIT;
+
ret = qmi_txn_init(&ab->qmi.handle, &txn,
qmi_wlanfw_host_cap_resp_msg_v01_ei, &resp);
if (ret < 0)
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH qca6390-bringup] ath11k: enable internal sleep clock
2019-12-20 3:28 [PATCH qca6390-bringup] ath11k: enable internal sleep clock Carl Huang
@ 2019-12-20 14:18 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-12-20 14:18 UTC (permalink / raw
To: Carl Huang; +Cc: ath11k
Carl Huang <cjhuang@codeaurora.org> writes:
> For QCA6390 on x86 and non-qcom platfrom, host need explicitly tell firmware
> to use internal sleep clock. Some QCA6390 modules have OTP burnt with external
> sleep clock selected, and these moduesl usually can't work normally on
> these platforms unless firmware selects internal sleep clock.
>
> Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
I applied the 8 qca6390 patches you submitted to ath11k-qca6390-bringup
branch now.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-20 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-20 3:28 [PATCH qca6390-bringup] ath11k: enable internal sleep clock Carl Huang
2019-12-20 14:18 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.