Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: qcom: Configure Lucid 5LPE PLLs properly
@ 2026-11-25 21:13 Vladimir Zapolskiy
  2026-11-25 21:13 ` [PATCH 1/2] clk: qcom: Configure SC8280XP " Vladimir Zapolskiy
  2026-11-25 21:13 ` [PATCH 2/2] clk: qcom: Configure SM8350 " Vladimir Zapolskiy
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2026-11-25 21:13 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Konrad Dybcio
  Cc: Stephen Boyd, Brian Masney, Jerome Brunet, linux-arm-msm,
	linux-clk

SC8280XP and SM8350 clock controllers configure their Lucid 5LPE PLLs
by clk_lucid_pll_configure(), i.e. as Trion PLLs, which sets
PLL_UPDATE_BYPASS bit. Use clk_lucid_5lpe_pll_configure() instead,
and describe the PLLs by the Lucid 5LPE PLL type.

Note, the series depends on CLK_ALPHA_PLL_TYPE_LUCID_5LPE from:
* https://lore.kernel.org/all/20261107173621.3538964-1-vz@kernel.org/

Vladimir Zapolskiy (2):
  clk: qcom: Configure SC8280XP Lucid 5LPE PLLs properly
  clk: qcom: Configure SM8350 Lucid 5LPE PLLs properly

 drivers/clk/qcom/camcc-sc8280xp.c  | 46 +++++++++++++++---------------
 drivers/clk/qcom/dispcc-sc8280xp.c | 25 +++++++++-------
 drivers/clk/qcom/gpucc-sc8280xp.c  |  8 +++---
 drivers/clk/qcom/gpucc-sm8350.c    |  8 +++---
 drivers/clk/qcom/videocc-sm8350.c  |  8 +++---
 5 files changed, 49 insertions(+), 46 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] clk: qcom: Configure SC8280XP Lucid 5LPE PLLs properly
  2026-11-25 21:13 [PATCH 0/2] clk: qcom: Configure Lucid 5LPE PLLs properly Vladimir Zapolskiy
