mbox series

[v3,0/2] Add IMX219 CMOS image sensor support

Message ID 20200110200915.22575-1-andrey.konovalov@linaro.org (mailing list archive)
Headers show
Series Add IMX219 CMOS image sensor support | expand

Message

Andrey Konovalov Jan. 10, 2020, 8:09 p.m. UTC
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 v2 [1]:

dt-bindings:
  - "clock-names" property removed
  - "xclr-gpios" property renamed to "reset-gpios"
  - the camera-clk mode moved out of sensor device node
  - "clock-lanes" property removed (the sensor doesn't support lane reordering)
  - "clock-noncontinuous" description made more clear (thanks Sakari)
  - "data-lanes" property reworked: it is now optional, and if it is not
    present the driver should assume four-lane operation. For two-lane
    operation (the only mode supported by the current driver) this property
    must be present and set to <1 2>

imx219 sensor driver:
  - "xclr-gpios" property renamed to "reset-gpios", the corresponding
    struct gpio_desc field in the imx219 structure is renamed to reset_gpio
  - in the driver probe() a test to check that the number of CSI-2 data lanes
    is supported by the driver was added
  - devm_clk_get() is now called with NULL as the 2nd argument, as there is
    just single clock, and there is no need to use clock ID
  - error messages are added when the driver fails to get regulators, to init
    media entity pads, or to register sensor sub-device

Thanks,
Andrey

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


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 |  104 ++
 MAINTAINERS                                   |    8 +
 drivers/media/i2c/Kconfig                     |   12 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/imx219.c                    | 1253 +++++++++++++++++
 5 files changed, 1378 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/imx219.yaml
 create mode 100644 drivers/media/i2c/imx219.c

Comments

Ezequiel Garcia Jan. 11, 2020, 4:45 a.m. UTC | #1
Hello Andrey,

Thanks for submitting a new version.

On Fri, 2020-01-10 at 23:09 +0300, Andrey Konovalov wrote:
> 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 v2 [1]:
> 
> dt-bindings:
>   - "clock-names" property removed
>   - "xclr-gpios" property renamed to "reset-gpios"
>   - the camera-clk mode moved out of sensor device node
>   - "clock-lanes" property removed (the sensor doesn't support lane reordering)
>   - "clock-noncontinuous" description made more clear (thanks Sakari)
>   - "data-lanes" property reworked: it is now optional, and if it is not
>     present the driver should assume four-lane operation. For two-lane
>     operation (the only mode supported by the current driver) this property
>     must be present and set to <1 2>
> 
> imx219 sensor driver:
>   - "xclr-gpios" property renamed to "reset-gpios", the corresponding
>     struct gpio_desc field in the imx219 structure is renamed to reset_gpio
>   - in the driver probe() a test to check that the number of CSI-2 data lanes
>     is supported by the driver was added
>   - devm_clk_get() is now called with NULL as the 2nd argument, as there is
>     just single clock, and there is no need to use clock ID
>   - error messages are added when the driver fails to get regulators, to init
>     media entity pads, or to register sensor sub-device
> 

It seems you missed Sakari's review comments on v2,
see https://patchwork.linuxtv.org/patch/60925/#114407

Thanks!
Eze
Andrey Konovalov Jan. 11, 2020, 5:46 p.m. UTC | #2
Hi Ezequiel,

On 11.01.2020 07:45, Ezequiel Garcia wrote:
> Hello Andrey,
> 
> Thanks for submitting a new version.
> 
> On Fri, 2020-01-10 at 23:09 +0300, Andrey Konovalov wrote:
>> 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 v2 [1]:
>>
>> dt-bindings:
>>    - "clock-names" property removed
>>    - "xclr-gpios" property renamed to "reset-gpios"
>>    - the camera-clk mode moved out of sensor device node
>>    - "clock-lanes" property removed (the sensor doesn't support lane reordering)
>>    - "clock-noncontinuous" description made more clear (thanks Sakari)
>>    - "data-lanes" property reworked: it is now optional, and if it is not
>>      present the driver should assume four-lane operation. For two-lane
>>      operation (the only mode supported by the current driver) this property
>>      must be present and set to <1 2>
>>
>> imx219 sensor driver:
>>    - "xclr-gpios" property renamed to "reset-gpios", the corresponding
>>      struct gpio_desc field in the imx219 structure is renamed to reset_gpio
>>    - in the driver probe() a test to check that the number of CSI-2 data lanes
>>      is supported by the driver was added
>>    - devm_clk_get() is now called with NULL as the 2nd argument, as there is
>>      just single clock, and there is no need to use clock ID
>>    - error messages are added when the driver fails to get regulators, to init
>>      media entity pads, or to register sensor sub-device
>>
> 
> It seems you missed Sakari's review comments on v2,
> see https://patchwork.linuxtv.org/patch/60925/#114407

Hm.. Indeed. I missed Sakari's comments on the imx219.c v2 somehow.
I'll post an updated patchset shortly.

Thanks!
Andrey

> Thanks!
> Eze
> 
> 
>