* [PATCH v3 01/12] clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:50 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 02/12] dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks Imran Shaik
` (10 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Some GCC branch clocks are required to be kept always-on due to the
hardware requirements. Drop the modelling of those always-on QCM2290 GCC
clocks and use the latest .clk_cbcr convention to keep them enabled from
probe.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/gcc-qcm2290.c | 160 +++++------------------------------------
1 file changed, 18 insertions(+), 142 deletions(-)
diff --git a/drivers/clk/qcom/gcc-qcm2290.c b/drivers/clk/qcom/gcc-qcm2290.c
index 6684cab63ae1160848631d1f8cd3c9cb691ff4ec..8d18bbbca0aaf92b430b749caa16cbae79abfcd7 100644
--- a/drivers/clk/qcom/gcc-qcm2290.c
+++ b/drivers/clk/qcom/gcc-qcm2290.c
@@ -1397,36 +1397,6 @@ static struct clk_branch gcc_cam_throttle_rt_clk = {
},
};
-static struct clk_branch gcc_camera_ahb_clk = {
- .halt_reg = 0x17008,
- .halt_check = BRANCH_HALT_DELAY,
- .hwcg_reg = 0x17008,
- .hwcg_bit = 1,
- .clkr = {
- .enable_reg = 0x17008,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_camera_ahb_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
-static struct clk_branch gcc_camera_xo_clk = {
- .halt_reg = 0x17028,
- .halt_check = BRANCH_HALT,
- .clkr = {
- .enable_reg = 0x17028,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_camera_xo_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_camss_axi_clk = {
.halt_reg = 0x58044,
.halt_check = BRANCH_HALT,
@@ -1825,22 +1795,6 @@ static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk = {
},
};
-static struct clk_branch gcc_disp_ahb_clk = {
- .halt_reg = 0x1700c,
- .halt_check = BRANCH_HALT,
- .hwcg_reg = 0x1700c,
- .hwcg_bit = 1,
- .clkr = {
- .enable_reg = 0x1700c,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_disp_ahb_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_regmap_div gcc_disp_gpll0_clk_src = {
.reg = 0x17058,
.shift = 0,
@@ -1899,20 +1853,6 @@ static struct clk_branch gcc_disp_throttle_core_clk = {
},
};
-static struct clk_branch gcc_disp_xo_clk = {
- .halt_reg = 0x1702c,
- .halt_check = BRANCH_HALT,
- .clkr = {
- .enable_reg = 0x1702c,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_disp_xo_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_gp1_clk = {
.halt_reg = 0x4d000,
.halt_check = BRANCH_HALT,
@@ -1964,22 +1904,6 @@ static struct clk_branch gcc_gp3_clk = {
},
};
-static struct clk_branch gcc_gpu_cfg_ahb_clk = {
- .halt_reg = 0x36004,
- .halt_check = BRANCH_HALT,
- .hwcg_reg = 0x36004,
- .hwcg_bit = 1,
- .clkr = {
- .enable_reg = 0x36004,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_gpu_cfg_ahb_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_gpu_gpll0_clk_src = {
.halt_check = BRANCH_HALT_DELAY,
.clkr = {
@@ -2012,19 +1936,6 @@ static struct clk_branch gcc_gpu_gpll0_div_clk_src = {
},
};
-static struct clk_branch gcc_gpu_iref_clk = {
- .halt_reg = 0x36100,
- .halt_check = BRANCH_HALT_DELAY,
- .clkr = {
- .enable_reg = 0x36100,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_gpu_iref_clk",
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_gpu_memnoc_gfx_clk = {
.halt_reg = 0x3600c,
.halt_check = BRANCH_VOTED,
@@ -2439,22 +2350,6 @@ static struct clk_branch gcc_sdcc2_apps_clk = {
},
};
-static struct clk_branch gcc_sys_noc_cpuss_ahb_clk = {
- .halt_reg = 0x2b06c,
- .halt_check = BRANCH_HALT_VOTED,
- .hwcg_reg = 0x2b06c,
- .hwcg_bit = 1,
- .clkr = {
- .enable_reg = 0x79004,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_sys_noc_cpuss_ahb_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_sys_noc_usb3_prim_axi_clk = {
.halt_reg = 0x1a080,
.halt_check = BRANCH_HALT,
@@ -2605,21 +2500,6 @@ static struct clk_branch gcc_venus_ctl_axi_clk = {
},
};
-static struct clk_branch gcc_video_ahb_clk = {
- .halt_reg = 0x17004,
- .halt_check = BRANCH_HALT,
- .hwcg_reg = 0x17004,
- .hwcg_bit = 1,
- .clkr = {
- .enable_reg = 0x17004,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_video_ahb_clk",
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gcc_video_axi0_clk = {
.halt_reg = 0x1701c,
.halt_check = BRANCH_HALT,
@@ -2686,19 +2566,6 @@ static struct clk_branch gcc_video_venus_ctl_clk = {
},
};
-static struct clk_branch gcc_video_xo_clk = {
- .halt_reg = 0x17024,
- .halt_check = BRANCH_HALT,
- .clkr = {
- .enable_reg = 0x17024,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_video_xo_clk",
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct gdsc gcc_camss_top_gdsc = {
.gdscr = 0x58004,
.pd = {
@@ -2775,8 +2642,6 @@ static struct clk_regmap *gcc_qcm2290_clocks[] = {
[GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
[GCC_CAM_THROTTLE_NRT_CLK] = &gcc_cam_throttle_nrt_clk.clkr,
[GCC_CAM_THROTTLE_RT_CLK] = &gcc_cam_throttle_rt_clk.clkr,
- [GCC_CAMERA_AHB_CLK] = &gcc_camera_ahb_clk.clkr,
- [GCC_CAMERA_XO_CLK] = &gcc_camera_xo_clk.clkr,
[GCC_CAMSS_AXI_CLK] = &gcc_camss_axi_clk.clkr,
[GCC_CAMSS_AXI_CLK_SRC] = &gcc_camss_axi_clk_src.clkr,
[GCC_CAMSS_CAMNOC_ATB_CLK] = &gcc_camss_camnoc_atb_clk.clkr,
@@ -2817,22 +2682,18 @@ static struct clk_regmap *gcc_qcm2290_clocks[] = {
[GCC_CAMSS_TOP_AHB_CLK] = &gcc_camss_top_ahb_clk.clkr,
[GCC_CAMSS_TOP_AHB_CLK_SRC] = &gcc_camss_top_ahb_clk_src.clkr,
[GCC_CFG_NOC_USB3_PRIM_AXI_CLK] = &gcc_cfg_noc_usb3_prim_axi_clk.clkr,
- [GCC_DISP_AHB_CLK] = &gcc_disp_ahb_clk.clkr,
[GCC_DISP_GPLL0_CLK_SRC] = &gcc_disp_gpll0_clk_src.clkr,
[GCC_DISP_GPLL0_DIV_CLK_SRC] = &gcc_disp_gpll0_div_clk_src.clkr,
[GCC_DISP_HF_AXI_CLK] = &gcc_disp_hf_axi_clk.clkr,
[GCC_DISP_THROTTLE_CORE_CLK] = &gcc_disp_throttle_core_clk.clkr,
- [GCC_DISP_XO_CLK] = &gcc_disp_xo_clk.clkr,
[GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
[GCC_GP1_CLK_SRC] = &gcc_gp1_clk_src.clkr,
[GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
[GCC_GP2_CLK_SRC] = &gcc_gp2_clk_src.clkr,
[GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
[GCC_GP3_CLK_SRC] = &gcc_gp3_clk_src.clkr,
- [GCC_GPU_CFG_AHB_CLK] = &gcc_gpu_cfg_ahb_clk.clkr,
[GCC_GPU_GPLL0_CLK_SRC] = &gcc_gpu_gpll0_clk_src.clkr,
[GCC_GPU_GPLL0_DIV_CLK_SRC] = &gcc_gpu_gpll0_div_clk_src.clkr,
- [GCC_GPU_IREF_CLK] = &gcc_gpu_iref_clk.clkr,
[GCC_GPU_MEMNOC_GFX_CLK] = &gcc_gpu_memnoc_gfx_clk.clkr,
[GCC_GPU_SNOC_DVM_GFX_CLK] = &gcc_gpu_snoc_dvm_gfx_clk.clkr,
[GCC_GPU_THROTTLE_CORE_CLK] = &gcc_gpu_throttle_core_clk.clkr,
@@ -2870,7 +2731,6 @@ static struct clk_regmap *gcc_qcm2290_clocks[] = {
[GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr,
[GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
[GCC_SDCC2_APPS_CLK_SRC] = &gcc_sdcc2_apps_clk_src.clkr,
- [GCC_SYS_NOC_CPUSS_AHB_CLK] = &gcc_sys_noc_cpuss_ahb_clk.clkr,
[GCC_SYS_NOC_USB3_PRIM_AXI_CLK] = &gcc_sys_noc_usb3_prim_axi_clk.clkr,
[GCC_USB30_PRIM_MASTER_CLK] = &gcc_usb30_prim_master_clk.clkr,
[GCC_USB30_PRIM_MASTER_CLK_SRC] = &gcc_usb30_prim_master_clk_src.clkr,
@@ -2887,13 +2747,11 @@ static struct clk_regmap *gcc_qcm2290_clocks[] = {
[GCC_VCODEC0_AXI_CLK] = &gcc_vcodec0_axi_clk.clkr,
[GCC_VENUS_AHB_CLK] = &gcc_venus_ahb_clk.clkr,
[GCC_VENUS_CTL_AXI_CLK] = &gcc_venus_ctl_axi_clk.clkr,
- [GCC_VIDEO_AHB_CLK] = &gcc_video_ahb_clk.clkr,
[GCC_VIDEO_AXI0_CLK] = &gcc_video_axi0_clk.clkr,
[GCC_VIDEO_THROTTLE_CORE_CLK] = &gcc_video_throttle_core_clk.clkr,
[GCC_VIDEO_VCODEC0_SYS_CLK] = &gcc_video_vcodec0_sys_clk.clkr,
[GCC_VIDEO_VENUS_CLK_SRC] = &gcc_video_venus_clk_src.clkr,
[GCC_VIDEO_VENUS_CTL_CLK] = &gcc_video_venus_ctl_clk.clkr,
- [GCC_VIDEO_XO_CLK] = &gcc_video_xo_clk.clkr,
[GPLL0] = &gpll0.clkr,
[GPLL0_OUT_AUX2] = &gpll0_out_aux2.clkr,
[GPLL1] = &gpll1.clkr,
@@ -2943,6 +2801,18 @@ static struct gdsc *gcc_qcm2290_gdscs[] = {
[HLOS1_VOTE_MM_SNOC_MMU_TBU_NRT_GDSC] = &hlos1_vote_mm_snoc_mmu_tbu_nrt_gdsc,
};
+static const u32 gcc_qcm2290_critical_cbcrs[] = {
+ 0x17008, /* GCC_CAMERA_AHB_CLK */
+ 0x17028, /* GCC_CAMERA_XO_CLK */
+ 0x1700c, /* GCC_DISP_AHB_CLK */
+ 0x1702c, /* GCC_DISP_XO_CLK */
+ 0x36004, /* GCC_GPU_CFG_AHB_CLK */
+ 0x36100, /* GCC_GPU_IREF_CLK */
+ 0x79004, /* GCC_SYS_NOC_CPUSS_AHB_CLK */
+ 0x17004, /* GCC_VIDEO_AHB_CLK */
+ 0x17024, /* GCC_VIDEO_XO_CLK */
+};
+
static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = {
DEFINE_RCG_DFS(gcc_qupv3_wrap0_s0_clk_src),
DEFINE_RCG_DFS(gcc_qupv3_wrap0_s1_clk_src),
@@ -2960,6 +2830,11 @@ static const struct regmap_config gcc_qcm2290_regmap_config = {
.fast_io = true,
};
+static const struct qcom_cc_driver_data gcc_qcm2290_driver_data = {
+ .clk_cbcrs = gcc_qcm2290_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(gcc_qcm2290_critical_cbcrs),
+};
+
static const struct qcom_cc_desc gcc_qcm2290_desc = {
.config = &gcc_qcm2290_regmap_config,
.clks = gcc_qcm2290_clocks,
@@ -2968,6 +2843,7 @@ static const struct qcom_cc_desc gcc_qcm2290_desc = {
.num_resets = ARRAY_SIZE(gcc_qcm2290_resets),
.gdscs = gcc_qcm2290_gdscs,
.num_gdscs = ARRAY_SIZE(gcc_qcm2290_gdscs),
+ .driver_data = &gcc_qcm2290_driver_data,
};
static const struct of_device_id gcc_qcm2290_match_table[] = {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 01/12] clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe
2026-06-01 18:21 ` [PATCH v3 01/12] clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe Imran Shaik
@ 2026-06-01 18:50 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:50 UTC (permalink / raw)
To: Imran Shaik; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing UAPI clock identifiers from the clock provider array shrinks the array size and removes mapped entries, breaking backward compatibility with existing device trees.
--
commit 70f7cf6dd1977dd3ca34d8d9a83d70fb0593afab
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe
Some GCC branch clocks are required to be kept always-on due to the
hardware requirements. Drop the modelling of those always-on QCM2290 GCC
clocks and use the latest .clk_cbcr convention to keep them enabled from
probe.
> diff --git a/drivers/clk/qcom/gcc-qcm2290.c b/drivers/clk/qcom/gcc-qcm2290.c
> index 6684cab63ae11..8d18bbbca0aaf 100644
> --- a/drivers/clk/qcom/gcc-qcm2290.c
> +++ b/drivers/clk/qcom/gcc-qcm2290.c
[ ... ]
> @@ -2887,13 +2747,11 @@ static struct clk_regmap *gcc_qcm2290_clocks[] = {
> [GCC_VCODEC0_AXI_CLK] = &gcc_vcodec0_axi_clk.clkr,
> [GCC_VENUS_AHB_CLK] = &gcc_venus_ahb_clk.clkr,
> [GCC_VENUS_CTL_AXI_CLK] = &gcc_venus_ctl_axi_clk.clkr,
> - [GCC_VIDEO_AHB_CLK] = &gcc_video_ahb_clk.clkr,
> [GCC_VIDEO_AXI0_CLK] = &gcc_video_axi0_clk.clkr,
> [GCC_VIDEO_THROTTLE_CORE_CLK] = &gcc_video_throttle_core_clk.clkr,
> [GCC_VIDEO_VCODEC0_SYS_CLK] = &gcc_video_vcodec0_sys_clk.clkr,
> [GCC_VIDEO_VENUS_CLK_SRC] = &gcc_video_venus_clk_src.clkr,
> [GCC_VIDEO_VENUS_CTL_CLK] = &gcc_video_venus_ctl_clk.clkr,
> - [GCC_VIDEO_XO_CLK] = &gcc_video_xo_clk.clkr,
> [GPLL0] = &gpll0.clkr,
> [GPLL0_OUT_AUX2] = &gpll0_out_aux2.clkr,
> [GPLL1] = &gpll1.clkr,
[Severity: High]
Does removing these clocks from the array break backward compatibility with
existing device trees?
By removing GCC_VIDEO_XO_CLK (which is the highest index defined in the DT
bindings) and other clocks from gcc_qcm2290_clocks, the array size
implicitly shrinks.
When consumer drivers attempt to acquire these clocks via clk_get(), the
bounds check in qcom_cc_clk_hw_get() will now fail or return NULL, returning
-EINVAL instead of a valid clock.
Will existing device trees referencing these clocks cause their consumer
drivers to fail to probe?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 02/12] dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
2026-06-01 18:21 ` [PATCH v3 01/12] clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:32 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 03/12] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller Imran Shaik
` (9 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 DISPCC binding to document additional clock inputs
supported by the hardware, including DSI1 PHY byte/pixel clocks and
the sleep clock, alongside the existing clock list. This is an ABI
extension, and existing clock inputs ordering is unchanged.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
.../bindings/clock/qcom,qcm2290-dispcc.yaml | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
index 4a533b45eec2d8e7b866c3436bfe6f80fcd714fb..24f2cce033f6e109b65a79553fba5295eb9adf3a 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
@@ -25,8 +25,11 @@ properties:
- description: Board active-only XO source
- description: GPLL0 source from GCC
- description: GPLL0 div source from GCC
- - description: Byte clock from DSI PHY
- - description: Pixel clock from DSI PHY
+ - description: Byte clock from DSI PHY0
+ - description: Pixel clock from DSI PHY0
+ - description: Byte clock from DSI PHY1
+ - description: Pixel clock from DSI PHY1
+ - description: Board sleep clock
clock-names:
items:
@@ -36,6 +39,9 @@ properties:
- const: gcc_disp_gpll0_div_clk_src
- const: dsi0_phy_pll_out_byteclk
- const: dsi0_phy_pll_out_dsiclk
+ - const: dsi1_phy_pll_out_byteclk
+ - const: dsi1_phy_pll_out_dsiclk
+ - const: sleep_clk
required:
- compatible
@@ -61,13 +67,19 @@ examples:
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
<&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>,
<&dsi0_phy 0>,
- <&dsi0_phy 1>;
+ <&dsi0_phy 1>,
+ <&dsi1_phy 0>,
+ <&dsi1_phy 1>,
+ <&sleep_clk>;
clock-names = "bi_tcxo",
"bi_tcxo_ao",
"gcc_disp_gpll0_clk_src",
"gcc_disp_gpll0_div_clk_src",
"dsi0_phy_pll_out_byteclk",
- "dsi0_phy_pll_out_dsiclk";
+ "dsi0_phy_pll_out_dsiclk",
+ "dsi1_phy_pll_out_byteclk",
+ "dsi1_phy_pll_out_dsiclk",
+ "sleep_clk";
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 02/12] dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks
2026-06-01 18:21 ` [PATCH v3 02/12] dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks Imran Shaik
@ 2026-06-01 18:32 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:32 UTC (permalink / raw)
To: Imran Shaik; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding new items to the 'clocks' and 'clock-names' arrays without specifying a 'minItems' constraint breaks backward compatibility with existing device trees.
--
commit 85e4a2f46a61d48ee9c66caba34fbc7a3fa61a61
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks
Update the QCM2290 DISPCC binding to document additional clock inputs
supported by the hardware, including DSI1 PHY byte/pixel clocks and
the sleep clock, alongside the existing clock list. This is an ABI
extension, and existing clock inputs ordering is unchanged.
> diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
> --- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
> @@ -25,8 +25,11 @@ properties:
> - description: Board active-only XO source
> - description: GPLL0 source from GCC
> - description: GPLL0 div source from GCC
> - - description: Byte clock from DSI PHY
> - - description: Pixel clock from DSI PHY
> + - description: Byte clock from DSI PHY0
> + - description: Pixel clock from DSI PHY0
> + - description: Byte clock from DSI PHY1
> + - description: Pixel clock from DSI PHY1
> + - description: Board sleep clock
[Severity: High]
Does adding these items to the clocks array without specifying a minItems
constraint cause a regression for backward compatibility with existing device
trees?
The commit message states "This is an ABI extension", but in dt-schema,
specifying an items list for an array implicitly sets both minItems and
maxItems to the length of the list unless overridden. Expanding the clocks
list from 6 to 9 items without adding minItems: 6 will result in dtbs_check
errors for older device trees that only provide 6 clocks.
>
> clock-names:
> items:
> @@ -36,6 +39,9 @@ properties:
> - const: gcc_disp_gpll0_div_clk_src
> - const: dsi0_phy_pll_out_byteclk
> - const: dsi0_phy_pll_out_dsiclk
> + - const: dsi1_phy_pll_out_byteclk
> + - const: dsi1_phy_pll_out_dsiclk
> + - const: sleep_clk
[Severity: High]
Similarly, does the clock-names array also need a minItems: 6 constraint?
Without it, the schema will strictly enforce that all 9 clock names must be
present, which might break compatibility with existing device trees that only
provide 6 clocks.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 03/12] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
2026-06-01 18:21 ` [PATCH v3 01/12] clk: qcom: gcc-qcm2290: Keep the critical clocks always-on from probe Imran Shaik
2026-06-01 18:21 ` [PATCH v3 02/12] dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:38 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 04/12] dt-bindings: clock: qcom: Add Qualcomm Shikra GPU " Imran Shaik
` (8 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
The Qualcomm Shikra Display clock controller is similar to QCM2290
DISPCC hardware block. Hence, reuse the QCM2290 DISPCC bindings for
Qualcomm Shikra SoC.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
index 24f2cce033f6e109b65a79553fba5295eb9adf3a..5cee033f2115deb392fc1deeee8d5aed4cbde052 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
@@ -17,7 +17,13 @@ description: |
properties:
compatible:
- const: qcom,qcm2290-dispcc
+ oneOf:
+ - items:
+ - enum:
+ - qcom,shikra-dispcc
+ - const: qcom,qcm2290-dispcc
+ - enum:
+ - qcom,qcm2290-dispcc
clocks:
items:
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 03/12] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller
2026-06-01 18:21 ` [PATCH v3 03/12] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller Imran Shaik
@ 2026-06-01 18:38 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:38 UTC (permalink / raw)
To: Imran Shaik; +Cc: conor+dt, devicetree, robh
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `clocks` and `clock-names` properties lack a `minItems` constraint after adding new clocks, breaking validation for legacy device trees.
- [High] Enum indices for GPLL0 parent clocks are swapped compared to the DT bindings, causing MDSS clocks to run at half frequency.
- [Medium] The driver globally modifies a static frequency table during probe based on the device compatible string, causing state contamination.
--
Hello,
I am an automated review bot. I have reviewed the patch series and found a
few regressions across the following commits.
commit 85e4a2f46a61d48ee9c66caba34fbc7a3fa61a61
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
dt-bindings: clock: qcom,qcm2290-dispcc: Add DSI1 PHY and sleep clocks
Update the QCM2290 DISPCC binding to document additional clock inputs
supported by the hardware, including DSI1 PHY byte/pixel clocks and
the sleep clock, alongside the existing clock list. This is an ABI
extension, and existing clock inputs ordering is unchanged.
> diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
> index 4a533b45eec2d..24f2cce033f6e 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-dispcc.yaml
[ ... ]
> @@ -36,6 +39,9 @@ properties:
> - const: gcc_disp_gpll0_div_clk_src
> - const: dsi0_phy_pll_out_byteclk
> - const: dsi0_phy_pll_out_dsiclk
> + - const: dsi1_phy_pll_out_byteclk
> + - const: dsi1_phy_pll_out_dsiclk
> + - const: sleep_clk
[Severity: High]
Is it possible that omitting a minItems constraint for the clocks and
clock-names arrays breaks validation for legacy device trees?
In dt-schema, an items array without minItems defaults to expecting exactly
the maximum number of items. This causes make dtbs_check to strictly require
exactly 9 clocks for the qcom,qcm2290-dispcc compatible.
Could this break schema validation for legacy device trees that legally
provided only the original 6 clocks, violating DT backward compatibility
rules?
commit 6900a283b3a0edc157171145f5dc5bdc527dae67
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup
Update the QCM2290 DISPCC driver to use the DT index based parent clock
lookup to align with the latest convention. While at it, fix the parent
data of mdss ahb/mdp clocks to use GPLL0 main output as per HW clock plan,
and update frequency table accordingly. Also, add the DSI1 PHY PLL input
clocks support.
> diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
> index 1c21267ae0f7a..f5dbd19d0a033 100644
> --- a/drivers/clk/qcom/dispcc-qcm2290.c
> +++ b/drivers/clk/qcom/dispcc-qcm2290.c
> @@ -24,6 +24,18 @@
> #include "gdsc.h"
> #include "reset.h"
>
> +enum {
> + DT_BI_TCXO,
> + DT_BI_TCXO_AO,
> + DT_GPLL0_OUT_DIV,
> + DT_GPLL0,
> + DT_DSI0_PHY_PLL_OUT_BYTECLK,
> + DT_DSI0_PHY_PLL_OUT_DSICLK,
> + DT_DSI1_PHY_PLL_OUT_BYTECLK,
> + DT_DSI1_PHY_PLL_OUT_DSICLK,
> + DT_SLEEP_CLK,
> +};
> +
[ ... ]
> static const struct parent_map disp_cc_parent_map_2[] = {
> { P_BI_TCXO_AO, 0 },
> - { P_GPLL0_OUT_DIV, 4 },
> + { P_GPLL0_OUT_MAIN, 4 },
> };
>
> static const struct clk_parent_data disp_cc_parent_data_2[] = {
> - { .fw_name = "bi_tcxo_ao" },
> - { .fw_name = "gcc_disp_gpll0_div_clk_src" },
> + { .index = DT_BI_TCXO_AO },
> + { .index = DT_GPLL0 },
[Severity: High]
Are the enum indices for the GPLL0 parent clocks swapped compared to the DT
bindings?
The DT binding qcom,qcm2290-dispcc.yaml lists the main clock at index 2
(gcc_disp_gpll0_clk_src) and the div clock at index 3
(gcc_disp_gpll0_div_clk_src).
However, the enum mapping defines DT_GPLL0_OUT_DIV at index 2 and DT_GPLL0
at index 3. Due to this mismatch, DT_GPLL0 fetches the div clock instead
of the main clock.
By setting .index = DT_GPLL0, disp_cc_parent_data_2 incorrectly maps to the
divided output, halving the expected frequency for the MDSS AHB clocks.
[ ... ]
> static const struct parent_map disp_cc_parent_map_3[] = {
> @@ -101,19 +115,21 @@ static const struct parent_map disp_cc_parent_map_3[] = {
> };
>
> static const struct clk_parent_data disp_cc_parent_data_3[] = {
> - { .fw_name = "bi_tcxo" },
> + { .index = DT_BI_TCXO },
> { .hw = &disp_cc_pll0.clkr.hw },
> - { .fw_name = "gcc_disp_gpll0_clk_src" },
> + { .index = DT_GPLL0 },
[Severity: High]
Could this also incorrectly map MDP clocks to the div clock because of the
swapped enum index?
commit 6798f69afeb9c9f6942dbf7fe2d0b171657b2f8f
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: Add support for Qualcomm GPU Clock Controller on Shikra
The Qualcomm Shikra GPU clock controller is similar to QCM2290 GPUCC
hardware block, with minor differences. Hence add support for Shikra
GPUCC by extending the QCM2290 GPUCC driver.
> diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
> index 6e696cf672923..f43dd8231fb20 100644
> --- a/drivers/clk/qcom/gpucc-qcm2290.c
> +++ b/drivers/clk/qcom/gpucc-qcm2290.c
[ ... ]
> @@ -357,12 +368,16 @@ static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
>
> static const struct of_device_id gpu_cc_qcm2290_match_table[] = {
> { .compatible = "qcom,qcm2290-gpucc" },
> + { .compatible = "qcom,shikra-gpucc" },
> { }
> };
> MODULE_DEVICE_TABLE(of, gpu_cc_qcm2290_match_table);
>
> static int gpu_cc_qcm2290_probe(struct platform_device *pdev)
> {
> + if (device_is_compatible(&pdev->dev, "qcom,shikra-gpucc"))
> + gpu_cc_gx_gfx3d_clk_src.freq_tbl = ftbl_gpu_cc_gx_gfx3d_clk_src_shikra;
> +
[Severity: Medium]
Could updating the global static structure here cause state contamination?
If the compatible string is qcom,shikra-gpucc, it permanently mutates
gpu_cc_gx_gfx3d_clk_src.freq_tbl for the entire driver module. If the driver
is unbound and rebound to a different compatible device, or in a theoretical
multi-instance scenario, the frequency table remains permanently overwritten.
Would it be better to pass a device-specific qcom_cc_desc using
of_device_id.data or dynamically allocate the clock structure to avoid
static state contamination?
> return qcom_cc_probe(pdev, &gpu_cc_qcm2290_desc);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=3
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 04/12] dt-bindings: clock: qcom: Add Qualcomm Shikra GPU clock controller
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (2 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 03/12] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:21 ` [PATCH v3 05/12] clk: qcom: dispcc-qcm2290: Move to the latest common qcom_cc_probe() model Imran Shaik
` (7 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
The Qualcomm Shikra GPU clock controller is similar to QCM2290 GPUCC
hardware block, with minor differences. Hence, reuse the QCM2290 GPUCC
bindings for Qualcomm Shikra SoC.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
index 734880805c1b981a1c899d85435f83f4f3dd3ea9..1bd70d091fcd7b6d7805ac090aaf840a415c123b 100644
--- a/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml
@@ -18,7 +18,9 @@ description: |
properties:
compatible:
- const: qcom,qcm2290-gpucc
+ enum:
+ - qcom,qcm2290-gpucc
+ - qcom,shikra-gpucc
reg:
maxItems: 1
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH v3 05/12] clk: qcom: dispcc-qcm2290: Move to the latest common qcom_cc_probe() model
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (3 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 04/12] dt-bindings: clock: qcom: Add Qualcomm Shikra GPU " Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:21 ` [PATCH v3 06/12] clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup Imran Shaik
` (6 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 DISPCC driver to use the qcom_cc_probe() model by moving
the critical clocks handling and PLL configurations from probe to the
driver_data to align with the latest convention.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/dispcc-qcm2290.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
index 6d88d067337fa132114b0d8666931b449f86de17..1c21267ae0f7a86c1de88e888c2a990c35f0a0e0 100644
--- a/drivers/clk/qcom/dispcc-qcm2290.c
+++ b/drivers/clk/qcom/dispcc-qcm2290.c
@@ -2,6 +2,7 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, Linaro Ltd.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
#include <linux/clk-provider.h>
@@ -49,6 +50,7 @@ static const struct alpha_pll_config disp_cc_pll0_config = {
static struct clk_alpha_pll disp_cc_pll0 = {
.offset = 0x0,
+ .config = &disp_cc_pll0_config,
.vco_table = spark_vco,
.num_vco = ARRAY_SIZE(spark_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
@@ -483,6 +485,14 @@ static struct clk_regmap *disp_cc_qcm2290_clocks[] = {
[DISP_CC_SLEEP_CLK_SRC] = &disp_cc_sleep_clk_src.clkr,
};
+static struct clk_alpha_pll *disp_cc_qcm2290_plls[] = {
+ &disp_cc_pll0,
+};
+
+static const u32 disp_cc_qcm2290_critical_cbcrs[] = {
+ 0x604c, /* DISP_CC_XO_CLK */
+};
+
static const struct regmap_config disp_cc_qcm2290_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -491,6 +501,13 @@ static const struct regmap_config disp_cc_qcm2290_regmap_config = {
.fast_io = true,
};
+static const struct qcom_cc_driver_data disp_cc_qcm2290_driver_data = {
+ .alpha_plls = disp_cc_qcm2290_plls,
+ .num_alpha_plls = ARRAY_SIZE(disp_cc_qcm2290_plls),
+ .clk_cbcrs = disp_cc_qcm2290_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(disp_cc_qcm2290_critical_cbcrs),
+};
+
static const struct qcom_cc_desc disp_cc_qcm2290_desc = {
.config = &disp_cc_qcm2290_regmap_config,
.clks = disp_cc_qcm2290_clocks,
@@ -499,6 +516,7 @@ static const struct qcom_cc_desc disp_cc_qcm2290_desc = {
.num_gdscs = ARRAY_SIZE(disp_cc_qcm2290_gdscs),
.resets = disp_cc_qcm2290_resets,
.num_resets = ARRAY_SIZE(disp_cc_qcm2290_resets),
+ .driver_data = &disp_cc_qcm2290_driver_data,
};
static const struct of_device_id disp_cc_qcm2290_match_table[] = {
@@ -509,25 +527,7 @@ MODULE_DEVICE_TABLE(of, disp_cc_qcm2290_match_table);
static int disp_cc_qcm2290_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- regmap = qcom_cc_map(pdev, &disp_cc_qcm2290_desc);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
- clk_alpha_pll_configure(&disp_cc_pll0, regmap, &disp_cc_pll0_config);
-
- /* Keep some clocks always-on */
- qcom_branch_set_clk_en(regmap, 0x604c); /* DISP_CC_XO_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &disp_cc_qcm2290_desc, regmap);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register DISP CC clocks\n");
- return ret;
- }
-
- return ret;
+ return qcom_cc_probe(pdev, &disp_cc_qcm2290_desc);
}
static struct platform_driver disp_cc_qcm2290_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH v3 06/12] clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (4 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 05/12] clk: qcom: dispcc-qcm2290: Move to the latest common qcom_cc_probe() model Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:41 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 07/12] clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags Imran Shaik
` (5 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 DISPCC driver to use the DT index based parent clock
lookup to align with the latest convention. While at it, fix the parent
data of mdss ahb/mdp clocks to use GPLL0 main output as per HW clock plan,
and update frequency table accordingly. Also, add the DSI1 PHY PLL input
clocks support.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/dispcc-qcm2290.c | 44 ++++++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
index 1c21267ae0f7a86c1de88e888c2a990c35f0a0e0..f5dbd19d0a0334362a44f91a69229cb0f018f309 100644
--- a/drivers/clk/qcom/dispcc-qcm2290.c
+++ b/drivers/clk/qcom/dispcc-qcm2290.c
@@ -24,6 +24,18 @@
#include "gdsc.h"
#include "reset.h"
+enum {
+ DT_BI_TCXO,
+ DT_BI_TCXO_AO,
+ DT_GPLL0_OUT_DIV,
+ DT_GPLL0,
+ DT_DSI0_PHY_PLL_OUT_BYTECLK,
+ DT_DSI0_PHY_PLL_OUT_DSICLK,
+ DT_DSI1_PHY_PLL_OUT_BYTECLK,
+ DT_DSI1_PHY_PLL_OUT_DSICLK,
+ DT_SLEEP_CLK,
+};
+
enum {
P_BI_TCXO,
P_BI_TCXO_AO,
@@ -33,6 +45,8 @@ enum {
P_GPLL0_OUT_DIV,
P_GPLL0_OUT_MAIN,
P_SLEEP_CLK,
+ P_DSI1_PHY_PLL_OUT_BYTECLK,
+ P_DSI1_PHY_PLL_OUT_DSICLK,
};
static const struct pll_vco spark_vco[] = {
@@ -58,7 +72,7 @@ static struct clk_alpha_pll disp_cc_pll0 = {
.hw.init = &(struct clk_init_data){
.name = "disp_cc_pll0",
.parent_data = &(const struct clk_parent_data){
- .fw_name = "bi_tcxo",
+ .index = DT_BI_TCXO,
},
.num_parents = 1,
.ops = &clk_alpha_pll_ops,
@@ -72,8 +86,8 @@ static const struct parent_map disp_cc_parent_map_0[] = {
};
static const struct clk_parent_data disp_cc_parent_data_0[] = {
- { .fw_name = "bi_tcxo" },
- { .fw_name = "dsi0_phy_pll_out_byteclk" },
+ { .index = DT_BI_TCXO },
+ { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK },
};
static const struct parent_map disp_cc_parent_map_1[] = {
@@ -81,17 +95,17 @@ static const struct parent_map disp_cc_parent_map_1[] = {
};
static const struct clk_parent_data disp_cc_parent_data_1[] = {
- { .fw_name = "bi_tcxo" },
+ { .index = DT_BI_TCXO },
};
static const struct parent_map disp_cc_parent_map_2[] = {
{ P_BI_TCXO_AO, 0 },
- { P_GPLL0_OUT_DIV, 4 },
+ { P_GPLL0_OUT_MAIN, 4 },
};
static const struct clk_parent_data disp_cc_parent_data_2[] = {
- { .fw_name = "bi_tcxo_ao" },
- { .fw_name = "gcc_disp_gpll0_div_clk_src" },
+ { .index = DT_BI_TCXO_AO },
+ { .index = DT_GPLL0 },
};
static const struct parent_map disp_cc_parent_map_3[] = {
@@ -101,19 +115,21 @@ static const struct parent_map disp_cc_parent_map_3[] = {
};
static const struct clk_parent_data disp_cc_parent_data_3[] = {
- { .fw_name = "bi_tcxo" },
+ { .index = DT_BI_TCXO },
{ .hw = &disp_cc_pll0.clkr.hw },
- { .fw_name = "gcc_disp_gpll0_clk_src" },
+ { .index = DT_GPLL0 },
};
static const struct parent_map disp_cc_parent_map_4[] = {
{ P_BI_TCXO, 0 },
{ P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
+ { P_DSI1_PHY_PLL_OUT_DSICLK, 2 },
};
static const struct clk_parent_data disp_cc_parent_data_4[] = {
- { .fw_name = "bi_tcxo" },
- { .fw_name = "dsi0_phy_pll_out_dsiclk" },
+ { .index = DT_BI_TCXO },
+ { .index = DT_DSI0_PHY_PLL_OUT_DSICLK },
+ { .index = DT_DSI1_PHY_PLL_OUT_DSICLK },
};
static const struct parent_map disp_cc_parent_map_5[] = {
@@ -121,7 +137,7 @@ static const struct parent_map disp_cc_parent_map_5[] = {
};
static const struct clk_parent_data disp_cc_parent_data_5[] = {
- { .fw_name = "sleep_clk" },
+ { .index = DT_SLEEP_CLK },
};
static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = {
@@ -155,8 +171,8 @@ static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {
static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
F(19200000, P_BI_TCXO_AO, 1, 0, 0),
- F(37500000, P_GPLL0_OUT_DIV, 8, 0, 0),
- F(75000000, P_GPLL0_OUT_DIV, 4, 0, 0),
+ F(37500000, P_GPLL0_OUT_MAIN, 8, 0, 0),
+ F(75000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
{ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 06/12] clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup
2026-06-01 18:21 ` [PATCH v3 06/12] clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup Imran Shaik
@ 2026-06-01 18:41 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:41 UTC (permalink / raw)
To: Imran Shaik; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The DSI1 PHY PLL byte clock input is not wired up in the parent mappings, making the DSI1 PHY support incomplete.
--
commit 6900a283b3a0edc157171145f5dc5bdc527dae67
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup
This commit updates the QCM2290 DISPCC driver to use DT index based
parent clock lookups and fixes the parent data for mdss ahb/mdp clocks.
It also introduces support for the DSI1 PHY PLL input clocks.
> diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
> index 1c21267ae0f7a..f5dbd19d0a033 100644
> --- a/drivers/clk/qcom/dispcc-qcm2290.c
> +++ b/drivers/clk/qcom/dispcc-qcm2290.c
[ ... ]
> @@ -72,8 +86,8 @@ static const struct parent_map disp_cc_parent_map_0[] = {
> };
>
> static const struct clk_parent_data disp_cc_parent_data_0[] = {
> - { .fw_name = "bi_tcxo" },
> - { .fw_name = "dsi0_phy_pll_out_byteclk" },
> + { .index = DT_BI_TCXO },
> + { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK },
> };
[Severity: High]
The commit message mentions adding DSI1 PHY PLL input clocks support, and
the enums for the DSI1 byte clock are added earlier in the patch.
Should P_DSI1_PHY_PLL_OUT_BYTECLK and DT_DSI1_PHY_PLL_OUT_BYTECLK be added
to disp_cc_parent_map_0 and disp_cc_parent_data_0 as well, similar to how
the DSICLK was added to disp_cc_parent_map_4 below?
Without it, does the hardware lack the ability to select the DSI1 byte
clock for disp_cc_mdss_byte0_clk_src?
[ ... ]
> @@ -101,19 +115,21 @@ static const struct parent_map disp_cc_parent_map_3[] = {
> };
>
> static const struct clk_parent_data disp_cc_parent_data_3[] = {
> - { .fw_name = "bi_tcxo" },
> + { .index = DT_BI_TCXO },
> { .hw = &disp_cc_pll0.clkr.hw },
> - { .fw_name = "gcc_disp_gpll0_clk_src" },
> + { .index = DT_GPLL0 },
> };
>
> static const struct parent_map disp_cc_parent_map_4[] = {
> { P_BI_TCXO, 0 },
> { P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
> + { P_DSI1_PHY_PLL_OUT_DSICLK, 2 },
> };
>
> static const struct clk_parent_data disp_cc_parent_data_4[] = {
> - { .fw_name = "bi_tcxo" },
> - { .fw_name = "dsi0_phy_pll_out_dsiclk" },
> + { .index = DT_BI_TCXO },
> + { .index = DT_DSI0_PHY_PLL_OUT_DSICLK },
> + { .index = DT_DSI1_PHY_PLL_OUT_DSICLK },
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=6
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 07/12] clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (5 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 06/12] clk: qcom: dispcc-qcm2290: Switch to DT index based clk lookup Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:33 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 08/12] clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model Imran Shaik
` (4 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 DISPCC GDSC wait_val fields to match the hardware
default values. Incorrect settings can cause the GDSC FSM to stuck,
leading to power on/off failures. And update GDSC flags to retain the
registers, and poll for the CFG GDSCR, and switch between HW/SW mode
dynamically as per the latest convention.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/dispcc-qcm2290.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
index f5dbd19d0a0334362a44f91a69229cb0f018f309..4c1eef79f41b6907fe79f2b18bcb5f6160c74a43 100644
--- a/drivers/clk/qcom/dispcc-qcm2290.c
+++ b/drivers/clk/qcom/dispcc-qcm2290.c
@@ -468,11 +468,14 @@ static const struct qcom_reset_map disp_cc_qcm2290_resets[] = {
static struct gdsc mdss_gdsc = {
.gdscr = 0x3000,
+ .en_rest_wait_val = 0x2,
+ .en_few_wait_val = 0x2,
+ .clk_dis_wait_val = 0xf,
.pd = {
.name = "mdss_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
- .flags = HW_CTRL,
+ .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
static struct gdsc *disp_cc_qcm2290_gdscs[] = {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 07/12] clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags
2026-06-01 18:21 ` [PATCH v3 07/12] clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags Imran Shaik
@ 2026-06-01 18:33 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:33 UTC (permalink / raw)
To: Imran Shaik; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch incorrectly replaces `HW_CTRL` with `HW_CTRL_TRIGGER` for the MDSS GDSC, permanently disabling hardware control because the DRM MSM display framework does not implement dynamic hardware mode switching.
--
commit 6116e813ca331d00d8d79cfead6907de56f2475b
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags
This commit updates the QCM2290 DISPCC GDSC wait_val fields to match
hardware defaults and modifies GDSC flags. It adds flags to retain
registers, poll for CFG GDSCR, and dynamically switch between HW/SW modes.
> diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
> index f5dbd19d0a033..4c1eef79f41b6 100644
> --- a/drivers/clk/qcom/dispcc-qcm2290.c
> +++ b/drivers/clk/qcom/dispcc-qcm2290.c
> @@ -468,11 +468,14 @@ static const struct qcom_reset_map disp_cc_qcm2290_resets[] = {
>
> static struct gdsc mdss_gdsc = {
> .gdscr = 0x3000,
> + .en_rest_wait_val = 0x2,
> + .en_few_wait_val = 0x2,
> + .clk_dis_wait_val = 0xf,
> .pd = {
> .name = "mdss_gdsc",
> },
> .pwrsts = PWRSTS_OFF_ON,
> - .flags = HW_CTRL,
> + .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
[Severity: Medium]
Does replacing HW_CTRL with HW_CTRL_TRIGGER here permanently disable hardware
control for the MDSS GDSC?
The HW_CTRL flag statically enables hardware mode during power-on. By changing
this to HW_CTRL_TRIGGER, hardware mode is disabled by default and must be
explicitly enabled by the consumer driver via dev_pm_genpd_set_hwmode().
Since the DRM MSM subsystem doesn't invoke dev_pm_genpd_set_hwmode(), will
the MDSS GDSC remain indefinitely in software mode, breaking hardware-managed
power scaling?
> };
>
> static struct gdsc *disp_cc_qcm2290_gdscs[] = {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=7
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 08/12] clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (6 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 07/12] clk: qcom: dispcc-qcm2290: Update GDSC *wait_val values and flags Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:41 ` sashiko-bot
2026-06-01 18:21 ` [PATCH v3 09/12] clk: qcom: gpucc-qcm2290: Park RCG's clk source at XO during disable Imran Shaik
` (3 subsequent siblings)
11 siblings, 1 reply; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 GPUCC driver to use the qcom_cc_probe() model by moving
the critical clocks handling and PLL configurations from probe to the
driver_data to align with the latest convention. While at it, drop the
modelling of gpu_cc_ahb_clk and gpu_cc_cxo_aon_clk clocks and keep them
enabled from probe as per the hardware requirements, and drop pm_clk
handling as the required GCC clocks are kept always-on from GCC probe.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/gpucc-qcm2290.c | 92 +++++++++-------------------------------
1 file changed, 21 insertions(+), 71 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
index dc369dff882e69a8c0acd260953d5fcae9453120..1c8ed12f6bf8154596d031347540ef621314edc6 100644
--- a/drivers/clk/qcom/gpucc-qcm2290.c
+++ b/drivers/clk/qcom/gpucc-qcm2290.c
@@ -2,14 +2,13 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2024, Linaro Limited
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
#include <linux/clk-provider.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,qcm2290-gpucc.h>
@@ -20,7 +19,7 @@
#include "clk-regmap.h"
#include "clk-regmap-divider.h"
#include "clk-regmap-mux.h"
-#include "clk-regmap-phy-mux.h"
+#include "common.h"
#include "gdsc.h"
#include "reset.h"
@@ -57,6 +56,7 @@ static const struct alpha_pll_config gpu_cc_pll0_config = {
static struct clk_alpha_pll gpu_cc_pll0 = {
.offset = 0x0,
+ .config = &gpu_cc_pll0_config,
.vco_table = huayra_vco,
.num_vco = ARRAY_SIZE(huayra_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_2290],
@@ -148,20 +148,6 @@ static struct clk_rcg2 gpu_cc_gx_gfx3d_clk_src = {
},
};
-static struct clk_branch gpu_cc_ahb_clk = {
- .halt_reg = 0x1078,
- .halt_check = BRANCH_HALT_DELAY,
- .clkr = {
- .enable_reg = 0x1078,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gpu_cc_ahb_clk",
- .flags = CLK_IS_CRITICAL,
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gpu_cc_crc_ahb_clk = {
.halt_reg = 0x107c,
.halt_check = BRANCH_HALT_DELAY,
@@ -224,19 +210,6 @@ static struct clk_branch gpu_cc_cx_snoc_dvm_clk = {
},
};
-static struct clk_branch gpu_cc_cxo_aon_clk = {
- .halt_reg = 0x1004,
- .halt_check = BRANCH_HALT_DELAY,
- .clkr = {
- .enable_reg = 0x1004,
- .enable_mask = BIT(0),
- .hw.init = &(struct clk_init_data){
- .name = "gpu_cc_cxo_aon_clk",
- .ops = &clk_branch2_ops,
- },
- },
-};
-
static struct clk_branch gpu_cc_cxo_clk = {
.halt_reg = 0x109c,
.halt_check = BRANCH_HALT,
@@ -318,12 +291,10 @@ static struct gdsc gpu_gx_gdsc = {
};
static struct clk_regmap *gpu_cc_qcm2290_clocks[] = {
- [GPU_CC_AHB_CLK] = &gpu_cc_ahb_clk.clkr,
[GPU_CC_CRC_AHB_CLK] = &gpu_cc_crc_ahb_clk.clkr,
[GPU_CC_CX_GFX3D_CLK] = &gpu_cc_cx_gfx3d_clk.clkr,
[GPU_CC_CX_GMU_CLK] = &gpu_cc_cx_gmu_clk.clkr,
[GPU_CC_CX_SNOC_DVM_CLK] = &gpu_cc_cx_snoc_dvm_clk.clkr,
- [GPU_CC_CXO_AON_CLK] = &gpu_cc_cxo_aon_clk.clkr,
[GPU_CC_CXO_CLK] = &gpu_cc_cxo_clk.clkr,
[GPU_CC_GMU_CLK_SRC] = &gpu_cc_gmu_clk_src.clkr,
[GPU_CC_GX_GFX3D_CLK] = &gpu_cc_gx_gfx3d_clk.clkr,
@@ -342,6 +313,16 @@ static struct gdsc *gpu_cc_qcm2290_gdscs[] = {
[GPU_GX_GDSC] = &gpu_gx_gdsc,
};
+static struct clk_alpha_pll *gpu_cc_qcm2290_plls[] = {
+ &gpu_cc_pll0,
+};
+
+static const u32 gpu_cc_qcm2290_critical_cbcrs[] = {
+ 0x1078, /* GPU_CC_AHB_CLK */
+ 0x1004, /* GPU_CC_CXO_AON_CLK */
+ 0x1060, /* GPU_CC_GX_CXO_CLK */
+};
+
static const struct regmap_config gpu_cc_qcm2290_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
@@ -350,6 +331,12 @@ static const struct regmap_config gpu_cc_qcm2290_regmap_config = {
.fast_io = true,
};
+static const struct qcom_cc_driver_data gpu_cc_qcm2290_driver_data = {
+ .alpha_plls = gpu_cc_qcm2290_plls,
+ .num_alpha_plls = ARRAY_SIZE(gpu_cc_qcm2290_plls),
+ .clk_cbcrs = gpu_cc_qcm2290_critical_cbcrs,
+ .num_clk_cbcrs = ARRAY_SIZE(gpu_cc_qcm2290_critical_cbcrs),
+};
static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
.config = &gpu_cc_qcm2290_regmap_config,
@@ -359,6 +346,7 @@ static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
.num_resets = ARRAY_SIZE(gpu_cc_qcm2290_resets),
.gdscs = gpu_cc_qcm2290_gdscs,
.num_gdscs = ARRAY_SIZE(gpu_cc_qcm2290_gdscs),
+ .driver_data = &gpu_cc_qcm2290_driver_data,
};
static const struct of_device_id gpu_cc_qcm2290_match_table[] = {
@@ -369,45 +357,7 @@ MODULE_DEVICE_TABLE(of, gpu_cc_qcm2290_match_table);
static int gpu_cc_qcm2290_probe(struct platform_device *pdev)
{
- struct regmap *regmap;
- int ret;
-
- regmap = qcom_cc_map(pdev, &gpu_cc_qcm2290_desc);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
- ret = devm_pm_runtime_enable(&pdev->dev);
- if (ret)
- return ret;
-
- ret = devm_pm_clk_create(&pdev->dev);
- if (ret)
- return ret;
-
- ret = pm_clk_add(&pdev->dev, NULL);
- if (ret < 0) {
- dev_err(&pdev->dev, "failed to acquire ahb clock\n");
- return ret;
- }
-
- ret = pm_runtime_resume_and_get(&pdev->dev);
- if (ret)
- return ret;
-
- clk_huayra_2290_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config);
-
- regmap_update_bits(regmap, 0x1060, BIT(0), BIT(0)); /* GPU_CC_GX_CXO_CLK */
-
- ret = qcom_cc_really_probe(&pdev->dev, &gpu_cc_qcm2290_desc, regmap);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register display clock controller\n");
- goto out_pm_runtime_put;
- }
-
-out_pm_runtime_put:
- pm_runtime_put_sync(&pdev->dev);
-
- return 0;
+ return qcom_cc_probe(pdev, &gpu_cc_qcm2290_desc);
}
static struct platform_driver gpu_cc_qcm2290_driver = {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH v3 08/12] clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model
2026-06-01 18:21 ` [PATCH v3 08/12] clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model Imran Shaik
@ 2026-06-01 18:41 ` sashiko-bot
0 siblings, 0 replies; 19+ messages in thread
From: sashiko-bot @ 2026-06-01 18:41 UTC (permalink / raw)
To: Imran Shaik; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing `.use_rpm = true` in `gpu_cc_qcm2290_desc` breaks power domain scaling and prevents the device from suspending, locking the VDDCX power domain permanently ON.
--
commit 550d1d532a5ef23bc31943f5777d495cc864e4b4
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model
This commit updates the QCM2290 GPUCC driver to use the qcom_cc_probe() model.
It moves critical clocks and PLL configurations to driver_data and removes
explicit pm_clk handling.
> diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
> index dc369dff882e6..1c8ed12f6bf81 100644
> --- a/drivers/clk/qcom/gpucc-qcm2290.c
> +++ b/drivers/clk/qcom/gpucc-qcm2290.c
[ ... ]
> @@ -350,6 +331,12 @@ static const struct regmap_config gpu_cc_qcm2290_regmap_config = {
> .fast_io = true,
> };
>
> +static const struct qcom_cc_driver_data gpu_cc_qcm2290_driver_data = {
> + .alpha_plls = gpu_cc_qcm2290_plls,
> + .num_alpha_plls = ARRAY_SIZE(gpu_cc_qcm2290_plls),
> + .clk_cbcrs = gpu_cc_qcm2290_critical_cbcrs,
> + .num_clk_cbcrs = ARRAY_SIZE(gpu_cc_qcm2290_critical_cbcrs),
> +};
>
> static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
> .config = &gpu_cc_qcm2290_regmap_config,
> @@ -359,6 +346,7 @@ static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
> .num_resets = ARRAY_SIZE(gpu_cc_qcm2290_resets),
> .gdscs = gpu_cc_qcm2290_gdscs,
> .num_gdscs = ARRAY_SIZE(gpu_cc_qcm2290_gdscs),
> + .driver_data = &gpu_cc_qcm2290_driver_data,
> };
[Severity: High]
Does this migration lock the VDDCX power domain permanently ON?
The previous probe function explicitly called devm_pm_runtime_enable() and
pm_runtime_put_sync(), allowing the device to drop its power domain vote.
Because .use_rpm = true is omitted in gpu_cc_qcm2290_desc, the common
clock framework will not manage runtime PM for this device.
Without runtime PM enabled, the device remains permanently active, which
can prevent the shared CX power domain from suspending.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-shikra-dispcc-gpucc-v3-0-61c1ba3735e8@oss.qualcomm.com?part=8
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 09/12] clk: qcom: gpucc-qcm2290: Park RCG's clk source at XO during disable
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (7 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 08/12] clk: qcom: gpucc-qcm2290: Move to the latest common qcom_cc_probe() model Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:21 ` [PATCH v3 10/12] clk: qcom: gpucc-qcm2290: Update GDSC *wait_val values and flags Imran Shaik
` (2 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
The RCG's clk src has to be parked at XO while disabling as per the
HW recommendation, hence use clk_rcg2_shared_ops to achieve the same.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/gpucc-qcm2290.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
index 1c8ed12f6bf8154596d031347540ef621314edc6..2150b94ad0ce5146c47ae21fae4deccdaba20673 100644
--- a/drivers/clk/qcom/gpucc-qcm2290.c
+++ b/drivers/clk/qcom/gpucc-qcm2290.c
@@ -144,7 +144,7 @@ static struct clk_rcg2 gpu_cc_gx_gfx3d_clk_src = {
.parent_data = gpu_cc_parent_data_1,
.num_parents = ARRAY_SIZE(gpu_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH v3 10/12] clk: qcom: gpucc-qcm2290: Update GDSC *wait_val values and flags
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (8 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 09/12] clk: qcom: gpucc-qcm2290: Park RCG's clk source at XO during disable Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:21 ` [PATCH v3 11/12] clk: qcom: Add support for Qualcomm GPU Clock Controller on Shikra Imran Shaik
2026-06-01 18:21 ` [PATCH v3 12/12] arm64: dts: qcom: agatti: Add DSI1 PHY and sleep clocks to DISPCC node Imran Shaik
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the QCM2290 GPUCC GDSC wait_val fields to match the hardware default
values. Incorrect settings can cause the GDSC FSM to stuck, leading to
power on/off failures. And update the GPUCC GDSC flags to retain the
registers, and poll for the CFG GDSCR as applicable.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/gpucc-qcm2290.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
index 2150b94ad0ce5146c47ae21fae4deccdaba20673..6e696cf672923495c789055dcd2ff905d1761e16 100644
--- a/drivers/clk/qcom/gpucc-qcm2290.c
+++ b/drivers/clk/qcom/gpucc-qcm2290.c
@@ -270,11 +270,14 @@ static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = {
static struct gdsc gpu_cx_gdsc = {
.gdscr = 0x106c,
.gds_hw_ctrl = 0x1540,
+ .en_rest_wait_val = 0x2,
+ .en_few_wait_val = 0x2,
+ .clk_dis_wait_val = 0x2,
.pd = {
.name = "gpu_cx_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
- .flags = VOTABLE,
+ .flags = RETAIN_FF_ENABLE | VOTABLE,
};
static struct gdsc gpu_gx_gdsc = {
@@ -282,12 +285,15 @@ static struct gdsc gpu_gx_gdsc = {
.clamp_io_ctrl = 0x1508,
.resets = (unsigned int []){ GPU_GX_BCR },
.reset_count = 1,
+ .en_rest_wait_val = 0x2,
+ .en_few_wait_val = 0x2,
+ .clk_dis_wait_val = 0x2,
.pd = {
.name = "gpu_gx_gdsc",
},
.parent = &gpu_cx_gdsc.pd,
.pwrsts = PWRSTS_OFF_ON,
- .flags = CLAMP_IO | AON_RESET | SW_RESET,
+ .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | SW_RESET | CLAMP_IO | AON_RESET,
};
static struct clk_regmap *gpu_cc_qcm2290_clocks[] = {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH v3 11/12] clk: qcom: Add support for Qualcomm GPU Clock Controller on Shikra
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (9 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 10/12] clk: qcom: gpucc-qcm2290: Update GDSC *wait_val values and flags Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
2026-06-01 18:21 ` [PATCH v3 12/12] arm64: dts: qcom: agatti: Add DSI1 PHY and sleep clocks to DISPCC node Imran Shaik
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
The Qualcomm Shikra GPU clock controller is similar to QCM2290 GPUCC
hardware block, with minor differences. Hence add support for Shikra
GPUCC by extending the QCM2290 GPUCC driver.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
drivers/clk/qcom/gpucc-qcm2290.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c
index 6e696cf672923495c789055dcd2ff905d1761e16..f43dd8231fb20d6f44a10ac33ed7dff923c81fa4 100644
--- a/drivers/clk/qcom/gpucc-qcm2290.c
+++ b/drivers/clk/qcom/gpucc-qcm2290.c
@@ -133,6 +133,17 @@ static const struct freq_tbl ftbl_gpu_cc_gx_gfx3d_clk_src[] = {
{ }
};
+static const struct freq_tbl ftbl_gpu_cc_gx_gfx3d_clk_src_shikra[] = {
+ F(355200000, P_GPU_CC_PLL0_OUT_AUX, 2, 0, 0),
+ F(537600000, P_GPU_CC_PLL0_OUT_AUX, 2, 0, 0),
+ F(672000000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0),
+ F(844800000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0),
+ F(921600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0),
+ F(1017600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0),
+ F(1142400000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0),
+ { }
+};
+
static struct clk_rcg2 gpu_cc_gx_gfx3d_clk_src = {
.cmd_rcgr = 0x101c,
.mnd_width = 0,
@@ -357,12 +368,16 @@ static const struct qcom_cc_desc gpu_cc_qcm2290_desc = {
static const struct of_device_id gpu_cc_qcm2290_match_table[] = {
{ .compatible = "qcom,qcm2290-gpucc" },
+ { .compatible = "qcom,shikra-gpucc" },
{ }
};
MODULE_DEVICE_TABLE(of, gpu_cc_qcm2290_match_table);
static int gpu_cc_qcm2290_probe(struct platform_device *pdev)
{
+ if (device_is_compatible(&pdev->dev, "qcom,shikra-gpucc"))
+ gpu_cc_gx_gfx3d_clk_src.freq_tbl = ftbl_gpu_cc_gx_gfx3d_clk_src_shikra;
+
return qcom_cc_probe(pdev, &gpu_cc_qcm2290_desc);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH v3 12/12] arm64: dts: qcom: agatti: Add DSI1 PHY and sleep clocks to DISPCC node
2026-06-01 18:21 [PATCH v3 00/12] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
` (10 preceding siblings ...)
2026-06-01 18:21 ` [PATCH v3 11/12] clk: qcom: Add support for Qualcomm GPU Clock Controller on Shikra Imran Shaik
@ 2026-06-01 18:21 ` Imran Shaik
11 siblings, 0 replies; 19+ messages in thread
From: Imran Shaik @ 2026-06-01 18:21 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Konrad Dybcio, Loic Poulain
Cc: Ajit Pandey, Taniya Das, Jagadeesh Kona, linux-arm-msm, linux-clk,
devicetree, linux-kernel, Imran Shaik
Update the DISPCC node on QCM2290 (Agatti) to align with the latest DT
bindings changes, which adds support for the DSI1 PHY and sleep clocks.
Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/agatti.dtsi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/agatti.dtsi b/arch/arm64/boot/dts/qcom/agatti.dtsi
index 8a7337239b1ebe2c40d64ed670752a680085b871..d8b07db81ace41f6fe2c7139ef283bea0d0c3da9 100644
--- a/arch/arm64/boot/dts/qcom/agatti.dtsi
+++ b/arch/arm64/boot/dts/qcom/agatti.dtsi
@@ -2137,13 +2137,19 @@ dispcc: clock-controller@5f00000 {
<&gcc GCC_DISP_GPLL0_CLK_SRC>,
<&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>,
<&mdss_dsi0_phy DSI_BYTE_PLL_CLK>,
- <&mdss_dsi0_phy DSI_PIXEL_PLL_CLK>;
+ <&mdss_dsi0_phy DSI_PIXEL_PLL_CLK>,
+ <0>,
+ <0>,
+ <&sleep_clk>;
clock-names = "bi_tcxo",
"bi_tcxo_ao",
"gcc_disp_gpll0_clk_src",
"gcc_disp_gpll0_div_clk_src",
"dsi0_phy_pll_out_byteclk",
- "dsi0_phy_pll_out_dsiclk";
+ "dsi0_phy_pll_out_dsiclk",
+ "dsi1_phy_pll_out_byteclk",
+ "dsi1_phy_pll_out_dsiclk",
+ "sleep_clk";
#power-domain-cells = <1>;
#clock-cells = <1>;
#reset-cells = <1>;
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread