Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Taniya Das" <taniya.das@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 6/7] clk: qcom: camcc: Add support for camera clock controller for Eliza
Date: Mon, 25 May 2026 13:04:40 +0000	[thread overview]
Message-ID: <20260525130441.672011F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260525-eliza_mm_cc_v2-v5-6-a1d125619a5a@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `cam_cc_eliza_desc` structure in `camcc-eliza.c` is missing the `.use_rpm = true` flag, preventing runtime PM enablement.
- [High] Missing `clk_alpha_pll_postdiv` definition for `cam_bist_mclk_cc_pll0_out_even` causes incorrect rate calculation and hardware configuration.
- [Low] Inconsistent 'default m if ARCH_QCOM' across related Eliza clock configs.
--


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

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

Add support for the Camera Clock Controller (CAMCC) on the Eliza
platform. The CAMCC block on Eliza includes both the primary camera
clock controller and the Camera BIST clock controller.

> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
> index 5641929a3da49..cb44a9972a6a6 100644
> --- a/drivers/clk/qcom/Kconfig
> +++ b/drivers/clk/qcom/Kconfig
> @@ -19,6 +19,17 @@ menuconfig COMMON_CLK_QCOM
>  
>  if COMMON_CLK_QCOM
>  
> +config CLK_ELIZA_CAMCC
> +	tristate "Eliza Camera Clock Controller"
> +	depends on ARM64 || COMPILE_TEST
> +	select CLK_ELIZA_GCC
> +	default m if ARCH_QCOM

[Severity: Low]
This isn't a bug, but should this default match the adjacent
CLK_ELIZA_DISPCC config, which does not specify a default?

> +	help
> +	  Support for the camera clock controller on Qualcomm Technologies, Inc
> +	  Eliza devices.
> +	  Say Y if you want to support camera devices and functionality such as
> +	  capturing pictures.
> +
>  config CLK_ELIZA_DISPCC
>  	tristate "Eliza Display Clock Controller"
>  	depends on ARM64 || COMPILE_TEST

[ ... ]

> diff --git a/drivers/clk/qcom/cambistmclkcc-eliza.c b/drivers/clk/qcom/cambistmclkcc-eliza.c
> new file mode 100644
> index 0000000000000..b65e224a1be90
> --- /dev/null
> +++ b/drivers/clk/qcom/cambistmclkcc-eliza.c

[ ... ]

> +static const struct parent_map cam_bist_mclk_cc_parent_map_0[] = {
> +	{ P_BI_TCXO, 0 },
> +	{ P_CAM_BIST_MCLK_CC_PLL0_OUT_EVEN, 3 },
> +	{ P_CAM_BIST_MCLK_CC_PLL0_OUT_MAIN, 5 },
> +};
> +
> +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 },

[Severity: High]
Does this code map P_CAM_BIST_MCLK_CC_PLL0_OUT_EVEN directly to the main
PLL hardware instead of a dedicated clk_alpha_pll_postdiv structure? Without
a postdiv structure, the Common Clock Framework will evaluate the EVEN output
rate identically to the MAIN output (960 MHz) instead of its physically
divided rate (480 MHz).

> +};

[ ... ]

> +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]
With the missing postdiv structure above, this frequency table uses a divisor
of 10 to target 24 MHz based on a 960 MHz parent. Since the hardware
actually supplies 480 MHz on the physical EVEN output, applying the same
divisor will result in a physical output of 12 MHz, halving the MCLK
frequency. Should a clk_alpha_pll_postdiv be added and this frequency table
updated to use the correct divisor?

> +	F(68571429, P_CAM_BIST_MCLK_CC_PLL0_OUT_MAIN, 14, 0, 0),
> +	{ }
> +};

[ ... ]

> diff --git a/drivers/clk/qcom/camcc-eliza.c b/drivers/clk/qcom/camcc-eliza.c
> new file mode 100644
> index 0000000000000..b96a2a58b32a7
> --- /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]
Is the .use_rpm = true flag missing from this structure? In the qcom_cc
framework, this flag instructs qcom_cc_probe() to enable runtime PM.
Omitting it means the power domain remains off, which leads to unclocked
register accesses and causes a Data Abort or bus stall when the driver
attempts to access the registers or GDSCs during probe.

> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260525-eliza_mm_cc_v2-v5-0-a1d125619a5a@oss.qualcomm.com?part=6

  parent reply	other threads:[~2026-05-25 13:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 10:46 [PATCH v5 0/7] Add support for Video, Camera, Graphics clock controllers on Eliza Taniya Das
2026-05-25 10:46 ` [PATCH v5 1/7] dt-bindings: clock: qcom: Add video clock controller on Qualcomm Eliza SoC Taniya Das
2026-05-26  9:37   ` Krzysztof Kozlowski
2026-05-26 11:38     ` Taniya Das
2026-05-25 10:46 ` [PATCH v5 2/7] dt-bindings: clock: qcom: document the Eliza GPU Clock Controller Taniya Das
2026-05-25 10:46 ` [PATCH v5 3/7] dt-bindings: clock: qcom: Add support for CAMCC for Eliza Taniya Das
2026-05-25 11:26   ` sashiko-bot
2026-05-25 10:46 ` [PATCH v5 4/7] clk: qcom: videocc: Add video clock controller driver " Taniya Das
2026-05-25 11:07   ` Dmitry Baryshkov
2026-05-25 11:59   ` sashiko-bot
2026-05-25 10:46 ` [PATCH v5 5/7] clk: qcom: gpucc: Add GPU Clock Controller " Taniya Das
2026-05-25 11:07   ` Dmitry Baryshkov
2026-05-25 10:46 ` [PATCH v5 6/7] clk: qcom: camcc: Add support for camera clock controller " Taniya Das
2026-05-25 11:12   ` Dmitry Baryshkov
2026-05-26 11:38     ` Taniya Das
2026-05-25 13:04   ` sashiko-bot [this message]
2026-05-25 10:46 ` [PATCH v5 7/7] arm64: dts: qcom: eliza: Add support for MM clock controllers Taniya Das
2026-05-25 11:13   ` Dmitry Baryshkov
2026-05-25 11:13 ` [PATCH v5 0/7] Add support for Video, Camera, Graphics clock controllers on Eliza Dmitry Baryshkov
2026-05-26 11:40   ` Taniya Das

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=20260525130441.672011F000E9@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