Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vivek Aknurwar" <vivek.aknurwar@oss.qualcomm.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 2/2] clk: qcom: Add support for the camera clock controller (CAMCC) on Hawi
Date: Wed, 09 Sep 2026 06:32:46 +0000	[thread overview]
Message-ID: <20260909063247.2C0341F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908-camcc-hawi-v2-2-f892ba1d118e@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Missing post-divider definition and mismatched clock parent mapping for `cam_cc_pll7_out_even`.
- [Low] Redundant and identical parent map and parent data definitions.
--

commit 94962e26b9035957a94cf2180f7c86517eb17167
Author: Vivek Aknurwar <vivek.aknurwar@oss.qualcomm.com>

clk: qcom: Add support for the camera clock controller (CAMCC) on Hawi

This commit adds support for the camera clock controller (CAMCC) on the
Qualcomm Hawi SoC. It introduces the clock definitions and routing
for camera operations, reusing the MCLK driver from Kaanapali.

> diff --git a/drivers/clk/qcom/camcc-hawi.c b/drivers/clk/qcom/camcc-hawi.c
> new file mode 100644
> index 0000000000000..5b004a627fdde
> --- /dev/null
> +++ b/drivers/clk/qcom/camcc-hawi.c

[ ... ]

> +static const struct parent_map cam_cc_parent_map_1[] = {
> +	{ P_BI_TCXO, 0 },
> +	{ P_CAM_CC_PLL0_OUT_MAIN, 1 },
> +	{ P_CAM_CC_PLL0_OUT_EVEN, 2 },
> +	{ P_CAM_CC_PLL0_OUT_ODD, 3 },
> +	{ P_CAM_CC_PLL6_OUT_ODD, 4 },
> +	{ P_CAM_CC_PLL6_OUT_EVEN, 5 },
> +	{ P_CAM_CC_PLL6_OUT_MAIN, 6 },
> +};
> +
> +static const struct clk_parent_data cam_cc_parent_data_1[] = {
> +	{ .index = DT_BI_TCXO },
> +	{ .hw = &cam_cc_pll0.clkr.hw },
> +	{ .hw = &cam_cc_pll0_out_even.clkr.hw },
> +	{ .hw = &cam_cc_pll0_out_odd.clkr.hw },
> +	{ .hw = &cam_cc_pll6_out_odd.clkr.hw },
> +	{ .hw = &cam_cc_pll6_out_even.clkr.hw },
> +	{ .hw = &cam_cc_pll6.clkr.hw },
> +};

[Severity: Low]
Are cam_cc_parent_map_1 and cam_cc_parent_data_1 intended to be completely
identical to the _0 variants defined just above this block?

This isn't a functional issue, but could we reuse the _0 map and data
structures to reduce code duplication and simplify the driver?

[ ... ]

> +static const struct parent_map cam_cc_parent_map_2[] = {
> +	{ P_BI_TCXO, 0 },
> +	{ P_CAM_CC_PLL0_OUT_MAIN, 1 },
> +	{ P_CAM_CC_PLL0_OUT_EVEN, 2 },
> +	{ P_CAM_CC_PLL0_OUT_ODD, 3 },
> +	{ P_CAM_CC_PLL7_OUT_EVEN, 5 },
> +	{ P_CAM_CC_PLL7_OUT_MAIN, 6 },
> +};
> +
> +static const struct clk_parent_data cam_cc_parent_data_2[] = {
> +	{ .index = DT_BI_TCXO },
> +	{ .hw = &cam_cc_pll0.clkr.hw },
> +	{ .hw = &cam_cc_pll0_out_even.clkr.hw },
> +	{ .hw = &cam_cc_pll0_out_odd.clkr.hw },
> +	{ .hw = &cam_cc_pll7.clkr.hw },
> +	{ .hw = &cam_cc_pll7.clkr.hw },
> +};

[Severity: Medium]
Does this misconfigure the clock parent mapping for cam_cc_pll7_out_even?

The parent map array specifies P_CAM_CC_PLL7_OUT_EVEN at index 5, but the
corresponding parent data array maps it to the undivided main PLL
(&cam_cc_pll7.clkr.hw) instead of a post-divider hw struct.

If the bootloader leaves the hardware mux at index 5, could this cause the
framework to miscalculate the frequency as the undivided main PLL rate
instead of the divided rate, leading to incorrect downstream clock rates?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-camcc-hawi-v2-0-f892ba1d118e@oss.qualcomm.com?part=2

  reply	other threads:[~2026-09-09  6:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  6:01 [PATCH v2 0/2] clk: qcom: add camera clock controller support for Hawi SoC Vivek Aknurwar
2026-09-09  6:01 ` [PATCH v2 1/2] dt-bindings: clock: qcom: Add Hawi CAMCC compatible strings Vivek Aknurwar
2026-09-10  8:47   ` Krzysztof Kozlowski
2026-09-11  4:27   ` Taniya Das
2026-09-09  6:01 ` [PATCH v2 2/2] clk: qcom: Add support for the camera clock controller (CAMCC) on Hawi Vivek Aknurwar
2026-09-09  6:32   ` sashiko-bot [this message]
2026-09-10  7:27   ` Abel Vesa
2026-09-11  4:25   ` 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=20260909063247.2C0341F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vivek.aknurwar@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