Linux Media Controller development
 help / color / mirror / Atom feed
From: Richard Acayan <mailingradian@gmail.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Tianshu Qiu <tian.shu.qiu@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Heidelberg <david@ixit.cz>,
	20260414-imx355-24mhz-v1-1-9ae77bc6e7ec@ixit.cz
Subject: Re: [PATCH 13/13] media: imx355: Support 2 lane readout.
Date: Wed, 13 May 2026 14:33:20 -0400	[thread overview]
Message-ID: <agTD8L3gZczj8Eu2@rdacayan> (raw)
In-Reply-To: <20260506-media-imx355-v1-13-660685030455@raspberrypi.com>

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@raspberrypi.com>
> ---
>  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@linaro.org/ ):

	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.

      reply	other threads:[~2026-05-13 18:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 18:23 [PATCH 00/13] media/imx355: General code cleanups, and adding support for 2 lane operation Dave Stevenson
2026-05-06 18:23 ` [PATCH 01/13] media: imx355: Remove duplicated registers from the mode tables Dave Stevenson
2026-05-07 13:41   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 02/13] media: imx355: Remove setting FRM_LENGTH_LINES in the mode regs Dave Stevenson
2026-05-07 13:50   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 03/13] media: imx355: Programmatically set the crop parameters for each mode Dave Stevenson
2026-05-07 14:00   ` Jacopo Mondi
2026-05-07 16:01     ` Dave Stevenson
2026-05-06 18:23 ` [PATCH 04/13] media: imx355: Remove the duplication between width/height and x/y_out_size Dave Stevenson
2026-05-06 18:23 ` [PATCH 05/13] media: imx355: Set register LINE_LENGTH_PCK programmatically Dave Stevenson
2026-05-07 14:09   ` Jacopo Mondi
2026-05-07 15:18     ` Dave Stevenson
2026-05-06 18:23 ` [PATCH 06/13] media: imx355: Set binning mode registers programmatically Dave Stevenson
2026-05-07 14:12   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 07/13] media: imx355: Remove link_freq_index from each mode as ununsed Dave Stevenson
2026-05-07 14:12   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 08/13] media: imx355: pixel_rate never changes, so don't recompute Dave Stevenson
2026-05-07 14:13   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 09/13] media: imx355: Remove redundant fll_min, and implement fixed offset Dave Stevenson
2026-05-07 14:29   ` Jacopo Mondi
2026-05-07 15:21     ` Dave Stevenson
2026-05-06 18:23 ` [PATCH 10/13] media: imx355: Add support for get_selection Dave Stevenson
2026-05-07 14:42   ` Jacopo Mondi
2026-05-07 15:02     ` Dave Stevenson
2026-05-06 18:23 ` [PATCH 11/13] media: imx355: Use pm_runtime autosuspend_delay Dave Stevenson
2026-05-07 14:43   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 12/13] media: imx355: Convert to new CCI register access helpers Dave Stevenson
2026-05-07 14:49   ` Jacopo Mondi
2026-05-06 18:23 ` [PATCH 13/13] media: imx355: Support 2 lane readout Dave Stevenson
2026-05-13 18:33   ` Richard Acayan [this message]

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=agTD8L3gZczj8Eu2@rdacayan \
    --to=mailingradian@gmail.com \
    --cc=20260414-imx355-24mhz-v1-1-9ae77bc6e7ec@ixit.cz \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=david@ixit.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    /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