diff mbox series

[v2,3/8] clk: qcom: gpucc-sc8280xp: Add external supply for GX gdsc

Message ID 20231220-sa8295p-gpu-v2-3-4763246b72c0@quicinc.com
State Superseded
Headers show
Series arm64: dts: qcom: sa8295p: Enable GPU | expand

Commit Message

Bjorn Andersson Dec. 22, 2023, 4:39 a.m. UTC
On SA8295P and SA8540P the GFX rail is powered by a dedicated external
regulator, instead of the rpmh-controlled "gfx.lvl".

Define the "vdd-gfx" as the supply regulator for the GDSC, to cause the
gdsc logic to look for, and control, this external power supply.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
 drivers/clk/qcom/gpucc-sc8280xp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Konrad Dybcio Dec. 27, 2023, 1:07 a.m. UTC | #1
On 22.12.2023 05:39, Bjorn Andersson wrote:
> On SA8295P and SA8540P the GFX rail is powered by a dedicated external
> regulator, instead of the rpmh-controlled "gfx.lvl".
> 
> Define the "vdd-gfx" as the supply regulator for the GDSC, to cause the
> gdsc logic to look for, and control, this external power supply.
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
Worth noting the regulator framework will create a virtual supply
for the normal 8280

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Bjorn Andersson Jan. 8, 2024, 6:23 p.m. UTC | #2
On Wed, Dec 27, 2023 at 02:07:52AM +0100, Konrad Dybcio wrote:
> On 22.12.2023 05:39, Bjorn Andersson wrote:
> > On SA8295P and SA8540P the GFX rail is powered by a dedicated external
> > regulator, instead of the rpmh-controlled "gfx.lvl".
> > 
> > Define the "vdd-gfx" as the supply regulator for the GDSC, to cause the
> > gdsc logic to look for, and control, this external power supply.
> > 
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> > ---
> Worth noting the regulator framework will create a virtual supply
> for the normal 8280
> 

You're right. No functional harm, but that's not very nice.

I don't think we have any benefit from having a dummy supply, if the DT
author failed to provide a proper one, so it seems reasonable to switch
gdsc to devm_regulator_get_optional().

Regards,
Bjorn

> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> 
> Konrad
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gpucc-sc8280xp.c b/drivers/clk/qcom/gpucc-sc8280xp.c
index 8e147ee294ee..e2b3bc000c71 100644
--- a/drivers/clk/qcom/gpucc-sc8280xp.c
+++ b/drivers/clk/qcom/gpucc-sc8280xp.c
@@ -399,6 +399,7 @@  static struct gdsc gx_gdsc = {
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = CLAMP_IO | RETAIN_FF_ENABLE,
+	.supply = "vdd-gfx",
 };
 
 static struct gdsc *gpu_cc_sc8280xp_gdscs[] = {