Re: [PATCH 13/13] media: imx355: Support 2 lane readout.
From: Richard Acayan
Date: Wed May 13 2026 - 14:41:25 EST
On Wed, May 06, 2026 at 07:23:51PM +0100, Dave Stevenson wrote:
> The sensor supports 2 or 4 lane readout, but the driver only allowed
> for 4 lanes. Add 2 lane support.
>
> The clock tree was set to use single PLL mode to feed both IOP (MIPI)
> and IVT (Pixel array).
> 2 lane mode supports a MIPI link frequency of up to 445MHz (890Mbit/s)
> cf 360MHz (720Mbit/s) for 4lane, but that requires switching to dual
> PLL mode as the rates can't be achieved with simple divisors.
> The LLP values are extended for each mode to account for the increased
> time per line over the MIPI link.
>
> Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
> ---
> drivers/media/i2c/imx355.c | 135 ++++++++++++++++++++++++++++-----------------
> 1 file changed, 84 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
> index d0e0e81d1e7c..fa1d1c86d5b0 100644
> --- a/drivers/media/i2c/imx355.c
> +++ b/drivers/media/i2c/imx355.c
(snip)
> @@ -1192,13 +1220,18 @@ static struct imx355_hwcfg *imx355_get_hwcfg(struct device *dev)
> if (!cfg)
> goto out_err;
>
> - if (bus_cfg.bus.mipi_csi2.num_data_lanes != IMX355_DATA_LANES)
> + if (bus_cfg.bus.mipi_csi2.num_data_lanes != 2 &&
> + bus_cfg.bus.mipi_csi2.num_data_lanes != 4)
> goto out_err;
Now we know that the sensor supports a configuration with 2 lanes.
Previously, there was a question whether there was a configuration with
a different number of data lanes (from
https://lore.kernel.org/linux-arm-msm/3c51f9fe-9c5f-47dd-a971-5b2a9e416230@xxxxxxxxxx/ ):
Does IMX355 sensor hardware support any other number of lanes?
1) If no, then it makes no practical sense to check for data lanes number
given by firmware, there can be any stored value, but it's known that the
number of sensor data lanes is 4.
2) If yes, then please return to the sensor dt bindings, and reflect any
other options, right now it is set strictly to 4 lanes only. In case if
'data-lanes' property is omitted, you can use 4 lanes as a default number
of data lanes, and this information shall be documented in the dt bindings.
We should adjust the dt-bindings to accept a devicetree with 2 lanes.