From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: armandas.kvietkus@proton.me
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
Subject: Re: [PATCH v5 2/2] media: i2c: Add Samsung S5K3T2 image sensor driver
Date: Thu, 19 Nov 2026 23:53:16 +0200 [thread overview]
Message-ID: <av9vzLSureeB4j41@kekkonen.localdomain> (raw)
In-Reply-To: <20261117-upstream-s5k3t2-v5-2-1f7f5fde9e2a@proton.me>
Hi Armandas,
Thanks for the update. A few comments below...
On Tue, Nov 17, 2026 at 09:20:05PM +0100, Armandas Kvietkus via B4 Relay wrote:
> From: Armandas Kvietkus <armandas.kvietkus@proton.me>
>
> Add a driver for the Samsung S5K3T2 20 Mpixel CMOS image sensor.
>
> The driver supports three modes. All of them are RAW10 on four D-PHY
> lanes.
>
> 5184x3880 at 15 fps, link frequency 448 MHz
> 2592x1940 at 60 fps, link frequency 448 MHz
> 1280x720 at 120 fps, link frequency 300 MHz
>
> The pixel clock does not change between modes, so the pixel rate control
> is constant. The frame rate follows from the line length and the frame
> length.
>
> The controls are exposure, analogue gain, horizontal blanking, vertical
> blanking, horizontal flip, vertical flip and test pattern. Rotation and
> orientation come from the device tree. Power is handled by runtime PM
> with autosuspend.
>
> The register tables come from the vendor camera firmware. They were
> checked on hardware.
>
> Tested on a Xiaomi POCO F3 with the Qualcomm CAMSS driver.
A lot of this should go to the cover letter.
>
> Reviewed-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
> Signed-off-by: Armandas Kvietkus <armandas.kvietkus@proton.me>
> ---
> MAINTAINERS | 1 +
> drivers/media/i2c/Kconfig | 10 +
> drivers/media/i2c/Makefile | 1 +
> drivers/media/i2c/s5k3t2.c | 1327 ++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 1339 insertions(+)
>
> diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
> index d04bd5724552..9a25d8200b65 100644
> --- a/drivers/media/i2c/Makefile
> +++ b/drivers/media/i2c/Makefile
...
> +static int s5k3t2_check_hwcfg(struct s5k3t2 *s5k3t2)
> +{
> + struct fwnode_handle *fwnode = dev_fwnode(s5k3t2->dev), *ep;
> + struct v4l2_fwnode_endpoint bus_cfg = {
> + .bus = {
> + .mipi_csi2 = {
> + .num_data_lanes = S5K3T2_DATA_LANES,
> + },
> + },
Does the sensor support other number of active lanes than 4? Very probably.
But this isn't reflected in DT bindings (and it should be).
> + .bus_type = V4L2_MBUS_CSI2_DPHY,
> + };
> + int ret;
> +
> + ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
> + ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
> + fwnode_handle_put(ep);
> + if (ret)
> + return ret;
> +
> + if (bus_cfg.bus.mipi_csi2.num_data_lanes != S5K3T2_DATA_LANES) {
> + dev_err(s5k3t2->dev, "invalid number of data lanes: %u\n",
> + bus_cfg.bus.mipi_csi2.num_data_lanes);
> + ret = -EINVAL;
> + goto endpoint_free;
> + }
> +
> + ret = v4l2_link_freq_to_bitmap(s5k3t2->dev, bus_cfg.link_frequencies,
> + bus_cfg.nr_of_link_frequencies,
> + s5k3t2_link_freq_menu,
> + ARRAY_SIZE(s5k3t2_link_freq_menu),
> + &s5k3t2->link_freq_bitmap);
> +
> +endpoint_free:
> + v4l2_fwnode_endpoint_free(&bus_cfg);
> +
> + return ret;
> +}
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-11-19 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 20:20 [PATCH v5 0/2] media: i2c: Samsung S5K3T2 image sensor Armandas Kvietkus via B4 Relay
2026-11-17 20:20 ` [PATCH v5 1/2] dt-bindings: media: i2c: Add " Armandas Kvietkus via B4 Relay
2026-11-17 20:20 ` [PATCH v5 2/2] media: i2c: Add Samsung S5K3T2 image sensor driver Armandas Kvietkus via B4 Relay
2026-11-19 21:53 ` Sakari Ailus [this message]
2026-11-19 21:54 ` [PATCH v5 0/2] media: i2c: Samsung S5K3T2 image sensor Sakari Ailus
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=av9vzLSureeB4j41@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=armandas.kvietkus@proton.me \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elgin.perumbilly@siliconsignals.io \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®