summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2023-06-08 14:53:13 +0200
committerBjorn Andersson <andersson@kernel.org>2023-06-13 20:14:04 +0200
commitc2ef1ec97c1fb932d0cccaee71270f56898b9cd0 (patch)
tree9ba52bbcc813ed1c95db1e594b30f8366c166233 /drivers/clk
parentclk: qcom: Add lpass clock controller driver for SC8280XP (diff)
downloadlinux-c2ef1ec97c1fb932d0cccaee71270f56898b9cd0.tar.xz
linux-c2ef1ec97c1fb932d0cccaee71270f56898b9cd0.zip
clk: qcom: Add lpass audio clock controller driver for SC8280XP
Add support for the lpass audio clock controller found on SC8280XP based devices. This would allow lpass peripheral loader drivers to control the clocks and bring the subsystems out of reset. Currently this patch only supports resets as the Q6DSP is in control of LPASS IP which manages most of the clocks via Q6PRM service on GPR rpmsg channel. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230608125315.11454-5-srinivas.kandagatla@linaro.org
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/qcom/lpasscc-sc8280xp.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/clk/qcom/lpasscc-sc8280xp.c b/drivers/clk/qcom/lpasscc-sc8280xp.c
index 4a0470fc6153..43b37ce397cf 100644
--- a/drivers/clk/qcom/lpasscc-sc8280xp.c
+++ b/drivers/clk/qcom/lpasscc-sc8280xp.c
@@ -15,6 +15,26 @@
#include "common.h"
#include "reset.h"
+static const struct qcom_reset_map lpass_audiocc_sc8280xp_resets[] = {
+ [LPASS_AUDIO_SWR_RX_CGCR] = { 0xa0, 1 },
+ [LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 },
+ [LPASS_AUDIO_SWR_WSA2_CGCR] = { 0xd8, 1 },
+};
+
+static struct regmap_config lpass_audiocc_sc8280xp_regmap_config = {
+ .reg_bits = 32,
+ .reg_stride = 4,
+ .val_bits = 32,
+ .name = "lpass-audio-csr",
+ .max_register = 0x1000,
+};
+
+static const struct qcom_cc_desc lpass_audiocc_sc8280xp_reset_desc = {
+ .config = &lpass_audiocc_sc8280xp_regmap_config,
+ .resets = lpass_audiocc_sc8280xp_resets,
+ .num_resets = ARRAY_SIZE(lpass_audiocc_sc8280xp_resets),
+};
+
static const struct qcom_reset_map lpasscc_sc8280xp_resets[] = {
[LPASS_AUDIO_SWR_TX_CGCR] = { 0xc010, 1 },
};
@@ -35,6 +55,9 @@ static const struct qcom_cc_desc lpasscc_sc8280xp_reset_desc = {
static const struct of_device_id lpasscc_sc8280xp_match_table[] = {
{
+ .compatible = "qcom,sc8280xp-lpassaudiocc",
+ .data = &lpass_audiocc_sc8280xp_reset_desc,
+ }, {
.compatible = "qcom,sc8280xp-lpasscc",
.data = &lpasscc_sc8280xp_reset_desc,
},