[PATCH v4 0/2] Add IMX219 CMOS image sensor support

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

 



This patchset adds support for IMX219 CMOS image sensor from Sony.
Sony IMX219 is an 8MPix, 1/4.0-inch CMOS active pixel digital image sensor
with an active array size of 3280H x 2464V. It is programmable through
I2C interface. Image data are sent through MIPI CSI-2, which can be configured
as either 2 or 4 data lanes, but this driver currently only supports 2 lanes.
The currently supported resolutions are 3280x2464 @ 15fps, 1920x1080 @ 30fps
(cropped FOV), and 1640x1232 (2x2 binned) @ 30fps.

The driver has been tested with Raspberry Pi Camera Module v2 connected to
Raspberry Pi Zero W.

Changes since v3 [1]:

dt-bindings:
  - "link-frequencies" property added

imx219 sensor driver:
  - "depends on MEDIA_CAMERA_SUPPORT" removed from the Kconfig as all the
    sensor drivers are under "if MEDIA_CAMERA_SUPPORT" now
  - in imx219_get_pad_format(), when 'which' argument is V4L2_SUBDEV_FORMAT_TRY
    update the code field in v4l2_mbus_framefmt structure, as the format code
    could change due to vflip or hflip
  - in imx219_power_on(), the delay after de-asserting the reset is changed
    (reduced from 10 mS to 6.2 mS) to fit the startup timings better. Also
    switched from using msleep() to usleep_range(), as otherwise the change
    from 10 mS to 6.2 mS wouldn't have an effect (see
    https://www.kernel.org/doc/Documentation/timers/timers-howto.txt).
    Added the comment which explains how the value of the delay was calculated,
    and why it is fixed value
  - empty lines added before "return x;" statements
  - in imx219_get_regulators() "int i;" changed to "unsigned int i;"
  - the 'dev' field dropped from struct imx219
  - the link frequencies check is added. As the current driver supports only
    single link frequency, the check just compares the link-frequency in DT to
    the predefined value.
    To be able to read link-frequencies from the DT, call to
    v4l2_fwnode_endpoint_parse() was replaced with call to
    v4l2_fwnode_endpoint_alloc_parse(), and the code was rearranged:
    imx219_check_hwcfg() was introduced, and 'ep' field was removed from imx219
    structure, as the parsed DT endpoint info is not used outside
    imx219_check_hwcfg()
  - in imx219_remove(), the code was added to power off the sensor in the case
    when runtime PM is disabled
  - 'probe_new' is used instead of 'probe'

Thanks,
Andrey

[1] https://patchwork.kernel.org/cover/11328425/


Andrey Konovalov (1):
  dt-bindings: media: i2c: Add IMX219 CMOS sensor binding

Dave Stevenson (1):
  media: i2c: Add driver for Sony IMX219 sensor

 .../devicetree/bindings/media/i2c/imx219.yaml |  114 ++
 MAINTAINERS                                   |    8 +
 drivers/media/i2c/Kconfig                     |   11 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/imx219.c                    | 1312 +++++++++++++++++
 5 files changed, 1446 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/imx219.yaml
 create mode 100644 drivers/media/i2c/imx219.c

-- 
2.17.1




[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