Skip to content

Commit cdbbc48

Browse files
Taniya Dasandersson
authored andcommitted
clk: qcom: lpassaudiocc-sc7280: Add support for LPASS resets for QCM6490
On the QCM6490 boards, the LPASS firmware controls the complete clock controller functionalities and associated power domains. However, only the LPASS resets required to be controlled by the high level OS. Thus, add support for the resets in the clock driver to enable the Audio SW driver to assert/deassert the audio resets as needed. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20250221-lpass_qcm6490_resets-v5-2-6be0c0949a83@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent c16e576 commit cdbbc48

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

drivers/clk/qcom/lpassaudiocc-sc7280.c

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
33
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
4+
* Copyright (c) 2025, Qualcomm Innovation Center, Inc. All rights reserved.
45
*/
56

67
#include <linux/clk-provider.h>
@@ -713,14 +714,24 @@ static const struct qcom_reset_map lpass_audio_cc_sc7280_resets[] = {
713714
[LPASS_AUDIO_SWR_WSA_CGCR] = { 0xb0, 1 },
714715
};
715716

717+
static const struct regmap_config lpass_audio_cc_sc7280_reset_regmap_config = {
718+
.name = "lpassaudio_cc_reset",
719+
.reg_bits = 32,
720+
.reg_stride = 4,
721+
.val_bits = 32,
722+
.fast_io = true,
723+
.max_register = 0xc8,
724+
};
725+
716726
static const struct qcom_cc_desc lpass_audio_cc_reset_sc7280_desc = {
717-
.config = &lpass_audio_cc_sc7280_regmap_config,
727+
.config = &lpass_audio_cc_sc7280_reset_regmap_config,
718728
.resets = lpass_audio_cc_sc7280_resets,
719729
.num_resets = ARRAY_SIZE(lpass_audio_cc_sc7280_resets),
720730
};
721731

722732
static const struct of_device_id lpass_audio_cc_sc7280_match_table[] = {
723-
{ .compatible = "qcom,sc7280-lpassaudiocc" },
733+
{ .compatible = "qcom,qcm6490-lpassaudiocc", .data = &lpass_audio_cc_reset_sc7280_desc },
734+
{ .compatible = "qcom,sc7280-lpassaudiocc", .data = &lpass_audio_cc_sc7280_desc },
724735
{ }
725736
};
726737
MODULE_DEVICE_TABLE(of, lpass_audio_cc_sc7280_match_table);
@@ -752,13 +763,17 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
752763
struct regmap *regmap;
753764
int ret;
754765

766+
desc = device_get_match_data(&pdev->dev);
767+
768+
if (of_device_is_compatible(pdev->dev.of_node, "qcom,qcm6490-lpassaudiocc"))
769+
return qcom_cc_probe_by_index(pdev, 1, desc);
770+
755771
ret = lpass_audio_setup_runtime_pm(pdev);
756772
if (ret)
757773
return ret;
758774

759775
lpass_audio_cc_sc7280_regmap_config.name = "lpassaudio_cc";
760776
lpass_audio_cc_sc7280_regmap_config.max_register = 0x2f000;
761-
desc = &lpass_audio_cc_sc7280_desc;
762777

763778
regmap = qcom_cc_map(pdev, desc);
764779
if (IS_ERR(regmap)) {
@@ -772,7 +787,7 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
772787
regmap_write(regmap, 0x4, 0x3b);
773788
regmap_write(regmap, 0x8, 0xff05);
774789

775-
ret = qcom_cc_really_probe(&pdev->dev, &lpass_audio_cc_sc7280_desc, regmap);
790+
ret = qcom_cc_really_probe(&pdev->dev, desc, regmap);
776791
if (ret) {
777792
dev_err(&pdev->dev, "Failed to register LPASS AUDIO CC clocks\n");
778793
goto exit;

0 commit comments

Comments
 (0)