Re: [PATCH] arm64: dts: qcom: sm8650: Assign CCI clock rates to 37.5MHz
Vladimir Zapolskiy <[email protected]>
| Newsgroups | org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Hi Loic. On 7/31/26 10:46, Loic Poulain wrote: > 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 As a generic note the specifications of modern camera sensors do not mention 100 KHz bus speed mode, today 400 KHz and 1000 KHz are the only found speed modes in "SCCB interface timing" or similar section of modern camera sensors, and 1000 KHz is the standard I2C bus speed mode for the last 20 years. What is more important, this change "fixes" out-of-spec and very likely unsupported by I2C slaves SCL rates, which are 192/375 multiplies of the wanted rates. > 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]> Thank you for discussion and review! >> --- >> 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 >> -- Best wishes, Vladimir