@ 2026-11-25 21:13 ` Vladimir Zapolskiy
  2026-11-25 21:23   ` sashiko-bot
  2026-11-25 21:13 ` [PATCH 2/2] clk: qcom: Configure SM8350 " Vladimir Zapolskiy
  1 sibling, 1 reply; 5+ messages in thread
From: Vladimir Zapolskiy @ 2026-11-25 21:13 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Konrad Dybcio
  Cc: Stephen Boyd, Brian Masney, Jerome Brunet, linux-arm-msm,
	linux-clk

The SC8280XP camera, display and GPU clock controller Lucid 5LPE PLLs
are configured as Lucid PLLs, however clk_lucid_pll_configure() is
a macro for clk_trion_pll_configure(), which sets PLL_UPDATE_BYPASS bit,
while clk_lucid_5lpe_pll_configure() does not do it. Configure the PLLs
by the Lucid 5LPE specific function and describe the PLLs and their post
dividers by the Lucid 5LPE PLL type expectedly.

Suggested-by: Konrad Dybcio <konradybcio@kernel.org>
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
 drivers/clk/qcom/camcc-sc8280xp.c  | 46 +++++++++++++++---------------
 drivers/clk/qcom/dispcc-sc8280xp.c | 25 +++++++++-------
 drivers/clk/qcom/gpucc-sc8280xp.c  |  8 +++---
 3 files changed, 41 insertions(+), 38 deletions(-)

diff --git a/drivers/clk/qcom/camcc-sc8280xp.c b/drivers/clk/qcom/camcc-sc8280xp.c
index b0f1d40d1df5..d14cb46a19af 100644
--- a/drivers/clk/qcom/camcc-sc8280xp.c
+++ b/drivers/clk/qcom/camcc-sc8280xp.c
@@ -70,7 +70,7 @@ static struct clk_alpha_pll camcc_pll0 = {
 	.offset = 0x0,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll0",
@@ -93,7 +93,7 @@ static struct clk_alpha_pll_postdiv camcc_pll0_out_even = {
 	.post_div_table = post_div_table_camcc_pll0_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll0_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll0_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -115,7 +115,7 @@ static struct clk_alpha_pll_postdiv camcc_pll0_out_odd = {
 	.post_div_table = post_div_table_camcc_pll0_out_odd,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll0_out_odd),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll0_out_odd",
 		.parent_hws = (const struct clk_hw*[]){
@@ -145,7 +145,7 @@ static struct clk_alpha_pll camcc_pll1 = {
 	.offset = 0x1000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll1",
@@ -168,7 +168,7 @@ static struct clk_alpha_pll_postdiv camcc_pll1_out_even = {
 	.post_div_table = post_div_table_camcc_pll1_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll1_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll1_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -223,7 +223,7 @@ static struct clk_alpha_pll camcc_pll3 = {
 	.offset = 0x3000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll3",
@@ -246,7 +246,7 @@ static struct clk_alpha_pll_postdiv camcc_pll3_out_even = {
 	.post_div_table = post_div_table_camcc_pll3_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll3_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll3_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -276,7 +276,7 @@ static struct clk_alpha_pll camcc_pll4 = {
 	.offset = 0x4000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll4",
@@ -299,7 +299,7 @@ static struct clk_alpha_pll_postdiv camcc_pll4_out_even = {
 	.post_div_table = post_div_table_camcc_pll4_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll4_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll4_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -329,7 +329,7 @@ static struct clk_alpha_pll camcc_pll5 = {
 	.offset = 0x10000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll5",
@@ -352,7 +352,7 @@ static struct clk_alpha_pll_postdiv camcc_pll5_out_even = {
 	.post_div_table = post_div_table_camcc_pll5_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll5_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll5_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -382,7 +382,7 @@ static struct clk_alpha_pll camcc_pll6 = {
 	.offset = 0x11000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll6",
@@ -405,7 +405,7 @@ static struct clk_alpha_pll_postdiv camcc_pll6_out_even = {
 	.post_div_table = post_div_table_camcc_pll6_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll6_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll6_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -435,7 +435,7 @@ static struct clk_alpha_pll camcc_pll7 = {
 	.offset = 0x12000,
 	.vco_table = lucid_vco,
 	.num_vco = ARRAY_SIZE(lucid_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "camcc_pll7",
@@ -458,7 +458,7 @@ static struct clk_alpha_pll_postdiv camcc_pll7_out_even = {
 	.post_div_table = post_div_table_camcc_pll7_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll7_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll7_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -480,7 +480,7 @@ static struct clk_alpha_pll_postdiv camcc_pll7_out_odd = {
 	.post_div_table = post_div_table_camcc_pll7_out_odd,
 	.num_post_div = ARRAY_SIZE(post_div_table_camcc_pll7_out_odd),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "camcc_pll7_out_odd",
 		.parent_hws = (const struct clk_hw*[]){
@@ -3012,14 +3012,14 @@ static int camcc_sc8280xp_probe(struct platform_device *pdev)
 		goto err_put_rpm;
 	}
 
-	clk_lucid_pll_configure(&camcc_pll0, regmap, &camcc_pll0_config);
-	clk_lucid_pll_configure(&camcc_pll1, regmap, &camcc_pll1_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll0, regmap, &camcc_pll0_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll1, regmap, &camcc_pll1_config);
 	clk_zonda_pll_configure(&camcc_pll2, regmap, &camcc_pll2_config);
-	clk_lucid_pll_configure(&camcc_pll3, regmap, &camcc_pll3_config);
-	clk_lucid_pll_configure(&camcc_pll4, regmap, &camcc_pll4_config);
-	clk_lucid_pll_configure(&camcc_pll5, regmap, &camcc_pll5_config);
-	clk_lucid_pll_configure(&camcc_pll6, regmap, &camcc_pll6_config);
-	clk_lucid_pll_configure(&camcc_pll7, regmap, &camcc_pll7_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll3, regmap, &camcc_pll3_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll4, regmap, &camcc_pll4_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll5, regmap, &camcc_pll5_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll6, regmap, &camcc_pll6_config);
+	clk_lucid_5lpe_pll_configure(&camcc_pll7, regmap, &camcc_pll7_config);
 
 	ret = qcom_cc_really_probe(&pdev->dev, &camcc_sc8280xp_desc, regmap);
 	if (ret)
diff --git a/drivers/clk/qcom/dispcc-sc8280xp.c b/drivers/clk/qcom/dispcc-sc8280xp.c
index 96b3e5505279..1d09fa9e7a94 100644
--- a/drivers/clk/qcom/dispcc-sc8280xp.c
+++ b/drivers/clk/qcom/dispcc-sc8280xp.c
@@ -85,7 +85,7 @@ static struct clk_alpha_pll disp0_cc_pll0 = {
 	.offset = 0x0,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp0_cc_pll0",
@@ -100,7 +100,7 @@ static struct clk_alpha_pll disp1_cc_pll0 = {
 	.offset = 0x0,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp1_cc_pll0",
@@ -129,7 +129,7 @@ static struct clk_alpha_pll disp0_cc_pll1 = {
 	.offset = 0x1000,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp0_cc_pll1",
@@ -144,7 +144,7 @@ static struct clk_alpha_pll disp1_cc_pll1 = {
 	.offset = 0x1000,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp1_cc_pll1",
@@ -166,7 +166,7 @@ static struct clk_alpha_pll_postdiv disp0_cc_pll1_out_even = {
 	.post_div_table = post_div_table_disp_cc_pll1_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_disp_cc_pll1_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(const struct clk_init_data) {
 		.name = "disp0_cc_pll1_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -183,7 +183,7 @@ static struct clk_alpha_pll_postdiv disp1_cc_pll1_out_even = {
 	.post_div_table = post_div_table_disp_cc_pll1_out_even,
 	.num_post_div = ARRAY_SIZE(post_div_table_disp_cc_pll1_out_even),
 	.width = 4,
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr.hw.init = &(const struct clk_init_data) {
 		.name = "disp1_cc_pll1_out_even",
 		.parent_hws = (const struct clk_hw*[]){
@@ -212,7 +212,7 @@ static struct clk_alpha_pll disp0_cc_pll2 = {
 	.offset = 0x9000,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp0_cc_pll2",
@@ -227,7 +227,7 @@ static struct clk_alpha_pll disp1_cc_pll2 = {
 	.offset = 0x9000,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "disp1_cc_pll2",
@@ -3173,9 +3173,12 @@ static int disp_cc_sc8280xp_probe(struct platform_device *pdev)
 		goto out_pm_runtime_put;
 	}
 
-	clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL0]), regmap, &disp_cc_pll0_config);
-	clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL1]), regmap, &disp_cc_pll1_config);
-	clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL2]), regmap, &disp_cc_pll2_config);
+	clk_lucid_5lpe_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL0]),
+				     regmap, &disp_cc_pll0_config);
+	clk_lucid_5lpe_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL1]),
+				     regmap, &disp_cc_pll1_config);
+	clk_lucid_5lpe_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL2]),
+				     regmap, &disp_cc_pll2_config);
 
 	ret = qcom_cc_really_probe(&pdev->dev, desc, regmap);
 	if (ret)
diff --git a/drivers/clk/qcom/gpucc-sc8280xp.c b/drivers/clk/qcom/gpucc-sc8280xp.c
index 2ccc083a4f98..36d2b028f288 100644
--- a/drivers/clk/qcom/gpucc-sc8280xp.c
+++ b/drivers/clk/qcom/gpucc-sc8280xp.c
@@ -59,7 +59,7 @@ static struct clk_alpha_pll gpu_cc_pll0 = {
 	.offset = 0x0,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data){
 			.name = "gpu_cc_pll0",
@@ -88,7 +88,7 @@ static struct clk_alpha_pll gpu_cc_pll1 = {
 	.offset = 0x100,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data){
 			.name = "gpu_cc_pll1",
@@ -453,8 +453,8 @@ static int gpu_cc_sc8280xp_probe(struct platform_device *pdev)
 		return PTR_ERR(regmap);
 	}
 
-	clk_lucid_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
-	clk_lucid_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
+	clk_lucid_5lpe_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
+	clk_lucid_5lpe_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
 
 	ret = qcom_cc_really_probe(&pdev->dev, &gpu_cc_sc8280xp_desc, regmap);
 	pm_runtime_put(&pdev->dev);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] clk: qcom: Configure SM8350 Lucid 5LPE PLLs properly
  2026-11-25 21:13 [PATCH 0/2] clk: qcom: Configure Lucid 5LPE PLLs properly Vladimir Zapolskiy
  2026-11-25 21:13 ` [PATCH 1/2] clk: qcom: Configure SC8280XP " Vladimir Zapolskiy
