Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Taniya Das" <taniya.das@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 6/7] clk: qcom: camcc: Add support for camera clock controller for Eliza
Date: Tue, 09 Jun 2026 15:21:39 +0000	[thread overview]
Message-ID: <20260609152139.C94F61F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609-b4-eliza_mm_cc_v6-v6-6-17df09e5940c@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Frequency calculation mismatch due to missing post-divider model for OUT_EVEN in `cam_bist_mclk_cc_mclk0_clk_src`.
- [High] Missing `.use_rpm = true` in `cam_cc_eliza_desc` prevents power domain initialization.
--

commit fd46f39c4eb76b4e41aa55ab7c656fc72d38adcc
Author: Taniya Das <taniya.das@oss.qualcomm.com>

clk: qcom: camcc: Add support for camera clock controller for Eliza

This commit adds support for the Camera Clock Controller (CAMCC) on the
Eliza platform, including both the primary camera clock controller and the
Camera BIST clock controller.

> diff --git a/drivers/clk/qcom/cambistmclkcc-eliza.c b/drivers/clk/qcom/cambistmclkcc-eliza.c
> --- /dev/null
> +++ b/drivers/clk/qcom/cambistmclkcc-eliza.c
[ ... ]
> +static const struct clk_parent_data cam_bist_mclk_cc_parent_data_0[] = {
> +	{ .index = DT_BI_TCXO },
> +	{ .hw = &cam_bist_mclk_cc_pll0.clkr.hw },
> +	{ .hw = &cam_bist_mclk_cc_pll0.clkr.hw },
> +};
[ ... ]
> +static const struct freq_tbl ftbl_cam_bist_mclk_cc_mclk0_clk_src[] = {
> +	F(19200000, P_BI_TCXO, 1, 0, 0),
> +	F(24000000, P_CAM_BIST_MCLK_CC_PLL0_OUT_EVEN, 10, 1, 4),

[Severity: High]
Will this result in a hardware clock rate of 12 MHz instead of 24 MHz?

In hardware, OUT_EVEN runs at half the main PLL rate (480 MHz instead of
960 MHz). Applying the pre-divider of 10 and m/n of 1/4 to 480 MHz yields
a physical clock of 12 MHz.

However, looking at cam_bist_mclk_cc_parent_data_0 above, OUT_EVEN is mapped
directly to the main PLL hardware without an intervening
clk_alpha_pll_postdiv instance. This causes the clock framework to calculate
the rate using the main 960 MHz PLL rate, falsely reporting 24 MHz in
software while actually running at 12 MHz.

Could this use P_CAM_BIST_MCLK_CC_PLL0_OUT_MAIN instead, or should OUT_EVEN
be properly modeled with a post-divider struct?

> diff --git a/drivers/clk/qcom/camcc-eliza.c b/drivers/clk/qcom/camcc-eliza.c
> --- /dev/null
> +++ b/drivers/clk/qcom/camcc-eliza.c
[ ... ]
> +static const struct qcom_cc_desc cam_cc_eliza_desc = {
> +	.config = &cam_cc_eliza_regmap_config,
> +	.clks = cam_cc_eliza_clocks,
> +	.num_clks = ARRAY_SIZE(cam_cc_eliza_clocks),
> +	.resets = cam_cc_eliza_resets,
> +	.num_resets = ARRAY_SIZE(cam_cc_eliza_resets),
> +	.gdscs = cam_cc_eliza_gdscs,
> +	.num_gdscs = ARRAY_SIZE(cam_cc_eliza_gdscs),
> +	.driver_data = &cam_cc_eliza_driver_data,
> +};

[Severity: High]
Can this missing .use_rpm = true initialization cause a boot panic?

In qcom_cc_really_probe(), the framework checks the .use_rpm flag to enable
runtime PM before accessing hardware registers. Without this flag, the
CAMCC power domain might not be brought online during probe.

Consequently, when the probe calls qcom_cc_clk_pll_configure() to
initialize the PLLs, writing to unpowered registers can cause a synchronous
external abort.

Should .use_rpm = true be added here to match the companion
cam_bist_mclk_cc_eliza_desc?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-b4-eliza_mm_cc_v6-v6-0-17df09e5940c@oss.qualcomm.com?part=6

  reply	other threads:[~2026-06-09 15:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 15:02 [PATCH v6 0/7] Add support for Video, Camera, Graphics clock controllers on Eliza Taniya Das
2026-06-09 15:02 ` [PATCH v6 1/7] dt-bindings: clock: qcom: Add video clock controller on Qualcomm Eliza SoC Taniya Das
2026-06-09 15:02 ` [PATCH v6 2/7] dt-bindings: clock: qcom: document the Eliza GPU Clock Controller Taniya Das
2026-06-09 15:02 ` [PATCH v6 3/7] dt-bindings: clock: qcom: Add support for CAMCC for Eliza Taniya Das
2026-06-09 15:16   ` sashiko-bot
2026-06-09 15:02 ` [PATCH v6 4/7] clk: qcom: videocc: Add video clock controller driver " Taniya Das
2026-06-09 15:24   ` sashiko-bot
2026-06-09 15:02 ` [PATCH v6 5/7] clk: qcom: gpucc: Add GPU Clock Controller " Taniya Das
2026-06-09 15:02 ` [PATCH v6 6/7] clk: qcom: camcc: Add support for camera clock controller " Taniya Das
2026-06-09 15:21   ` sashiko-bot [this message]
2026-06-09 15:02 ` [PATCH v6 7/7] arm64: dts: qcom: eliza: Add support for MM clock controllers Taniya Das
2026-06-09 15: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=20260609152139.C94F61F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=taniya.das@oss.qualcomm.com \
    /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