Re: [PATCH] arm64: dts: qcom: sm8650: Assign CCI clock rates to 37.5MHz

Loic Poulain <[email protected]>
Newsgroups org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree
Message-ID <CAFEp6-34g7MBY0-HUUZ+hStiASTCJJT-Cj+kSdWwoKuqwu_f6g@mail.gmail.com>
On Wed, Jul 29, 2026 at 10:13 PM Vladimir Zapolskiy
<[email protected]> wrote:
>
> Setting CCI supply clock rate to higher value of 37.5MHz allows to
> program the controller to configure its I2C bus speed to Fast-mode plus.
>
> Signed-off-by: Vladimir Zapolskiy <[email protected]>

This works for upstream dts/dtso as the SoC sets a default I2C rate to
1Mhz (fast+) for the CCI bus masters, so the 37.5 rate is the right
rate for it. I'm however unsure we want 1Mhz as default and still
think we should avoid relying on assigned-clock, but until a proper
solution lands, this simple fix/patch is consistent:

Reviewed-by: Loic Poulain <[email protected]>


> ---
>  arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> index a64922c21267..a14e11d81488 100644
> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> @@ -5615,6 +5615,8 @@ cci0: cci@ac15000 {
>                         clock-names = "camnoc_axi",
>                                       "cpas_ahb",
>                                       "cci";
> +                       assigned-clocks = <&camcc CAM_CC_CCI_0_CLK>;
> +                       assigned-clock-rates = <37500000>;
>                         pinctrl-0 = <&cci0_0_default &cci0_1_default>;
>                         pinctrl-1 = <&cci0_0_sleep &cci0_1_sleep>;
>                         pinctrl-names = "default", "sleep";
> @@ -5648,6 +5650,8 @@ cci1: cci@ac16000 {
>                         clock-names = "camnoc_axi",
>                                       "cpas_ahb",
>                                       "cci";
> +                       assigned-clocks = <&camcc CAM_CC_CCI_1_CLK>;
> +                       assigned-clock-rates = <37500000>;
>                         pinctrl-0 = <&cci1_0_default &cci1_1_default>;
>                         pinctrl-1 = <&cci1_0_sleep &cci1_1_sleep>;
>                         pinctrl-names = "default", "sleep";
> @@ -5681,6 +5685,8 @@ cci2: cci@ac17000 {
>                         clock-names = "camnoc_axi",
>                                       "cpas_ahb",
>                                       "cci";
> +                       assigned-clocks = <&camcc CAM_CC_CCI_2_CLK>;
> +                       assigned-clock-rates = <37500000>;
>                         pinctrl-0 = <&cci2_0_default &cci2_1_default>;
>                         pinctrl-1 = <&cci2_0_sleep &cci2_1_sleep>;
>                         pinctrl-names = "default", "sleep";
> --
> 2.53.0
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.