@ 2026-11-25 21:13 ` Vladimir Zapolskiy
  2026-11-25 21:21   ` sashiko-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Vladimir Zapolskiy @ 2026-11-25 21:13 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Konrad Dybcio
  Cc: Stephen Boyd, Brian Masney, Jerome Brunet, linux-arm-msm,
	linux-clk

The SM8350 GPU and video clock controller Lucid 5LPE PLLs are configured
as Lucid PLLs, however clk_lucid_pll_configure() is a macro for
clk_trion_pll_configure(), which sets PLL_UPDATE_BYPASS bit, while
clk_lucid_5lpe_pll_configure() does not do it. Configure the PLLs by
the Lucid 5LPE specific function and describe the PLLs by the Lucid
5LPE PLL type expectedly.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
 drivers/clk/qcom/gpucc-sm8350.c   | 8 ++++----
 drivers/clk/qcom/videocc-sm8350.c | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/qcom/gpucc-sm8350.c b/drivers/clk/qcom/gpucc-sm8350.c
index 6d2660bdd825..b80f41361de7 100644
--- a/drivers/clk/qcom/gpucc-sm8350.c
+++ b/drivers/clk/qcom/gpucc-sm8350.c
@@ -59,7 +59,7 @@ static struct clk_alpha_pll gpu_cc_pll0 = {
 	.offset = 0x0,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data){
 			.name = "gpu_cc_pll0",
@@ -88,7 +88,7 @@ static struct clk_alpha_pll gpu_cc_pll1 = {
 	.offset = 0x100,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(struct clk_init_data){
 			.name = "gpu_cc_pll1",
@@ -601,8 +601,8 @@ static int gpu_cc_sm8350_probe(struct platform_device *pdev)
 		return PTR_ERR(regmap);
 	}
 
-	clk_lucid_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
-	clk_lucid_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
+	clk_lucid_5lpe_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
+	clk_lucid_5lpe_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config);
 
 	return qcom_cc_really_probe(&pdev->dev, &gpu_cc_sm8350_desc, regmap);
 }
