openwrt/target/linux/qualcommax/patches-6.1/0908-remoteproc-qcom_q6v5_wcss-add-optional-qdss_at-clock.patch
Mantas Pucka 23deb4ac90
qualcommax: add ipq60xx support
Introduce support for the Qualcomm IPQ60xx SoC. WiFi support still has
to be handled and correctly fix hence this is currently marked as
source-only to have a solid base to progress on correct support of this
and hope Upstream QUIC publish newers ath11k drivers for this SoC.

Co-developed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Mantas Pucka <mantas@8devices.com>
[ improve commit description, add SoB for Robert, make it source-only ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-09 14:01:51 +01:00

56 lines
1.4 KiB
Diff

From 87dbcc69a7e3fe6ccddf4fe9bdbf51330f5e4a77 Mon Sep 17 00:00:00 2001
From: Mantas Pucka <mantas@8devices.com>
Date: Tue, 23 Jan 2024 11:04:04 +0200
Subject: [PATCH] remoteproc: qcom_q6v5_wcss: add optional qdss_at clock
IPQ6018 needs QDSS_AT clock enabled when loading wifi. Optionally enable it
when provided by DT.
Signed-off-by: Mantas Pucka <mantas@8devices.com>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -120,6 +120,7 @@ struct q6v5_wcss {
struct clk *qdsp6ss_core_gfmux;
struct clk *lcc_bcr_sleep;
struct clk *prng_clk;
+ struct clk *qdss_clk;
struct regulator *cx_supply;
struct qcom_sysmon *sysmon;
@@ -259,6 +260,9 @@ static int q6v5_wcss_start(struct rproc
return ret;
}
+ if (wcss->qdss_clk)
+ clk_prepare_enable(wcss->qdss_clk);
+
qcom_q6v5_prepare(&wcss->q6v5);
if (wcss->need_mem_protection) {
@@ -772,6 +776,8 @@ static int q6v5_wcss_stop(struct rproc *
}
pas_done:
+ if (wcss->qdss_clk)
+ clk_disable_unprepare(wcss->qdss_clk);
clk_disable_unprepare(wcss->prng_clk);
qcom_q6v5_unprepare(&wcss->q6v5);
@@ -981,6 +987,12 @@ static int ipq_init_clock(struct q6v5_wc
dev_err(wcss->dev, "Failed to get prng clock\n");
return ret;
}
+
+ wcss->qdss_clk = devm_clk_get(wcss->dev, "qdss");
+ if (IS_ERR(wcss->qdss_clk)) {
+ wcss->qdss_clk = NULL;
+ }
+
return 0;
}