Skip to content

Commit 0f85ef3

Browse files
taniyadas20andersson
authored andcommitted
clk: qcom: clk-alpha-pll: Update the PLL support for cal_l
Recent QCOM PLLs require the CAL_L field to be programmed according to specific hardware recommendations, rather than using the legacy default value of 0x44. Hardcoding this value can lead to suboptimal or incorrect behavior on newer platforms. To address this, introduce a `cal_l` field in the PLL configuration structure, allowing CAL_L to be set explicitly based on platform requirements. This improves flexibility and ensures correct PLL initialization across different hardware variants. Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260107-kaanapali-mmcc-v3-v3-1-8e10adc236a8@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 86f5c81 commit 0f85ef3

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,11 @@ void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
23512351
return;
23522352
}
23532353

2354-
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
2354+
if (config->cal_l)
2355+
lval |= config->cal_l << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
2356+
else
2357+
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
2358+
23552359
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
23562360
clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);
23572361
clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val);

drivers/clk/qcom/clk-alpha-pll.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ struct clk_alpha_pll_postdiv {
130130

131131
struct alpha_pll_config {
132132
u32 l;
133+
u32 cal_l;
133134
u32 alpha;
134135
u32 alpha_hi;
135136
u32 config_ctl_val;

0 commit comments

Comments
 (0)