diff --git a/drivers/clk/qcom/videocc-sm8350.c b/drivers/clk/qcom/videocc-sm8350.c
index 8528aeb3a342..1e52d07861bf 100644
--- a/drivers/clk/qcom/videocc-sm8350.c
+++ b/drivers/clk/qcom/videocc-sm8350.c
@@ -63,7 +63,7 @@ static struct clk_alpha_pll video_pll0 = {
 	.offset = 0x42c,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "video_pll0",
@@ -94,7 +94,7 @@ static struct clk_alpha_pll video_pll1 = {
 	.offset = 0x7d0,
 	.vco_table = lucid_5lpe_vco,
 	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
-	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
+	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
 	.clkr = {
 		.hw.init = &(const struct clk_init_data) {
 			.name = "video_pll1",
@@ -576,8 +576,8 @@ static int video_cc_sm8350_probe(struct platform_device *pdev)
 		return PTR_ERR(regmap);
 	}
 
-	clk_lucid_pll_configure(&video_pll0, regmap, &video_pll0_config);
-	clk_lucid_pll_configure(&video_pll1, regmap, &video_pll1_config);
+	clk_lucid_5lpe_pll_configure(&video_pll0, regmap, &video_pll0_config);
+	clk_lucid_5lpe_pll_configure(&video_pll1, regmap, &video_pll1_config);
 
 	ret = qcom_cc_really_probe(&pdev->dev, &desc, regmap);
 	pm_runtime_put(&pdev->dev);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] clk: qcom: Configure SM8350 Lucid 5LPE PLLs properly
  2026-11-25 21:13 ` [PATCH 2/2] clk: qcom: Configure SM8350 " Vladimir Zapolskiy
@ 2026-11-25 21:21   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-25 21:21 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-clk

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] clk: qcom: undeclared CLK_ALPHA_PLL_TYPE_LUCID_5LPE breaks
  SM8350 build
- [Low] clk: qcom: missing Fixes trailers for SM8350 Lucid 5LPE PLL fix
--

commit 20f1cd267c5f5623fcc9ac8ef42bbac4939843b4
Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

> clk: qcom: Configure SM8350 Lucid 5LPE PLLs properly
>
> The SM8350 GPU and video clock controller Lucid 5LPE PLLs are configured
> as Lucid PLLs, however clk_lucid_pll_configure() is a macro for
> clk_trion_pll_configure(), which sets PLL_UPDATE_BYPASS bit, while
> clk_lucid_5lpe_pll_configure() does not do it. Configure the PLLs by
> the Lucid 5LPE specific function and describe the PLLs by the Lucid
> 5LPE PLL type expectedly.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

[Severity: Low]
Since this fixes the Lucid 5LPE PLL configuration for SM8350 GPUCC and
VIDEOCC, should it include Fixes tags for the commits that introduced them?

  Fixes: 160758b05ab1 ("clk: qcom: add support for SM8350 GPUCC")
  Fixes: fd0b5b106fca ("clk: qcom: Introduce SM8350 VIDEOCC")

> diff --git a/drivers/clk/qcom/gpucc-sm8350.c b/drivers/clk/qcom/gpucc-sm8350.c
> index 6d2660bdd8254..b80f41361de72 100644
> --- a/drivers/clk/qcom/gpucc-sm8350.c
> +++ b/drivers/clk/qcom/gpucc-sm8350.c
> @@ -59,7 +59,7 @@ static struct clk_alpha_pll gpu_cc_pll0 = {
>  	.offset = 0x0,
>  	.vco_table = lucid_5lpe_vco,
>  	.num_vco = ARRAY_SIZE(lucid_5lpe_vco),
> -	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
> +	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],

[Severity: High]
Does this break the build for gpucc-sm8350.c and videocc-sm8350.c?
CLK_ALPHA_PLL_TYPE_LUCID_5LPE is not declared in
drivers/clk/qcom/clk-alpha-pll.h (which only defines
CLK_ALPHA_PLL_TYPE_LUCID, CLK_ALPHA_PLL_TYPE_LUCID_EVO, and
CLK_ALPHA_PLL_TYPE_LUCID_OLE).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125211315.1437946-1-vladimir.zapolskiy@linaro.org?part=2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] clk: qcom: Configure SC8280XP Lucid 5LPE PLLs properly
  2026-11-25 21:13 ` [PATCH 1/2] clk: qcom: Configure SC8280XP " Vladimir Zapolskiy
@ 2026-11-25 21:23   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-25 21:23 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-clk

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] clk: qcom: undeclared CLK_ALPHA_PLL_TYPE_LUCID_5LPE breaks
  SC8280XP build
--

commit af2d395c3773da56bbaeccf0423c38dba914bc64
Author: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

clk: qcom: Configure SC8280XP Lucid 5LPE PLLs properly

This commit switches the SC8280XP camera, display, and GPU clock
controllers to configure their Lucid 5LPE PLLs with
clk_lucid_5lpe_pll_configure() and use CLK_ALPHA_PLL_TYPE_LUCID_5LPE for
their register offsets.

> diff --git a/drivers/clk/qcom/camcc-sc8280xp.c b/drivers/clk/qcom/camcc-sc8280xp.c
> index b0f1d40d1df5e..d14cb46a19af9 100644
> --- a/drivers/clk/qcom/camcc-sc8280xp.c
> +++ b/drivers/clk/qcom/camcc-sc8280xp.c
> @@ -70,7 +70,7 @@ static struct clk_alpha_pll camcc_pll0 = {
>  	.offset = 0x0,
>  	.vco_table = lucid_vco,
>  	.num_vco = ARRAY_SIZE(lucid_vco),
> -	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
> +	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_5LPE],
>  	.clkr = {
>  		.hw.init = &(struct clk_init_data){
>  			.name = "camcc_pll0",

[Severity: High]
Does this fail to build because CLK_ALPHA_PLL_TYPE_LUCID_5LPE is not
defined in drivers/clk/qcom/clk-alpha-pll.h?

The Alpha PLL type enum defines CLK_ALPHA_PLL_TYPE_LUCID (aliased to
CLK_ALPHA_PLL_TYPE_TRION), CLK_ALPHA_PLL_TYPE_LUCID_EVO, and
CLK_ALPHA_PLL_TYPE_LUCID_OLE, but not CLK_ALPHA_PLL_TYPE_LUCID_5LPE.
Replacing CLK_ALPHA_PLL_TYPE_LUCID here and in the remaining PLL and
post-divider definitions across camcc-sc8280xp.c, dispcc-sc8280xp.c, and
gpucc-sc8280xp.c breaks compilation of all three drivers with an
undeclared identifier error.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125211315.1437946-1-vladimir.zapolskiy@linaro.org?part=1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-25 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 21:13 [PATCH 0/2] clk: qcom: Configure Lucid 5LPE PLLs properly Vladimir Zapolskiy
2026-11-25 21:13 ` [PATCH 1/2] clk: qcom: Configure SC8280XP " Vladimir Zapolskiy
2026-11-25 21:23   ` sashiko-bot
2026-11-25 21:13 ` [PATCH 2/2] clk: qcom: Configure SM8350 " Vladimir Zapolskiy
2026-11-25 21:21   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox