devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v1 0/9] media: i2c: AR0144 camera sensor driver with companding support
@ 2024-06-30 14:17 Laurent Pinchart
  2024-06-30 14:17 ` [PATCH/RFC v1 1/9] media: dt-bindings: media: i2c: Add AR0144 camera sensor Laurent Pinchart
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Laurent Pinchart @ 2024-06-30 14:17 UTC (permalink / raw)
  To: linux-media, devicetree
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sakari Ailus,
	Hans Verkuil

Hello,

This patch series adds a driver for the onsemi AR0144 camera sensor.

The AR0144 is a 1/4" 1MP 12-bit raw camera sensor, with monochrome and
Bayer variants. It has both parallel and MIPI CSI-2 output capability.
Its feature includes analog crop, binning/skipping and the usual set of
controls applicable to raw sensors. It has a CCS-compatible clock tree,
but doesn't use the CCS register layout.

In addition to the standard features, the sensor supports automatic
exposure and black level correction. Furthermore, it supports A-law
compression to reduce the bit rate. This last feature is new to V4L2,
and is why this series is marked as RFC.

Patch 1/9 adds the DT binding, and patch 2/9 the driver. Support for the
parallel interface comes in patch 3/9. I haven't bundled it with 2/9 as
my test platform supports CSI-2 only, so I couldn't test the parallel
interface, and I suspect it will not work out of the box. I'm fine
leaving 3/9 out for now, it will be available in the list archives
should anyone decide to test and complete support for the parallel
output.

Patches 4/9 to 7/9 then add support for internal pads, routing and
embedded data. This is split from patch 3/9 as the necessary APIs are
not merged in the kernel yet. The DT binding and the base driver could
be upstreamed first and independently from embedded data support,
depending on the timing of the dependencies.

Patch 8/9 then starts the RFC part. It adds a new V4L2 control for
companding. Companding is a combination of compressing (on the camera
sensor side) and expanding the data to reduce the bandwidth transmitted
on the bus. The AR0144 support compressing data using A-law when
outputting 8- or 10-bit data. This improves the sensitivity in the
middle of the dynamic range. The new control allows selecting the
compression method, with two methods added in the patch (linear, which
essentially drops the LSBs without compresssion, and A-law). The control
doesn't affect the bit depth of the output format, only the way the
larger bit depth of the sensor is reduced.

Finally, patch 9/9 implement the companding control in the ar0144
driver.

The series is based on "[PATCH v9 00/46] Generic line based metadata
support, internal pads" ([1]). I have pushed it to a branch ([2]) that
includes the dependencies (along with other relevant - and less relevant
- bits and pieces such as DT overlays for testing).

[1] https://lore.kernel.org/all/20240416193319.778192-1-sakari.ailus@linux.intel.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git/log/?h=nxp/v6.10/dev/rpi-cam/next

Laurent Pinchart (9):
  media: dt-bindings: media: i2c: Add AR0144 camera sensor
  media: i2c: Add a driver for the onsemi AR0144 camera sensor
  media: i2c: ar0144: Add support for the parallel interface
  media: i2c: ar0144: Add internal image sink pad
  media: i2c: ar0144: Add image stream
  media: i2c: ar0144: Report internal routes to userspace
  media: i2c: ar0144: Add embedded data support
  media: v4l: ctrls: Add a control for companding
  media: i2c: ar0144: Add support for companding

 .../bindings/media/i2c/onnn,ar0144.yaml       |  166 ++
 .../media/v4l/ext-ctrls-image-process.rst     |    4 +
 MAINTAINERS                                   |    7 +
 drivers/media/i2c/Kconfig                     |   11 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/ar0144.c                    | 2096 +++++++++++++++++
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |    9 +
 include/uapi/linux/v4l2-controls.h            |    5 +
 8 files changed, 2299 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/onnn,ar0144.yaml
 create mode 100644 drivers/media/i2c/ar0144.c


base-commit: c93dedc22bd492e8a0fff6e0baf80f71d1227135
-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-04-16 10:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-30 14:17 [PATCH/RFC v1 0/9] media: i2c: AR0144 camera sensor driver with companding support Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 1/9] media: dt-bindings: media: i2c: Add AR0144 camera sensor Laurent Pinchart
2024-07-01  8:37   ` Krzysztof Kozlowski
2024-06-30 14:17 ` [PATCH/RFC v1 2/9] media: i2c: Add a driver for the onsemi " Laurent Pinchart
2024-07-01 16:49   ` Dave Stevenson
2024-07-03 21:39     ` Laurent Pinchart
2024-07-03 21:49     ` Laurent Pinchart
2024-09-26  8:03   ` Bingbu Cao
2024-09-26  9:18     ` Yan, Dongcheng
2025-04-15 11:33   ` Sakari Ailus
2025-04-15 13:17     ` Laurent Pinchart
2025-04-16  6:27       ` Sakari Ailus
2025-04-16 10:19         ` Dave Stevenson
2024-06-30 14:17 ` [PATCH/RFC v1 3/9] media: i2c: ar0144: Add support for the parallel interface Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 4/9] media: i2c: ar0144: Add internal image sink pad Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 5/9] media: i2c: ar0144: Add image stream Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 6/9] media: i2c: ar0144: Report internal routes to userspace Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 7/9] media: i2c: ar0144: Add embedded data support Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 8/9] media: v4l: ctrls: Add a control for companding Laurent Pinchart
2024-06-30 14:17 ` [PATCH/RFC v1 9/9] media: i2c: ar0144: Add support " Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).