Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Imran Shaik" <imran.shaik@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/5] clk: qcom: gcc-qcm2290: Drop modelling of critical clocks
Date: Thu, 28 May 2026 12:14:24 +0000	[thread overview]
Message-ID: <20260528121424.968C21F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260528-shikra-dispcc-gpucc-v2-1-953f246a0fbb@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Device Tree ABI breakage causing consumer drivers to fail probing
- [Medium] Inaccurate commit message regarding the previous state of the removed clocks
- [Low] Misuse of `qcom_branch_set_clk_en` macro for an APCS vote register
--

commit fe7153ece7b1b29e7cf0efe410ca1855c6dc922e
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>

clk: qcom: gcc-qcm2290: Drop modelling of critical clocks

This patch drops the modeling of certain clocks on the QCM2290 SoC, instead
enabling them unconditionally from probe to simplify PM clock handling in
consumer drivers.

> Drop the modelling of critical GCC clocks on QCM2290 SoC, and keep them
> enabled from probe as per the latest convention. This helps to drop the

[Severity: Medium]
Is this description completely accurate? Several of the removed clocks, such
as gcc_gpu_iref_clk, gcc_video_ahb_clk, and gcc_video_xo_clk, did not have
the CLK_IS_CRITICAL flag set in their init data. 

Could the commit message be clarified to reflect that both critical and
non-critical clocks are being dropped?

> diff --git a/drivers/clk/qcom/gcc-qcm2290.c b/drivers/clk/qcom/gcc-qcm2290.c
> index 6684cab63ae11..937db68a45b17 100644
> --- a/drivers/clk/qcom/gcc-qcm2290.c
> +++ b/drivers/clk/qcom/gcc-qcm2290.c

[ ... ]

> @@ -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,

[Severity: High]
Does removing these clocks completely from the provider array break Device
Tree ABI compatibility? Older device trees specify these clocks in the
'clocks' property of their consumer nodes (e.g., qcom,qcm2290-mdss requests
GCC_DISP_AHB_CLK).

When these consumer drivers boot with a newer kernel using the old DT,
functions like devm_clk_bulk_get_all() might fail with -ENOENT when they
encounter a missing clock index. 

Should these indices remain populated with a dummy clock or a basic AON clock
to prevent consumer driver probe failures?

[ ... ]

> @@ -2990,6 +2848,17 @@ static int gcc_qcm2290_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> +	/* Keep some clocks always-on */
> +	qcom_branch_set_clk_en(regmap, 0x17008); /* GCC_CAMERA_AHB_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x17028); /* GCC_CAMERA_XO_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x1700c); /* GCC_DISP_AHB_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x1702c); /* GCC_DISP_XO_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x36004); /* GCC_GPU_CFG_AHB_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x36100); /* GCC_GPU_IREF_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x79004); /* GCC_SYS_NOC_CPUSS_AHB_CLK */

[Severity: Low]
Is qcom_branch_set_clk_en() the correct macro for GCC_SYS_NOC_CPUSS_AHB_CLK?
This macro sets the CBCR_CLOCK_ENABLE bit (BIT(0)) in a standard Clock Branch
Control Register. Register 0x79004 is an APCS vote register, not a CBCR.

While it functionally works because this specific clock's vote mask is also
BIT(0), using a CBCR-specific macro for an APCS vote register might be
brittle. 

Should direct regmap_update_bits() be used instead?

> +	qcom_branch_set_clk_en(regmap, 0x17004); /* GCC_VIDEO_AHB_CLK */
> +	qcom_branch_set_clk_en(regmap, 0x17024); /* GCC_VIDEO_XO_CLK */
> +
>  	clk_alpha_pll_configure(&gpll10, regmap, &gpll10_config);
>  	clk_alpha_pll_configure(&gpll11, regmap, &gpll11_config);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260528-shikra-dispcc-gpucc-v2-0-953f246a0fbb@oss.qualcomm.com?part=1

  reply	other threads:[~2026-05-28 12:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 10:07 [PATCH v2 0/5] clk: qcom: Add DISPCC and GPUCC support for the Qualcomm Shikra SoC Imran Shaik
2026-05-28 10:07 ` [PATCH v2 1/5] clk: qcom: gcc-qcm2290: Drop modelling of critical clocks Imran Shaik
2026-05-28 12:14   ` sashiko-bot [this message]
2026-05-28 13:22   ` Dmitry Baryshkov
2026-05-29  9:22     ` Imran Shaik
2026-05-29 11:31       ` Dmitry Baryshkov
2026-05-28 10:07 ` [PATCH v2 2/5] dt-bindings: clock: qcom: Add Qualcomm Shikra Display clock controller Imran Shaik
2026-05-28 12:36   ` sashiko-bot
2026-05-28 13:44   ` Dmitry Baryshkov
2026-05-29  9:23     ` Imran Shaik
2026-05-29 11:33       ` Dmitry Baryshkov
2026-05-28 10:07 ` [PATCH v2 3/5] dt-bindings: clock: qcom: Add Qualcomm Shikra GPU " Imran Shaik
2026-05-28 10:07 ` [PATCH v2 4/5] clk: qcom: dispcc-qcm2290: Add support for Qualcomm Shikra DISPCC Imran Shaik
2026-05-28 13:15   ` sashiko-bot
2026-05-28 13:42   ` Dmitry Baryshkov
2026-05-29  9:23     ` Imran Shaik
2026-05-29 11:34       ` Dmitry Baryshkov
2026-05-28 10:07 ` [PATCH v2 5/5] clk: qcom: Add support for Qualcomm GPU Clock Controller on Shikra Imran Shaik
2026-05-28 13:46   ` Dmitry Baryshkov
2026-05-29  9:24     ` Imran Shaik
2026-05-28 14:30   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260528121424.968C21F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imran.shaik@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox