Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hangxiang Ma" <hangxiang.ma@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org,
	vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v23 12/15] arm64: dts: qcom: kaanapali: Add CAMSS and CSIPHY block definitions
Date: Wed, 28 Oct 2026 15:42:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-188068@kernel.org> (raw)
In-Reply-To: <20261028-kaanapali-camss-v23-12-95f250b18612@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: qcom: kaanapali: csiphy_mxc_opp_table uses invalid 300 MHz OPP
--

commit 0cfa3a0207d1730d9c7ff716309df9aad06f00ba
Author: Hangxiang Ma <hangxiang.ma@oss.qualcomm.com>

arm64: dts: qcom: kaanapali: Add CAMSS and CSIPHY block definitions

This commit adds device tree definitions for the CAMSS ISP, six CSIPHY blocks,
and the associated CSIPHY MXC operating points table on the Qualcomm Kaanapali
platform.

> diff --git a/arch/arm64/boot/dts/qcom/kaanapali.dtsi b/arch/arm64/boot/dts/qcom/kaanapali.dtsi
> index e48a179d07220..0c8fd7da55b78 100644
> --- a/arch/arm64/boot/dts/qcom/kaanapali.dtsi
> +++ b/arch/arm64/boot/dts/qcom/kaanapali.dtsi
[ ... ]
> @@ -6548,6 +6927,28 @@ pdp_tx: scp-sram-section@100 {
>  		};
>  	};
>  
> +	csiphy_mxc_opp_table: opp-table-mxc {
> +		compatible = "operating-points-v2";
> +
> +		opp-300000000 {
> +			opp-hz = /bits/ 64 <300000000>;
> +			required-opps = <&rpmhpd_opp_low_svs_d1>,
> +					<&rpmhpd_opp_low_svs_d1>;
> +		};
> +
> +		opp-400000000 {
> +			opp-hz = /bits/ 64 <400000000>;
> +			required-opps = <&rpmhpd_opp_low_svs>,
> +					<&rpmhpd_opp_low_svs>;
> +		};

[Severity: High]
Should the lowest operating point in csiphy_mxc_opp_table be 266666667 Hz
instead of 300000000 Hz?

In drivers/clk/qcom/camcc-kaanapali.c, the parent RCG for
CAM_CC_CSIPHY0_CLK through CAM_CC_CSIPHY5_CLK uses clk_rcg2_shared_ops
(which rounds up via qcom_find_freq()) and defines the following frequency
table:

static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = {
	F(266666667, P_CAM_CC_PLL0_OUT_MAIN, 4.5, 0, 0),
	F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
	F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
	{ }
};

When a sensor connected to csiphy0..csiphy5 configures a link frequency of
1.2 GHz or lower (so opp_rate = link_freq / 4 <= 300000000 Hz),
phy_qcom_mipi_csi2_configure() -> phy_qcom_mipi_csi2_set_clock_rates() in
drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c looks up the ceiling OPP and
votes the power domains before setting the clock rate:

	opp = dev_pm_opp_find_freq_ceil(dev, &opp_rate);
	...
	for (i = 0; i < csi2phy->pd_list->num_pds; i++) {
		...
		perf = dev_pm_opp_get_required_pstate(opp, pstate);
		pstate += 1;

		ret = dev_pm_genpd_set_performance_state(csi2phy->pd_list->pd_devs[i], perf);
		...
	}
	dev_pm_opp_put(opp);

	ret = dev_pm_opp_set_rate(dev, opp_rate);

Because csiphy_mxc_opp_table lists 300000000 Hz,
phy_qcom_mipi_csi2_set_clock_rates() selects opp-300000000, votes
RPMHPD_MMCX and RPMHPD_MXC to rpmhpd_opp_low_svs_d1, and then calls
dev_pm_opp_set_rate(dev, 300000000).

Won't requesting 300000000 Hz skip the 266.67 MHz frequency and round the
CSIPHY core clock up to 400000000 Hz while leaving MMCX and MXC at
rpmhpd_opp_low_svs_d1 instead of the rpmhpd_opp_low_svs corner required for
400 MHz?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261028-kaanapali-camss-v23-0-95f250b18612@oss.qualcomm.com?part=12

  parent reply	other threads:[~2026-10-28 15:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 15:20 [PATCH v23 00/15] media: qcom: camss: Add Kaanapali support Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 01/15] dt-bindings: phy: qcom,x1e80100-csi2-phy: Add Kaanapali CSI2 PHY Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 02/15] phy: qcom-mipi-csi2: Parametrise the common status register offset Hangxiang Ma
2026-10-28 15:27   ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 03/15] phy: qcom-mipi-csi2: Add Kaanapali support Hangxiang Ma
2026-10-28 15:26   ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 04/15] media: qcom: camss: Add addr_update hooks and guard CSID reg_update Hangxiang Ma
2026-10-28 15:29   ` Bryan O'Donoghue
2026-10-28 16:36   ` Loic Poulain
2026-10-28 15:20 ` [PATCH v23 05/15] media: dt-bindings: Add CAMSS device for Kaanapali Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 06/15] media: qcom: camss: Add Kaanapali compatible Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 07/15] media: qcom: camss: Add PM clock definitions for Kaanapali Hangxiang Ma
2026-10-28 15:31   ` Bryan O'Donoghue
2026-10-28 15:20 ` [PATCH v23 08/15] media: qcom: camss: csiphy: Add support for v2.4.0 two-phase CSIPHY Hangxiang Ma
2026-10-28 15:31   ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 09/15] media: qcom: camss: csid: Add support for CSID 1080 Hangxiang Ma
2026-10-28 15:36   ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 10/15] media: qcom: camss: vfe: Add support for VFE 1080 Hangxiang Ma
2026-10-28 15:33   ` Bryan O'Donoghue
2026-10-28 15:34   ` sashiko-bot
2026-10-28 15:20 ` [PATCH v23 11/15] media: qcom: camss: tpg: Add support for v2.4.0 TPG Hangxiang Ma
2026-10-28 15:29   ` sashiko-bot
2026-10-28 15:36   ` Bryan O'Donoghue
2026-10-28 15:20 ` [PATCH v23 12/15] arm64: dts: qcom: kaanapali: Add CAMSS and CSIPHY block definitions Hangxiang Ma
2026-10-28 15:28   ` Abel Vesa
2026-10-28 15:42   ` sashiko-bot [this message]
2026-10-28 15:20 ` [PATCH v23 13/15] arm64: dts: qcom: kaanapali: Add CCI controller nodes Hangxiang Ma
2026-10-28 15:28   ` Abel Vesa
2026-10-28 15:20 ` [PATCH v23 14/15] arm64: dts: qcom: kaanapali: Add camera MCLK pinctrl Hangxiang Ma
2026-10-28 15:20 ` [PATCH v23 15/15] arm64: dts: qcom: kaanapali-mtp-camera-s5kjn5: Add DT overlay Hangxiang Ma
2026-10-28 15:29   ` Abel Vesa

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=sashiko-outbox-188068@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hangxiang.ma@oss.qualcomm.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=media-ci@linuxtv.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /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