[PATCH/RFC v2 0/9] media: i2c: AR0144 camera sensor driver with companding support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 features include 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 dynamic
range 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 custom curve
similar to A-law when outputting 8- or 10-bit data. This improves the
sensitivity in the middle of the dynamic range. The new control allows
enabling compression. 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@xxxxxxxxxxxxxxx/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git/log/?h=nxp/v6.11/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       |  162 ++
 .../media/v4l/ext-ctrls-image-process.rst     |   16 +
 MAINTAINERS                                   |    7 +
 drivers/media/i2c/Kconfig                     |   11 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/ar0144.c                    | 2111 +++++++++++++++++
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |    9 +
 include/uapi/linux/v4l2-controls.h            |    5 +
 8 files changed, 2322 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/onnn,ar0144.yaml
 create mode 100644 drivers/media/i2c/ar0144.c


base-commit: 39574b6b7bf1368c42975263988d86cc400526e2
-- 
Regards,

Laurent Pinchart





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux