linux-yocto: Add support to skip PLL configuration for sc7280

On certain targets the PLL configuration should be skipped, thus add a
device property to support the same.

Signed-off-by: Atul Dhudase <quic_adhudase@quicinc.com>
This commit is contained in:
Atul Dhudase
2023-11-20 12:16:40 +05:30
parent d73d955eb4
commit fa810d7983
3 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From 8a67d7619a576a3f95be7d27910c89bb801f6d03 Mon Sep 17 00:00:00 2001
From: Taniya Das <quic_tdas@quicinc.com>
Date: Wed, 1 Nov 2023 10:30:17 +0530
Subject: [PATCH 1/2] PENDING: dt-bindings: clock: Add "qcom,adsp-skip-pll"
property
Add support for "qcom,adsp-skip-pll" so as to avoid configuring the
LPASS PLL.
Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Atul Dhudase <quic_adhudase@quicinc.com>
Upstream-Status: Pending
---
.../devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
index 447cdc447a0c..5587d4ca82a6 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscorecc.yaml
@@ -49,6 +49,11 @@ properties:
peripheral loader.
type: boolean
+ qcom,adsp-skip-pll:
+ description:
+ Indicates if the LPASS PLL configuration would be skipped.
+ type: boolean
+
required:
- compatible
- reg
--
2.25.1

View File

@@ -0,0 +1,59 @@
From 96ef94902f0ce507d21cefb3ffaf841640556cff Mon Sep 17 00:00:00 2001
From: Taniya Das <quic_tdas@quicinc.com>
Date: Tue, 31 Oct 2023 23:56:38 +0530
Subject: [PATCH 2/2] PENDING: clk: qcom: lpassaudiocc: Add support to skip PLL
configuration
On certain targets the PLL configuration should be skipped, thus add a
device property to support the same.
Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Atul Dhudase <quic_adhudase@quicinc.com>
Upstream-Status: Pending
---
drivers/clk/qcom/lpassaudiocc-sc7280.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/qcom/lpassaudiocc-sc7280.c b/drivers/clk/qcom/lpassaudiocc-sc7280.c
index 134eb1529ede..5322ff53a3e1 100644
--- a/drivers/clk/qcom/lpassaudiocc-sc7280.c
+++ b/drivers/clk/qcom/lpassaudiocc-sc7280.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/clk-provider.h>
@@ -765,11 +766,13 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
goto exit;
}
- clk_zonda_pll_configure(&lpass_audio_cc_pll, regmap, &lpass_audio_cc_pll_config);
+ if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-skip-pll")) {
+ clk_zonda_pll_configure(&lpass_audio_cc_pll, regmap, &lpass_audio_cc_pll_config);
- /* PLL settings */
- regmap_write(regmap, 0x4, 0x3b);
- regmap_write(regmap, 0x8, 0xff05);
+ /* PLL settings */
+ regmap_write(regmap, 0x4, 0x3b);
+ regmap_write(regmap, 0x8, 0xff05);
+ }
ret = qcom_cc_really_probe(pdev, &lpass_audio_cc_sc7280_desc, regmap);
if (ret) {
@@ -777,6 +780,9 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
goto exit;
}
+ lpass_audio_cc_sc7280_regmap_config.name = "lpassaudio_cc_reset";
+ lpass_audio_cc_sc7280_regmap_config.max_register = 0xc8;
+
ret = qcom_cc_probe_by_index(pdev, 1, &lpass_audio_cc_reset_sc7280_desc);
if (ret) {
dev_err(&pdev->dev, "Failed to register LPASS AUDIO CC Resets\n");
--
2.25.1

View File

@@ -5,4 +5,6 @@ SRC_URI:append:qcom = " \
file://generic-drivers/0002-FROMLIST-dma-heap-Provide-accessors-so-that-in-kerne.patch \
file://qcm6490-drivers/0001-FROMGIT-phy-qcom-qmp-ufs-Add-Phy-Configuration-suppo.patch \
file://qcm6490-drivers/0001-PENDING-clk-qcom-gcc-Enable-the-force-mem-core-for-U.patch \
file://qcm6490-drivers/0001-PENDING-dt-bindings-clock-Add-qcom-adsp-skip-pll-pro.patch \
file://qcm6490-drivers/0002-PENDING-clk-qcom-lpassaudiocc-Add-support-to-skip-PL.patch \
"