media: i2c: add imx415 cmos image sensor driver
Subsystems (4)
v3 cover media: i2c: add imx415 cmos image sensor driver
Hi all,
This series adds a driver for the Sony IMX415 CMOS image sensor. The Sony IMX415 is a diagonal 6.4 mm (Type 1/2.8) CMOS active pixel type solid-state image sensor with a square pixel array and 8.46 M effective pixels. This chip operates with analog 2.9 V, digital 1.1 V, and interface 1.8 V triple power supply, and has low power consumption.
The IMX415 is programmable through I2C interface. The sensor output is available via CSI-2 serial data output (two or four lanes).
Version 2 of this series fixes the port description in the devicetree binding as pointed out by Rob Herring.
Version 3 addresses the comments by Sakari Ailus, Marco Felsch and Rob Herring.
Looking forward to your comments!
Best regards,
Michael
Gerald Loacker (1):
media: i2c: add imx415 cmos image sensor driver
Michael Riesch (1):
dt-bindings: media: i2c: add imx415 cmos image sensor
.../bindings/media/i2c/sony,imx415.yaml | 122 ++ MAINTAINERS | 8 + drivers/media/i2c/Kconfig | 14 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/imx415.c | 1300 +++++++++++++++++ 5 files changed, 1445 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml create mode 100644 drivers/media/i2c/imx415.c
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
Signature · 1 line
2.30.2
PATCH v3 1/2 dt-bindings: media: i2c: add imx415 cmos image sensor
Add devicetree binding for the Sony IMX415 CMOS image sensor.
---
v3:
- move description from clock-names to clocks
- drop clock-names property
- drop "link-frequencies: true" in endpoint description
v2:
- fix reference in port (must be /$defs/port-base)
- describe data-lanes in more detail
- remove unexpected property clock-lanes from example
- sort properties in example alphabetically
.../bindings/media/i2c/sony,imx415.yaml | 122 ++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml new file +122 -0
@@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/sony,imx415.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony IMX415 CMOS Image Sensor + +maintainers: + - Michael Riesch <[email protected]> + +description: |- + The Sony IMX415 is a diagonal 6.4 mm (Type 1/2.8) CMOS active pixel type + solid-state image sensor with a square pixel array and 8.46 M effective + pixels. This chip operates with analog 2.9 V, digital 1.1 V, and interface + 1.8 V triple power supply, and has low power consumption. + The IMX415 is programmable through I2C interface. The sensor output is + available via CSI-2 serial data output (two or four lanes). + +allOf: + - $ref: ../video-interface-devices.yaml# + +properties: + compatible: + const: sony,imx415 + + reg: + maxItems: 1 + + clocks: + description: Input clock (24 MHz, 27 MHz, 37.125 MHz, 72 MHz or 74.25 MHz) + maxItems: 1 + + avdd-supply: + description: Analog power supply (2.9 V) + + dvdd-supply: + description: Digital power supply (1.1 V) + + ovdd-supply: + description: Interface power supply (1.8 V) + + reset-gpios: + description: Sensor reset (XCLR) GPIO + maxItems: 1 + + flash-leds: true + + lens-focus: true + + orientation: true + + rotation: true + + port: + $ref: /schemas/graph.yaml#/$defs/port-base + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + oneOf: + - items: + - const: 1 + - const: 2 + - items: + - const: 1 + - const: 2 + - const: 3 + - const: 4 + + required: + - data-lanes + - link-frequencies + + required: + - endpoint + +required: + - compatible + - reg + - clocks + - avdd-supply + - dvdd-supply + - ovdd-supply + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + imx415: camera-sensor@1a { + compatible = "sony,imx415"; + reg = <0x1a>; + avdd-supply = <&vcc2v9_cam>; + clocks = <&clock_cam>; + dvdd-supply = <&vcc1v1_cam>; + lens-focus = <&vcm>; + orientation = <2>; + ovdd-supply = <&vcc1v8_cam>; + reset-gpios = <&gpio_expander 14 GPIO_ACTIVE_LOW>; + rotation = <180>; + + port { + imx415_ep: endpoint { + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <445500000>; + remote-endpoint = <&mipi_in>; + }; + }; + }; + }; +...
MAINTAINERS +7 -0
@@ -19493,6 +19493,13 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml F: drivers/media/i2c/imx412.c +SONY IMX415 SENSOR DRIVER +M: Michael Riesch <[email protected]> +L: [email protected] +S: Maintained +T: git git://linuxtv.org/media_tree.git +F: Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml + SONY MEMORYSTICK SUBSYSTEM M: Maxim Levitsky <[email protected]> M: Alex Dubov <[email protected]>
Signature · 1 line
2.30.2
Re: [PATCH v3 1/2] dt-bindings: media: i2c: add imx415 cmos image sensor
Quoted 15 lines · Michael Riesch
Add devicetree binding for the Sony IMX415 CMOS image sensor.
Signed-off-by Michael Riesch <[email protected]>---
v3:
- move description from clock-names to clocks
- drop clock-names property
- drop "link-frequencies: true" in endpoint descriptionv2:
- fix reference in port (must be /$defs/port-base)
- describe data-lanes in more detail
- remove unexpected property clock-lanes from example
- sort properties in example alphabetically
Quoted 5 lines
.../bindings/media/i2c/sony,imx415.yaml | 122 ++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
PATCH v3 2/2 media: i2c: add imx415 cmos image sensor driver
In reply to Michael RieschFrom: Gerald Loacker <[email protected]>
Add driver for the Sony IMX415 CMOS image sensor.
---
v3:
- fix copyright year
- store only required controls
- make "cur_mode" and "num_data_lanes" unsigned
- fix array initialization
- increase number of controls to be reserved to 10
- refactor code to wake up sensor into a separate method
- align error code handling
- add V4L2_SUBDEV_FL_HAS_EVENTS flag
- use "gpiod_set_value_cansleep" instead of "gpiod_direction_output"
- simplify logic that checks supported link frequencies/modes
v2:
- no changes
MAINTAINERS | 1 + drivers/media/i2c/Kconfig | 14 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/imx415.c | 1300 ++++++++++++++++++++++++++++++++++++ 4 files changed, 1316 insertions(+) create mode 100644 drivers/media/i2c/imx415.c
MAINTAINERS +1 -0
@@ -19499,6 +19499,7 @@ L: [email protected] S: Maintained T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml +F: drivers/media/i2c/imx415.c SONY MEMORYSTICK SUBSYSTEM M: Maxim Levitsky <[email protected]>
drivers/media/i2c/Kconfig +14 -0
@@ -228,6 +228,20 @@ config VIDEO_IMX412 To compile this driver as a module, choose M here: the module will be called imx412. +config VIDEO_IMX415 + tristate "Sony IMX415 sensor support" + depends on OF_GPIO + depends on I2C && VIDEO_DEV + select VIDEO_V4L2_SUBDEV_API + select MEDIA_CONTROLLER + select V4L2_FWNODE + help + This is a Video4Linux2 sensor driver for the Sony + IMX415 camera. + + To compile this driver as a module, choose M here: the + module will be called imx415. + config VIDEO_MAX9271_LIB tristate
drivers/media/i2c/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_VIDEO_IMX334) += imx334.o obj-$(CONFIG_VIDEO_IMX335) += imx335.o obj-$(CONFIG_VIDEO_IMX355) += imx355.o obj-$(CONFIG_VIDEO_IMX412) += imx412.o +obj-$(CONFIG_VIDEO_IMX415) += imx415.o obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o obj-$(CONFIG_VIDEO_ISL7998X) += isl7998x.o obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
drivers/media/i2c/imx415.c new file +1300 -0
1,300 lines not on this page · raw message
Signature · 1 line
2.30.2