* [PATCH 0/2] Add VDD_GX to SM6375 GPUCC
@ 2023-05-29 13:14 Konrad Dybcio
2023-05-29 13:14 ` [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-05-29 13:14 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Marijn Suijten, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio
The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter
rail is not online, GX_GDSC will never turn on. Take care of this.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (2):
dt-bindings: clock: sm6375-gpucc: Add VDD_GX
clk: qcom: gpucc-sm6375: Enable runtime pm
.../devicetree/bindings/clock/qcom,sm6375-gpucc.yaml | 15 +++++++++++++++
drivers/clk/qcom/gpucc-sm6375.c | 19 +++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-)
---
base-commit: 6a3d37b4d885129561e1cef361216f00472f7d2e
change-id: 20230529-topic-sm6375gpuccpd-ca741a64baf8
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX
2023-05-29 13:14 [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Konrad Dybcio
@ 2023-05-29 13:14 ` Konrad Dybcio
2023-05-30 15:41 ` Krzysztof Kozlowski
2023-05-29 13:14 ` [PATCH 2/2] clk: qcom: gpucc-sm6375: Enable runtime pm Konrad Dybcio
2023-06-13 23:48 ` [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Bjorn Andersson
2 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2023-05-29 13:14 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Marijn Suijten, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio
The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter
rail is not online, GX_GDSC will never turn on. Describe the missing
handles.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
.../devicetree/bindings/clock/qcom,sm6375-gpucc.yaml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml
index b480ead5bd69..cf4cad76f6c9 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml
@@ -27,9 +27,21 @@ properties:
- description: GPLL0 div branch source
- description: SNoC DVM GFX source
+ power-domains:
+ description:
+ A phandle and PM domain specifier for the VDD_GX power rail
+ maxItems: 1
+
+ required-opps:
+ description:
+ A phandle to an OPP node describing required VDD_GX performance point.
+ maxItems: 1
+
required:
- compatible
- clocks
+ - power-domains
+ - required-opps
allOf:
- $ref: qcom,gcc.yaml#
@@ -40,6 +52,7 @@ examples:
- |
#include <dt-bindings/clock/qcom,sm6375-gcc.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
soc {
#address-cells = <2>;
@@ -52,6 +65,8 @@ examples:
<&gcc GCC_GPU_GPLL0_CLK_SRC>,
<&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>,
<&gcc GCC_GPU_SNOC_DVM_GFX_CLK>;
+ power-domains = <&rpmpd SM6375_VDDGX>;
+ required-opps = <&rpmpd_opp_low_svs>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] clk: qcom: gpucc-sm6375: Enable runtime pm
2023-05-29 13:14 [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Konrad Dybcio
2023-05-29 13:14 ` [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX Konrad Dybcio
@ 2023-05-29 13:14 ` Konrad Dybcio
2023-06-13 23:48 ` [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-05-29 13:14 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Marijn Suijten, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio
The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter
rail is not online, GX_GDSC will never turn on. Enable runtime pm so that
we can reference VDD_GX from the dt to ensure that.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/clk/qcom/gpucc-sm6375.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-sm6375.c b/drivers/clk/qcom/gpucc-sm6375.c
index d3620344a009..2d863dc3d83b 100644
--- a/drivers/clk/qcom/gpucc-sm6375.c
+++ b/drivers/clk/qcom/gpucc-sm6375.c
@@ -7,6 +7,7 @@
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/of_device.h>
+#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,sm6375-gpucc.h>
@@ -434,15 +435,29 @@ MODULE_DEVICE_TABLE(of, gpucc_sm6375_match_table);
static int gpucc_sm6375_probe(struct platform_device *pdev)
{
struct regmap *regmap;
+ int ret;
+
+ ret = devm_pm_runtime_enable(&pdev->dev);
+ if (ret)
+ return ret;
+
+ ret = pm_runtime_resume_and_get(&pdev->dev);
+ if (ret)
+ return ret;
regmap = qcom_cc_map(pdev, &gpucc_sm6375_desc);
- if (IS_ERR(regmap))
+ if (IS_ERR(regmap)) {
+ pm_runtime_put(&pdev->dev);
return PTR_ERR(regmap);
+ }
clk_lucid_pll_configure(&gpucc_pll0, regmap, &gpucc_pll0_config);
clk_lucid_pll_configure(&gpucc_pll1, regmap, &gpucc_pll1_config);
- return qcom_cc_really_probe(pdev, &gpucc_sm6375_desc, regmap);
+ ret = qcom_cc_really_probe(pdev, &gpucc_sm6375_desc, regmap);
+ pm_runtime_put(&pdev->dev);
+
+ return ret;
}
static struct platform_driver gpucc_sm6375_driver = {
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX
2023-05-29 13:14 ` [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX Konrad Dybcio
@ 2023-05-30 15:41 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-30 15:41 UTC (permalink / raw)
To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Marijn Suijten, linux-arm-msm, linux-clk, devicetree, linux-kernel
On 29/05/2023 15:14, Konrad Dybcio wrote:
> The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter
> rail is not online, GX_GDSC will never turn on. Describe the missing
> handles.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> .../devicetree/bindings/clock/qcom,sm6375-gpucc.yaml | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Add VDD_GX to SM6375 GPUCC
2023-05-29 13:14 [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Konrad Dybcio
2023-05-29 13:14 ` [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX Konrad Dybcio
2023-05-29 13:14 ` [PATCH 2/2] clk: qcom: gpucc-sm6375: Enable runtime pm Konrad Dybcio
@ 2023-06-13 23:48 ` Bjorn Andersson
2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2023-06-13 23:48 UTC (permalink / raw)
To: Konrad Dybcio, Krzysztof Kozlowski, Michael Turquette,
Stephen Boyd, Rob Herring, Conor Dooley, Andy Gross
Cc: devicetree, linux-kernel, linux-arm-msm, linux-clk, Marijn Suijten
On Mon, 29 May 2023 15:14:22 +0200, Konrad Dybcio wrote:
> The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter
> rail is not online, GX_GDSC will never turn on. Take care of this.
>
>
Applied, thanks!
[1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX
commit: 2f138c667cb94a3a150d3341ca5ebf62480b501f
[2/2] clk: qcom: gpucc-sm6375: Enable runtime pm
commit: 097d359c8ca892b63e9d91bdfaf6c45d07c943c7
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-13 23:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 13:14 [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Konrad Dybcio
2023-05-29 13:14 ` [PATCH 1/2] dt-bindings: clock: sm6375-gpucc: Add VDD_GX Konrad Dybcio
2023-05-30 15:41 ` Krzysztof Kozlowski
2023-05-29 13:14 ` [PATCH 2/2] clk: qcom: gpucc-sm6375: Enable runtime pm Konrad Dybcio
2023-06-13 23:48 ` [PATCH 0/2] Add VDD_GX to SM6375 GPUCC Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).