* [PATCH v10 1/3] dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property
2023-03-31 15:28 [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Mohammad Rafi Shaik
@ 2023-03-31 15:28 ` Mohammad Rafi Shaik
2023-03-31 15:28 ` [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration Mohammad Rafi Shaik
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mohammad Rafi Shaik @ 2023-03-31 15:28 UTC (permalink / raw)
To: swboyd, krzysztof.kozlowski+dt, agross, andersson, robh+dt,
broonie, quic_plai, konrad.dybcio, mturquette, sboyd,
linux-arm-msm, linux-clk, linux-kernel, quic_rohkumar, quic_visr
Cc: Srinivasa Rao Mandadapu, Mohammad Rafi Shaik, Krzysztof Kozlowski
From: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
When this property is set, the remoteproc is used to boot the
LPASS and therefore qdsp6ss clocks would be used to bring LPASS
out of reset, hence they are directly controlled by the remoteproc.
This is a cleanup done to handle overlap of regmap of lpasscc
and adsp remoteproc blocks.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
.../devicetree/bindings/clock/qcom,sc7280-lpasscc.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscc.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscc.yaml
index 6151fdebbff8..97c6bd96e0cb 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7280-lpasscc.yaml
@@ -41,6 +41,12 @@ properties:
- const: qdsp6ss
- const: top_cc
+ qcom,adsp-pil-mode:
+ description:
+ Indicates if the LPASS would be brought out of reset using
+ remoteproc peripheral loader.
+ type: boolean
+
required:
- compatible
- reg
@@ -60,6 +66,7 @@ examples:
reg-names = "qdsp6ss", "top_cc";
clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>;
clock-names = "iface";
+ qcom,adsp-pil-mode;
#clock-cells = <1>;
};
...
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration
2023-03-31 15:28 [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Mohammad Rafi Shaik
2023-03-31 15:28 ` [PATCH v10 1/3] dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property Mohammad Rafi Shaik
@ 2023-03-31 15:28 ` Mohammad Rafi Shaik
2023-03-31 18:46 ` Stephen Boyd
2023-03-31 15:28 ` [PATCH v10 3/3] clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc Mohammad Rafi Shaik
2023-03-31 18:48 ` [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Stephen Boyd
3 siblings, 1 reply; 7+ messages in thread
From: Mohammad Rafi Shaik @ 2023-03-31 15:28 UTC (permalink / raw)
To: swboyd, krzysztof.kozlowski+dt, agross, andersson, robh+dt,
broonie, quic_plai, konrad.dybcio, mturquette, sboyd,
linux-arm-msm, linux-clk, linux-kernel, quic_rohkumar, quic_visr
Cc: Srinivasa Rao Mandadapu, Mohammad Rafi Shaik
From: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
The qdsp6ss memory region is being shared by ADSP remoteproc device and
lpasscc clock device, hence causing memory conflict.
To avoid this, when qdsp6ss clocks are being enabled in remoteproc driver,
skip qdsp6ss clock registration if "qcom,adsp-pil-mode" is enabled.
Fixes: 4ab43d171181 ("clk: qcom: Add lpass clock controller driver for SC7280")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/clk/qcom/lpasscc-sc7280.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c
index 5c1e17bd0d76..24aeed6bcf0e 100644
--- a/drivers/clk/qcom/lpasscc-sc7280.c
+++ b/drivers/clk/qcom/lpasscc-sc7280.c
@@ -17,6 +17,8 @@
#include "clk-branch.h"
#include "common.h"
+#define QDSP6SS_MAX_REGISTER 0x3f
+
static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = {
.halt_reg = 0x0,
.halt_check = BRANCH_HALT,
@@ -118,12 +120,15 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
goto destroy_pm_clk;
}
- lpass_regmap_config.name = "qdsp6ss";
- desc = &lpass_qdsp6ss_sc7280_desc;
+ if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
+ lpass_regmap_config.name = "qdsp6ss";
+ lpass_regmap_config.max_register = QDSP6SS_MAX_REGISTER;
+ desc = &lpass_qdsp6ss_sc7280_desc;
- ret = qcom_cc_probe_by_index(pdev, 0, desc);
- if (ret)
- goto destroy_pm_clk;
+ ret = qcom_cc_probe_by_index(pdev, 0, desc);
+ if (ret)
+ goto destroy_pm_clk;
+ }
lpass_regmap_config.name = "top_cc";
desc = &lpass_cc_top_sc7280_desc;
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration
2023-03-31 15:28 ` [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration Mohammad Rafi Shaik
@ 2023-03-31 18:46 ` Stephen Boyd
2023-04-03 6:39 ` Mohammad Rafi Shaik
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Boyd @ 2023-03-31 18:46 UTC (permalink / raw)
To: Mohammad Rafi Shaik, agross, andersson, broonie, konrad.dybcio,
krzysztof.kozlowski+dt, linux-arm-msm, linux-clk, linux-kernel,
mturquette, quic_plai, quic_rohkumar, quic_visr, robh+dt, swboyd
Cc: Srinivasa Rao Mandadapu, Mohammad Rafi Shaik
Quoting Mohammad Rafi Shaik (2023-03-31 08:28:04)
> diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c
> index 5c1e17bd0d76..24aeed6bcf0e 100644
> --- a/drivers/clk/qcom/lpasscc-sc7280.c
> +++ b/drivers/clk/qcom/lpasscc-sc7280.c
> @@ -17,6 +17,8 @@
> #include "clk-branch.h"
> #include "common.h"
>
> +#define QDSP6SS_MAX_REGISTER 0x3f
You can drop the define and just put the raw number in the one place
this is used.
> +
> static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = {
> .halt_reg = 0x0,
> .halt_check = BRANCH_HALT,
> @@ -118,12 +120,15 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
> goto destroy_pm_clk;
> }
>
> - lpass_regmap_config.name = "qdsp6ss";
> - desc = &lpass_qdsp6ss_sc7280_desc;
> + if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
> + lpass_regmap_config.name = "qdsp6ss";
> + lpass_regmap_config.max_register = QDSP6SS_MAX_REGISTER;
> + desc = &lpass_qdsp6ss_sc7280_desc;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration
2023-03-31 18:46 ` Stephen Boyd
@ 2023-04-03 6:39 ` Mohammad Rafi Shaik
0 siblings, 0 replies; 7+ messages in thread
From: Mohammad Rafi Shaik @ 2023-04-03 6:39 UTC (permalink / raw)
To: Stephen Boyd, agross, andersson, broonie, konrad.dybcio,
krzysztof.kozlowski+dt, linux-arm-msm, linux-clk, linux-kernel,
mturquette, quic_plai, quic_rohkumar, quic_visr, robh+dt, swboyd
Cc: Srinivasa Rao Mandadapu
On 4/1/2023 12:16 AM, Stephen Boyd wrote:
> Quoting Mohammad Rafi Shaik (2023-03-31 08:28:04)
>> diff --git a/drivers/clk/qcom/lpasscc-sc7280.c b/drivers/clk/qcom/lpasscc-sc7280.c
>> index 5c1e17bd0d76..24aeed6bcf0e 100644
>> --- a/drivers/clk/qcom/lpasscc-sc7280.c
>> +++ b/drivers/clk/qcom/lpasscc-sc7280.c
>> @@ -17,6 +17,8 @@
>> #include "clk-branch.h"
>> #include "common.h"
>>
>> +#define QDSP6SS_MAX_REGISTER 0x3f
> You can drop the define and just put the raw number in the one place
> this is used.
Thanks for comment,
okay, will drop the define.
>> +
>> static struct clk_branch lpass_top_cc_lpi_q6_axim_hs_clk = {
>> .halt_reg = 0x0,
>> .halt_check = BRANCH_HALT,
>> @@ -118,12 +120,15 @@ static int lpass_cc_sc7280_probe(struct platform_device *pdev)
>> goto destroy_pm_clk;
>> }
>>
>> - lpass_regmap_config.name = "qdsp6ss";
>> - desc = &lpass_qdsp6ss_sc7280_desc;
>> + if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode")) {
>> + lpass_regmap_config.name = "qdsp6ss";
>> + lpass_regmap_config.max_register = QDSP6SS_MAX_REGISTER;
>> + desc = &lpass_qdsp6ss_sc7280_desc;
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v10 3/3] clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc
2023-03-31 15:28 [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Mohammad Rafi Shaik
2023-03-31 15:28 ` [PATCH v10 1/3] dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property Mohammad Rafi Shaik
2023-03-31 15:28 ` [PATCH v10 2/3] clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration Mohammad Rafi Shaik
@ 2023-03-31 15:28 ` Mohammad Rafi Shaik
2023-03-31 18:48 ` [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Stephen Boyd
3 siblings, 0 replies; 7+ messages in thread
From: Mohammad Rafi Shaik @ 2023-03-31 15:28 UTC (permalink / raw)
To: swboyd, krzysztof.kozlowski+dt, agross, andersson, robh+dt,
broonie, quic_plai, konrad.dybcio, mturquette, sboyd,
linux-arm-msm, linux-clk, linux-kernel, quic_rohkumar, quic_visr
Cc: Mohammad Rafi Shaik
Add GDSCs in lpass_cc_sc7280_desc struct.
When qcom,adsp-pil-mode is enabled, GDSCs required to solve
dependencies in lpass_audiocc probe().
Fixes: 0cbcfbe50cbf ("clk: qcom: lpass: Handle the regmap overlap of lpasscc and lpass_aon")
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
---
drivers/clk/qcom/lpassaudiocc-sc7280.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/qcom/lpassaudiocc-sc7280.c b/drivers/clk/qcom/lpassaudiocc-sc7280.c
index 1339f9211a14..134eb1529ede 100644
--- a/drivers/clk/qcom/lpassaudiocc-sc7280.c
+++ b/drivers/clk/qcom/lpassaudiocc-sc7280.c
@@ -696,6 +696,8 @@ static const struct qcom_cc_desc lpass_cc_sc7280_desc = {
.config = &lpass_audio_cc_sc7280_regmap_config,
.clks = lpass_cc_sc7280_clocks,
.num_clks = ARRAY_SIZE(lpass_cc_sc7280_clocks),
+ .gdscs = lpass_aon_cc_sc7280_gdscs,
+ .num_gdscs = ARRAY_SIZE(lpass_aon_cc_sc7280_gdscs),
};
static const struct qcom_cc_desc lpass_audio_cc_sc7280_desc = {
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver
2023-03-31 15:28 [PATCH v10 0/3] Add resets for ADSP based audio clock controller driver Mohammad Rafi Shaik
` (2 preceding siblings ...)
2023-03-31 15:28 ` [PATCH v10 3/3] clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc Mohammad Rafi Shaik
@ 2023-03-31 18:48 ` Stephen Boyd
3 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2023-03-31 18:48 UTC (permalink / raw)
To: Mohammad Rafi Shaik, agross, andersson, broonie, konrad.dybcio,
krzysztof.kozlowski+dt, linux-arm-msm, linux-clk, linux-kernel,
mturquette, quic_plai, quic_rohkumar, quic_visr, robh+dt, swboyd
Cc: Mohammad Rafi Shaik
Quoting Mohammad Rafi Shaik (2023-03-31 08:28:02)
> Add resets and remove qdsp6ss clock controller for audioreach based platforms.
Does this supersede the v1 patch series[1]?
>
> Changes since v9:
> -- Drop "clk: qcom: lpassaudiocc-sc7280: Modify qcom_cc_probe" patch.
> -- Update Fixes tag in Add the required gdsc's in lpass_cc_sc7280_desc patch.
> -- Add the max_register value in Skip qdsp6ss clock registration patch.
[1] https://lore.kernel.org/linux-clk/20230327163249.1081824-1-quic_mohs@quicinc.com/
^ permalink raw reply [flat|nested] 7+ messages in thread