* [PATCH 0/2] qcom: clk: camcc: Fix power-domain definitions on x1e80100
@ 2024-03-11 0:33 Bryan O'Donoghue
2024-03-11 0:33 ` [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration Bryan O'Donoghue
2024-03-11 0:33 ` [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs Bryan O'Donoghue
0 siblings, 2 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2024-03-11 0:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Zapolskiy, Abel Vesa, Rajendra Nayak
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
Bryan O'Donoghue
There are two problems with the upstream camcc implementation at the
moment which this series addresses.
1. The camcc block has two power-domains MXC and MMCX however, the yaml
description doesn't include MXC.
2. The code for the GDSC definitions for x1e80100 camcc fails to list
the titan_top_gdsc as the parent GDSC of the other GDSCs.
This series addresses both of those bugs. There is currently no upstream
camcc dtsi for x1e80100 so the yaml change won't affect the ABI.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
Bryan O'Donoghue (2):
dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration
clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs
.../bindings/clock/qcom,sm8450-camcc.yaml | 37 ++++++++++++++++++----
drivers/clk/qcom/camcc-x1e80100.c | 7 ++++
2 files changed, 38 insertions(+), 6 deletions(-)
---
base-commit: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd
change-id: 20240310-linux-next-camcc-fixes-a68322916421
Best regards,
--
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration
2024-03-11 0:33 [PATCH 0/2] qcom: clk: camcc: Fix power-domain definitions on x1e80100 Bryan O'Donoghue
@ 2024-03-11 0:33 ` Bryan O'Donoghue
2024-03-11 16:51 ` Krzysztof Kozlowski
2024-03-11 0:33 ` [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs Bryan O'Donoghue
1 sibling, 1 reply; 6+ messages in thread
From: Bryan O'Donoghue @ 2024-03-11 0:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Zapolskiy, Abel Vesa, Rajendra Nayak
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
Bryan O'Donoghue
camcc on x1e80100 requires two power domains MXC and MMCX. Define those as
part of the schema.
Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../bindings/clock/qcom,sm8450-camcc.yaml | 37 ++++++++++++++++++----
1 file changed, 31 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
index fa0e5b6b02b81..eae9b73ae1f16 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
@@ -19,9 +19,6 @@ description: |
include/dt-bindings/clock/qcom,sc8280xp-camcc.h
include/dt-bindings/clock/qcom,x1e80100-camcc.h
-allOf:
- - $ref: qcom,gcc.yaml#
-
properties:
compatible:
enum:
@@ -38,9 +35,8 @@ properties:
- description: Sleep clock source
power-domains:
- maxItems: 1
- description:
- A phandle and PM domain specifier for the MMCX power domain.
+ minItems: 1
+ maxItems: 2
required-opps:
maxItems: 1
@@ -56,6 +52,35 @@ required:
- power-domains
- required-opps
+allOf:
+ - $ref: qcom,gcc.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sc8280xp-camcc
+ - qcom,sm8450-camcc
+ - qcom,sm8550-camcc
+ then:
+ properties:
+ power-domains:
+ description:
+ A phandle and PM domain specifier for the MMCX power domain.
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,x1e80100-camcc
+ then:
+ properties:
+ power-domains:
+ items:
+ - description: A phandle and PM domain specifier for the MXC power domain.
+ - description: A phandle and PM domain specifier for the MMCX power domain.
+
unevaluatedProperties: false
examples:
--
2.43.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs
2024-03-11 0:33 [PATCH 0/2] qcom: clk: camcc: Fix power-domain definitions on x1e80100 Bryan O'Donoghue
2024-03-11 0:33 ` [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration Bryan O'Donoghue
@ 2024-03-11 0:33 ` Bryan O'Donoghue
2024-03-11 15:22 ` Rajendra Nayak
2024-03-11 18:08 ` Konrad Dybcio
1 sibling, 2 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2024-03-11 0:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Zapolskiy, Abel Vesa, Rajendra Nayak
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel,
Bryan O'Donoghue
The Titan TOP GDSC is the parent GDSC for all other GDSCs in the CAMCC
block. None of the subordinate blocks will switch on without the parent
GDSC switched on.
Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/clk/qcom/camcc-x1e80100.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/qcom/camcc-x1e80100.c b/drivers/clk/qcom/camcc-x1e80100.c
index 46bb225906bff..d421da57697a2 100644
--- a/drivers/clk/qcom/camcc-x1e80100.c
+++ b/drivers/clk/qcom/camcc-x1e80100.c
@@ -2212,6 +2212,8 @@ static struct clk_branch cam_cc_sfe_0_fast_ahb_clk = {
},
};
+static struct gdsc cam_cc_titan_top_gdsc;
+
static struct gdsc cam_cc_bps_gdsc = {
.gdscr = 0x10004,
.en_rest_wait_val = 0x2,
@@ -2221,6 +2223,7 @@ static struct gdsc cam_cc_bps_gdsc = {
.name = "cam_cc_bps_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
+ .parent = &cam_cc_titan_top_gdsc.pd,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -2233,6 +2236,7 @@ static struct gdsc cam_cc_ife_0_gdsc = {
.name = "cam_cc_ife_0_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
+ .parent = &cam_cc_titan_top_gdsc.pd,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -2245,6 +2249,7 @@ static struct gdsc cam_cc_ife_1_gdsc = {
.name = "cam_cc_ife_1_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
+ .parent = &cam_cc_titan_top_gdsc.pd,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -2257,6 +2262,7 @@ static struct gdsc cam_cc_ipe_0_gdsc = {
.name = "cam_cc_ipe_0_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
+ .parent = &cam_cc_titan_top_gdsc.pd,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -2269,6 +2275,7 @@ static struct gdsc cam_cc_sfe_0_gdsc = {
.name = "cam_cc_sfe_0_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
+ .parent = &cam_cc_titan_top_gdsc.pd,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
--
2.43.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs
2024-03-11 0:33 ` [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs Bryan O'Donoghue
@ 2024-03-11 15:22 ` Rajendra Nayak
2024-03-11 18:08 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Rajendra Nayak @ 2024-03-11 15:22 UTC (permalink / raw)
To: Bryan O'Donoghue, Bjorn Andersson, Konrad Dybcio,
Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Zapolskiy, Abel Vesa
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel
On 3/11/2024 6:03 AM, Bryan O'Donoghue wrote:
> The Titan TOP GDSC is the parent GDSC for all other GDSCs in the CAMCC
> block. None of the subordinate blocks will switch on without the parent
> GDSC switched on.
>
> Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Rajendra Nayak <quic_rjendra@quicinc.com>
> ---
> drivers/clk/qcom/camcc-x1e80100.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clk/qcom/camcc-x1e80100.c b/drivers/clk/qcom/camcc-x1e80100.c
> index 46bb225906bff..d421da57697a2 100644
> --- a/drivers/clk/qcom/camcc-x1e80100.c
> +++ b/drivers/clk/qcom/camcc-x1e80100.c
> @@ -2212,6 +2212,8 @@ static struct clk_branch cam_cc_sfe_0_fast_ahb_clk = {
> },
> };
>
> +static struct gdsc cam_cc_titan_top_gdsc;
> +
> static struct gdsc cam_cc_bps_gdsc = {
> .gdscr = 0x10004,
> .en_rest_wait_val = 0x2,
> @@ -2221,6 +2223,7 @@ static struct gdsc cam_cc_bps_gdsc = {
> .name = "cam_cc_bps_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> + .parent = &cam_cc_titan_top_gdsc.pd,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -2233,6 +2236,7 @@ static struct gdsc cam_cc_ife_0_gdsc = {
> .name = "cam_cc_ife_0_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> + .parent = &cam_cc_titan_top_gdsc.pd,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -2245,6 +2249,7 @@ static struct gdsc cam_cc_ife_1_gdsc = {
> .name = "cam_cc_ife_1_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> + .parent = &cam_cc_titan_top_gdsc.pd,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -2257,6 +2262,7 @@ static struct gdsc cam_cc_ipe_0_gdsc = {
> .name = "cam_cc_ipe_0_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> + .parent = &cam_cc_titan_top_gdsc.pd,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -2269,6 +2275,7 @@ static struct gdsc cam_cc_sfe_0_gdsc = {
> .name = "cam_cc_sfe_0_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> + .parent = &cam_cc_titan_top_gdsc.pd,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration
2024-03-11 0:33 ` [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration Bryan O'Donoghue
@ 2024-03-11 16:51 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-11 16:51 UTC (permalink / raw)
To: Bryan O'Donoghue, Bjorn Andersson, Konrad Dybcio,
Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Vladimir Zapolskiy, Abel Vesa, Rajendra Nayak
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel
On 11/03/2024 01:33, Bryan O'Donoghue wrote:
> camcc on x1e80100 requires two power domains MXC and MMCX. Define those as
> part of the schema.
>
...
>
> required-opps:
> maxItems: 1
> @@ -56,6 +52,35 @@ required:
> - power-domains
> - required-opps
>
> +allOf:
> + - $ref: qcom,gcc.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,sc8280xp-camcc
> + - qcom,sm8450-camcc
> + - qcom,sm8550-camcc
> + then:
> + properties:
> + power-domains:
> + description:
> + A phandle and PM domain specifier for the MMCX power domain.
This does not narrow the number of items. You need items with
description, just like you have for x1e. And drop redundant parts. This
is just "MMCX power domain"
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,x1e80100-camcc
> + then:
> + properties:
> + power-domains:
> + items:
> + - description: A phandle and PM domain specifier for the MXC power domain.
Drop redundant parts of description:
MXC power domain
> + - description: A phandle and PM domain specifier for the MMCX power domain.
MMCX power domain
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs
2024-03-11 0:33 ` [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs Bryan O'Donoghue
2024-03-11 15:22 ` Rajendra Nayak
@ 2024-03-11 18:08 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2024-03-11 18:08 UTC (permalink / raw)
To: Bryan O'Donoghue, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Vladimir Zapolskiy, Abel Vesa, Rajendra Nayak
Cc: linux-arm-msm, linux-clk, devicetree, linux-kernel
On 3/11/24 01:33, Bryan O'Donoghue wrote:
> The Titan TOP GDSC is the parent GDSC for all other GDSCs in the CAMCC
> block. None of the subordinate blocks will switch on without the parent
> GDSC switched on.
>
> Fixes: 76126a5129b5 ("clk: qcom: Add camcc clock driver for x1e80100")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-11 18:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 0:33 [PATCH 0/2] qcom: clk: camcc: Fix power-domain definitions on x1e80100 Bryan O'Donoghue
2024-03-11 0:33 ` [PATCH 1/2] dt-bindings: clock: qcom: Fix x1e80100 camcc power-domain declaration Bryan O'Donoghue
2024-03-11 16:51 ` Krzysztof Kozlowski
2024-03-11 0:33 ` [PATCH 2/2] clk: qcom: camcc-x1e80100: Set titan_top_gdsc as the parent GDSC of subordinate GDSCs Bryan O'Donoghue
2024-03-11 15:22 ` Rajendra Nayak
2024-03-11 18:08 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox