Re: [PATCH] media: qcom: camss: configure C-PHY in the new csiphy_stream_on()
From: Anusha Arun Nandi
Date: Thu Oct 22 2026 - 20:53:20 EST
Hi George,
Thank you for bringing this up. This will be rectified in the next series.
Overlooked this.
Regards,
Anusha
On 10/17/2026 3:48 AM, George Neacsu wrote:
> Hi Anusha,
>
> One units issue showed up while testing this on X1E80100.
>
> camss_get_link_freq(..., cphy=true) returns the V4L2 C-PHY link
> frequency. The media documentation defines link frequency as the bus
> frequency, explicitly not the symbol rate; its C-PHY pixel-rate formula
> also has the factor of two that makes the C-PHY symbol rate twice the
> V4L2 link frequency.
>
> For the SP11 IMX681, the exact Windows/QTI sensor mode programs PLL2
> for a 2.400 Gsym/s C-PHY rate (19.2 MHz * 375 / 3). The same 68-write
> mode programming was also observed live under KD on this machine.
> camss_get_link_freq() returns the corresponding 1.200 GHz V4L2 link
> frequency.
>
> phy_mipi_cphy_get_default_config_for_hsclk() takes the high-speed symbol
> rate, so passing link_freq directly here fills hs_clk_rate with
> 1.2 Gsym/s rather than 2.4 Gsym/s. I think this wants:
>
> phy_mipi_cphy_get_default_config_for_hsclk((u64)link_freq * 2,
> num_lanes, cphy_cfg);
>
> I instrumented that path on X1E and get link=1200000000 Hz and
> symbol=2400000000 sym/s. Capture succeeds with those values.
>
> The qcom provider then needs to keep those units distinct too; I have a
> separate comment on that patch.
>
> Thanks,
> George