Skip to contentSkip to conversation

Camera Sensor Drivers

PATCH In review Martina Krasteva 3 participants 13 messages May 27, 2021 – Jun 11, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v2 cover Camera Sensor Drivers

From: Martina Krasteva <[email protected]>

Patch series contains Sony IMX335, Sony IMX412 and OmniVision OV9282 camera sensor drivers and respective binding documentation.

v1->v2:
- define maxItems for reset-gpios in dt binding document
- make sure the device is powered off on remove
- use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

v1: https://patchwork.kernel.org/project/linux-media/list/?series=458115

Martina Krasteva (6):
dt-bindings: media: Add bindings for imx335
media: i2c: Add imx335 camera sensor driver
dt-bindings: media: Add bindings for imx412
media: i2c: Add imx412 camera sensor driver
dt-bindings: media: Add bindings for ov9282
media: i2c: Add ov9282 camera sensor driver

 .../devicetree/bindings/media/i2c/ovti,ov9282.yaml |   91 ++
 .../devicetree/bindings/media/i2c/sony,imx335.yaml |   91 ++
 .../devicetree/bindings/media/i2c/sony,imx412.yaml |   91 ++
 MAINTAINERS                                        |   27 +
 drivers/media/i2c/Kconfig                          |   42 +
 drivers/media/i2c/Makefile                         |    4 +-
 drivers/media/i2c/imx335.c                         | 1129 +++++++++++++++++
 drivers/media/i2c/imx412.c                         | 1272 ++++++++++++++++++++
 drivers/media/i2c/ov9282.c                         | 1137 +++++++++++++++++
 9 files changed, 3883 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
 create mode 100644 drivers/media/i2c/imx335.c
 create mode 100644 drivers/media/i2c/imx412.c
 create mode 100644 drivers/media/i2c/ov9282.c

base-commit: f6b46ef27317b3441138b902689bd89e4f82c6f4

Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/6 dt-bindings: media: Add bindings for imx335

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for Sony imx335 sensor driver
- Add MAINTAINERS entry for Sony imx335 binding documentation

---
 .../devicetree/bindings/media/i2c/sony,imx335.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml new file +91 -0
new file mode 100644
index 000000000000..881f79532501
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2021 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/sony,imx335.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sony IMX335 Sensor
+
+maintainers:
+  - Paul J. Murphy <[email protected]>
+  - Daniele Alessandrelli <[email protected]>
+
+description:
+  IMX335 sensor is a Sony CMOS active pixel digital image sensor with an active
+  array size of 2592H x 1944V. It is programmable through I2C interface. The
+  I2C client address is fixed to 0x1a as per sensor data sheet. Image data is
+  sent through MIPI CSI-2.
+
+properties:
+  compatible:
+    const: sony,imx335
+  reg:
+    description: I2C address
+    maxItems: 1
+
+  assigned-clocks: true
+  assigned-clock-parents: true
+  assigned-clock-rates: true
+
+  clocks:
+    description: Clock frequency from 6 to 27 MHz, 37.125MHz, 74.25MHz
+    maxItems: 1
+
+  reset-gpios:
+    description: Reference to the GPIO connected to the XCLR pin, if any.
+    maxItems: 1
+
+  port:
+    additionalProperties: false
+    $ref: /schemas/graph.yaml#/properties/port
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          data-lanes: true
+          link-frequencies: true
+
+        required:
+          - data-lanes
+          - link-frequencies
+
+    required:
+      - endpoint
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        camera@1a {
+            compatible = "sony,imx335";
+            reg = <0x1a>;
+            clocks = <&imx335_clk>;
+
+            assigned-clocks = <&imx335_clk>;
+            assigned-clock-parents = <&imx335_clk_parent>;
+            assigned-clock-rates = <24000000>;
+
+            port {
+                imx335: endpoint {
+                    remote-endpoint = <&cam>;
+                    data-lanes = <1 2 3 4>;
+                    link-frequencies = /bits/ 64 <594000000>;
+                };
+            };
+        };
+    };
+...
MAINTAINERS +8 -0
index 77792c171f1a..f86144307252 100644
@@ -17139,6 +17139,14 @@ T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/i2c/sony,imx334.yaml
 F:	drivers/media/i2c/imx334.c
 
+SONY IMX335 SENSOR DRIVER
+M:	Paul J. Murphy <[email protected]>
+M:	Daniele Alessandrelli <[email protected]>
+L:	[email protected]
+S:	Maintained
+T:	git git://linuxtv.org/media_tree.git
+F:	Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
+
 SONY IMX355 SENSOR DRIVER
 M:	Tianshu Qiu <[email protected]>
 L:	[email protected]
Signature · 1 line
2.11.0
maintainer Reviewed-by on v2 1/6
#2 lore raw

Re: [PATCH v2 1/6] dt-bindings: media: Add bindings for imx335

Quoted 5 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for Sony imx335 sensor driver
- Add MAINTAINERS entry for Sony imx335 binding documentation

Quoted 9 lines
---
 .../devicetree/bindings/media/i2c/sony,imx335.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
#3 lore raw

PATCH v2 2/6 media: i2c: Add imx335 camera sensor driver

In reply to Martina Krasteva

From: Martina Krasteva <[email protected]>

Add a v4l2 sub-device driver for the Sony imx335 image sensor. ThE camera sensor uses the i2c bus for control and the csi-2 bus for data.

The following features are supported:
- manual exposure and analog gain control support
- vblank/hblank/pixel rate/link freq control support
- supported resolution:
- 2592x1940 @ 30fps
- supported bayer order output:
- SRGGB12

---
 MAINTAINERS                |    1 +
 drivers/media/i2c/Kconfig  |   14 +
 drivers/media/i2c/Makefile |    1 +
 drivers/media/i2c/imx335.c | 1129 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1145 insertions(+)
 create mode 100644 drivers/media/i2c/imx335.c
MAINTAINERS +1 -0
index f86144307252..0ed3b572f316 100644
@@ -17146,6 +17146,7 @@ L:	[email protected]
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/i2c/sony,imx335.yaml
+F:	drivers/media/i2c/imx335.c
 
 SONY IMX355 SENSOR DRIVER
 M:	Tianshu Qiu <[email protected]>
drivers/media/i2c/Kconfig +14 -0
index 462c0e059754..74ebb593d560 100644
@@ -827,6 +827,20 @@ config VIDEO_IMX334
 	  To compile this driver as a module, choose M here: the
 	  module will be called imx334.
 
+config VIDEO_IMX335
+	tristate "Sony IMX335 sensor support"
+	depends on OF_GPIO
+	depends on I2C && VIDEO_V4L2
+	select VIDEO_V4L2_SUBDEV_API
+	select MEDIA_CONTROLLER
+	select V4L2_FWNODE
+	help
+	  This is a Video4Linux2 sensor driver for the Sony
+	  IMX335 camera.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called imx335.
+
 config VIDEO_IMX355
 	tristate "Sony IMX355 sensor support"
 	depends on I2C && VIDEO_V4L2
drivers/media/i2c/Makefile +1 -0
index 0c067beca066..afbb582c00ed 100644
@@ -123,6 +123,7 @@ obj-$(CONFIG_VIDEO_IMX274)	+= imx274.o
 obj-$(CONFIG_VIDEO_IMX290)	+= imx290.o
 obj-$(CONFIG_VIDEO_IMX319)	+= imx319.o
 obj-$(CONFIG_VIDEO_IMX334)	+= imx334.o
+obj-$(CONFIG_VIDEO_IMX335)	+= imx335.o
 obj-$(CONFIG_VIDEO_IMX355)	+= imx355.o
 obj-$(CONFIG_VIDEO_MAX9286)	+= max9286.o
 obj-$(CONFIG_VIDEO_MAX9271_LIB)	+= max9271.o
drivers/media/i2c/imx335.c new file +1129 -0

1,129 lines not on this page · raw message

Signature · 1 line
2.11.0
#4 lore raw

PATCH v2 3/6 dt-bindings: media: Add bindings for imx412

In reply to Martina Krasteva

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for Sony imx412 sensor driver
- Add MAINTAINERS entry for Sony imx412 binding documentation

---
 .../devicetree/bindings/media/i2c/sony,imx412.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml new file +91 -0
new file mode 100644
index 000000000000..1edeabf39e6a
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2021 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/sony,imx412.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sony IMX412 Sensor
+
+maintainers:
+  - Paul J. Murphy <[email protected]>
+  - Daniele Alessandrelli <[email protected]>
+
+description:
+  IMX412 sensor is a Sony CMOS active pixel digital image sensor with an active
+  array size of 4072H x 3176V. It is programmable through I2C interface. The
+  I2C client address is fixed to 0x1a as per sensor data sheet. Image data is
+  sent through MIPI CSI-2.
+
+properties:
+  compatible:
+    const: sony,imx412
+  reg:
+    description: I2C address
+    maxItems: 1
+
+  assigned-clocks: true
+  assigned-clock-parents: true
+  assigned-clock-rates: true
+
+  clocks:
+    description: Clock frequency 6MHz, 12MHz, 18MHz, 24MHz or 27MHz
+    maxItems: 1
+
+  reset-gpios:
+    description: Reference to the GPIO connected to the XCLR pin, if any.
+    maxItems: 1
+
+  port:
+    additionalProperties: false
+    $ref: /schemas/graph.yaml#/properties/port
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          data-lanes: true
+          link-frequencies: true
+
+        required:
+          - data-lanes
+          - link-frequencies
+
+    required:
+      - endpoint
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        camera@1a {
+            compatible = "sony,imx412";
+            reg = <0x1a>;
+            clocks = <&imx412_clk>;
+
+            assigned-clocks = <&imx412_clk>;
+            assigned-clock-parents = <&imx412_clk_parent>;
+            assigned-clock-rates = <24000000>;
+
+            port {
+                imx412: endpoint {
+                    remote-endpoint = <&cam>;
+                    data-lanes = <1 2 3 4>;
+                    link-frequencies = /bits/ 64 <600000000>;
+                };
+            };
+        };
+    };
+...
MAINTAINERS +8 -0
index 0ed3b572f316..aaf7f8559972 100644
@@ -17155,6 +17155,14 @@ S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	drivers/media/i2c/imx355.c
 
+SONY IMX412 SENSOR DRIVER
+M:	Paul J. Murphy <[email protected]>
+M:	Daniele Alessandrelli <[email protected]>
+L:	[email protected]
+S:	Maintained
+T:	git git://linuxtv.org/media_tree.git
+F:	Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
+
 SONY MEMORYSTICK SUBSYSTEM
 M:	Maxim Levitsky <[email protected]>
 M:	Alex Dubov <[email protected]>
Signature · 1 line
2.11.0
maintainer Reviewed-by on v2 3/6
#5 lore raw

Re: [PATCH v2 3/6] dt-bindings: media: Add bindings for imx412

Quoted 5 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for Sony imx412 sensor driver
- Add MAINTAINERS entry for Sony imx412 binding documentation

Quoted 9 lines
---
 .../devicetree/bindings/media/i2c/sony,imx412.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
#6 lore raw

PATCH v2 4/6 media: i2c: Add imx412 camera sensor driver

In reply to Martina Krasteva

From: Martina Krasteva <[email protected]>

Add a v4l2 sub-device driver for the Sony imx412 image sensor. This is a camera sensor using the i2c bus for control and the csi-2 bus for data.

The following features are supported:
- manual exposure and analog gain control support
- vblank/hblank/pixel rate/link freq control support
- supported resolution:
- 4056x3040 @ 30fps
- supported bayer order output:
- SRGGB10

---
 MAINTAINERS                |    1 +
 drivers/media/i2c/Kconfig  |   14 +
 drivers/media/i2c/Makefile |    2 +-
 drivers/media/i2c/imx412.c | 1272 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1288 insertions(+), 1 deletion(-)
 create mode 100644 drivers/media/i2c/imx412.c
MAINTAINERS +1 -0
index aaf7f8559972..bc26a8e36df7 100644
@@ -17162,6 +17162,7 @@ L:	[email protected]
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
+F:	drivers/media/i2c/imx412.c
 
 SONY MEMORYSTICK SUBSYSTEM
 M:	Maxim Levitsky <[email protected]>
drivers/media/i2c/Kconfig +14 -0
index 74ebb593d560..3ba1abbf0fd1 100644
@@ -853,6 +853,20 @@ config VIDEO_IMX355
 	  To compile this driver as a module, choose M here: the
 	  module will be called imx355.
 
+config VIDEO_IMX412
+	tristate "Sony IMX412 sensor support"
+	depends on OF_GPIO
+	depends on I2C && VIDEO_V4L2
+	select VIDEO_V4L2_SUBDEV_API
+	select MEDIA_CONTROLLER
+	select V4L2_FWNODE
+	help
+	  This is a Video4Linux2 sensor driver for the Sony
+	  IMX412 camera.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called imx412.
+
 config VIDEO_OV02A10
 	tristate "OmniVision OV02A10 sensor support"
 	depends on VIDEO_V4L2 && I2C
drivers/media/i2c/Makefile +1 -1
index afbb582c00ed..0556447c1089 100644
@@ -125,10 +125,10 @@ obj-$(CONFIG_VIDEO_IMX319)	+= imx319.o
 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_MAX9286)	+= max9286.o
 obj-$(CONFIG_VIDEO_MAX9271_LIB)	+= max9271.o
 obj-$(CONFIG_VIDEO_RDACM20)	+= rdacm20.o
 obj-$(CONFIG_VIDEO_RDACM21)	+= rdacm21.o
 obj-$(CONFIG_VIDEO_ST_MIPID02) += st-mipid02.o
-
 obj-$(CONFIG_SDR_MAX2175) += max2175.o
drivers/media/i2c/imx412.c new file +1272 -0

1,272 lines not on this page · raw message

Signature · 1 line
2.11.0
#7 lore raw

PATCH v2 5/6 dt-bindings: media: Add bindings for ov9282

In reply to Martina Krasteva

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for OmniVision ov9282 sensor driver
- Add MAINTAINERS entry for OmniVision ov9282 binding documentation

---
 .../devicetree/bindings/media/i2c/ovti,ov9282.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml
Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml new file +91 -0
new file mode 100644
index 000000000000..ad42992c6da3
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2021 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov9282.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OmniVision OV9282 Sensor
+
+maintainers:
+  - Paul J. Murphy <[email protected]>
+  - Daniele Alessandrelli <[email protected]>
+
+description:
+  OV9282 sensor is an OmniVision black & white CMOS active pixel digital image
+  sensor with an active array size of 1296H x 816V. It is programmable through
+  I2C interface. The I2C client address is fixed to 0x60/0x70 as per sensor data
+  sheet. Image data is sent through MIPI CSI-2.
+
+properties:
+  compatible:
+    const: ovti,ov9282
+  reg:
+    description: I2C address
+    maxItems: 1
+
+  assigned-clocks: true
+  assigned-clock-parents: true
+  assigned-clock-rates: true
+
+  clocks:
+    description: Clock frequency from 6 to 27MHz
+    maxItems: 1
+
+  reset-gpios:
+    description: Reference to the GPIO connected to the XCLR pin, if any.
+    maxItems: 1
+
+  port:
+    additionalProperties: false
+    $ref: /schemas/graph.yaml#/properties/port
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          data-lanes: true
+          link-frequencies: true
+
+        required:
+          - data-lanes
+          - link-frequencies
+
+    required:
+      - endpoint
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        camera@60 {
+            compatible = "ovti,ov9282";
+            reg = <0x60>;
+            clocks = <&ov9282_clk>;
+
+            assigned-clocks = <&ov9282_clk>;
+            assigned-clock-parents = <&ov9282_clk_parent>;
+            assigned-clock-rates = <24000000>;
+
+            port {
+                ov9282: endpoint {
+                    remote-endpoint = <&cam>;
+                    data-lanes = <1 2>;
+                    link-frequencies = /bits/ 64 <800000000>;
+                };
+            };
+        };
+    };
+...
MAINTAINERS +8 -0
index bc26a8e36df7..c0fa97f8755e 100644
@@ -13650,6 +13650,14 @@ T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/i2c/ov8856.yaml
 F:	drivers/media/i2c/ov8856.c
 
+OMNIVISION OV9282 SENSOR DRIVER
+M:	Paul J. Murphy <[email protected]>
+M:	Daniele Alessandrelli <[email protected]>
+L:	[email protected]
+S:	Maintained
+T:	git git://linuxtv.org/media_tree.git
+F:	Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml
+
 OMNIVISION OV9640 SENSOR DRIVER
 M:	Petr Cvek <[email protected]>
 L:	[email protected]
Signature · 1 line
2.11.0
maintainer Reviewed-by on v2 5/6
#8 lore raw

Re: [PATCH v2 5/6] dt-bindings: media: Add bindings for ov9282

Quoted 5 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

- Add dt-bindings documentation for OmniVision ov9282 sensor driver
- Add MAINTAINERS entry for OmniVision ov9282 binding documentation

Quoted 9 lines
---
 .../devicetree/bindings/media/i2c/ovti,ov9282.yaml | 91 ++++++++++++++++++++++
 MAINTAINERS                                        |  8 ++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml
#9 lore raw

PATCH v2 6/6 media: i2c: Add ov9282 camera sensor driver

In reply to Martina Krasteva

From: Martina Krasteva <[email protected]>

Add a v4l2 sub-device driver for the OmniVisison ov9282 black&white image sensor.
The camera sensor uses the i2c bus for control and the csi-2 bus for data.

The following features are supported:
- manual exposure and analog gain control support
- vblank/hblank/pixel rate/link freq control support
- supported resolution:
- 1280x720 @ 30fps

---
 MAINTAINERS                |    1 +
 drivers/media/i2c/Kconfig  |   14 +
 drivers/media/i2c/Makefile |    1 +
 drivers/media/i2c/ov9282.c | 1137 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1153 insertions(+)
 create mode 100644 drivers/media/i2c/ov9282.c
MAINTAINERS +1 -0
index c0fa97f8755e..fe5adf830370 100644
@@ -13657,6 +13657,7 @@ L:	[email protected]
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/i2c/ovti,ov9282.yaml
+F:	drivers/media/i2c/ov9282.c
 
 OMNIVISION OV9640 SENSOR DRIVER
 M:	Petr Cvek <[email protected]>
drivers/media/i2c/Kconfig +14 -0
index 3ba1abbf0fd1..06f0531e2119 100644
@@ -1116,6 +1116,20 @@ config VIDEO_OV8865
 	  To compile this driver as a module, choose M here: the
 	  module will be called ov8865.
 
+config VIDEO_OV9282
+	tristate "OmniVision OV9282 sensor support"
+	depends on OF_GPIO
+	depends on I2C && VIDEO_V4L2
+	select VIDEO_V4L2_SUBDEV_API
+	select MEDIA_CONTROLLER
+	select V4L2_FWNODE
+	help
+	  This is a Video4Linux2 sensor driver for the OmniVision
+	  OV9282 camera sensor.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ov9282.
+
 config VIDEO_OV9640
 	tristate "OmniVision OV9640 sensor support"
 	depends on I2C && VIDEO_V4L2
drivers/media/i2c/Makefile +1 -0
index 0556447c1089..2d43f0352605 100644
@@ -84,6 +84,7 @@ obj-$(CONFIG_VIDEO_OV772X) += ov772x.o
 obj-$(CONFIG_VIDEO_OV7740) += ov7740.o
 obj-$(CONFIG_VIDEO_OV8856) += ov8856.o
 obj-$(CONFIG_VIDEO_OV8865) += ov8865.o
+obj-$(CONFIG_VIDEO_OV9282) += ov9282.o
 obj-$(CONFIG_VIDEO_OV9640) += ov9640.o
 obj-$(CONFIG_VIDEO_OV9650) += ov9650.o
 obj-$(CONFIG_VIDEO_OV9734) += ov9734.o
drivers/media/i2c/ov9282.c new file +1137 -0

1,137 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer
#10 lore raw
In reply to Martina Krasteva

Hi Martina,

Quoted 11 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

Patch series contains Sony IMX335, Sony IMX412 and OmniVision OV9282 camera sensor drivers and respective binding documentation.

v1->v2:
- define maxItems for reset-gpios in dt binding document
- make sure the device is powered off on remove
- use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

v1: https://patchwork.kernel.org/project/linux-media/list/?series=458115

Thanks for the update.

The patches seem fine, but I noticed one problem: the analogue gain is only updated when exposure is set. This is a bug.

Most drivers do not try to synchronise setting analogue gain and exposure to the same frame. Do you need that? Alternatively the control framework would probably need to be amended a little --- something that would have other benefits, too.

I don't think that blocks merging the drivers though. But this needs to be addressed.

Signature · 3 lines
Kind regards,

Sakari Ailus
#11 lore raw

Hi Sakari,

Thanks for the review

Quoted 16 lines · Sakari Ailus

Hi Martina,

Quoted 11 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

Patch series contains Sony IMX335, Sony IMX412 and OmniVision OV9282 camera sensor drivers and respective binding documentation.

v1->v2:
- define maxItems for reset-gpios in dt binding document
- make sure the device is powered off on remove
- use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

v1: https://patchwork.kernel.org/project/linux-media/list/?series=458115

Thanks for the update.

Quoted 7 lines

The patches seem fine, but I noticed one problem: the analogue gain is only updated when exposure is set. This is a bug.

Most drivers do not try to synchronise setting analogue gain and exposure to the same frame. Do you need that? Alternatively the control framework would probably need to be amended a little --- something that would have other benefits, too.

Analog gain and exposure are "clustered". If I understand correctly, when several controls are in a cluster and one/several of them are set/get from userspace only the first control ops is called - V4L2_CID_EXPOSURE in my case.

Analog gain can be set explicitly, exposure control ops will be called with analog gain new value and current exp. value. Then I could have checked the is_new flag, so I can write the reg value just to the updated control, not to both.

In my case the userspace provides gain and exposure settings in sync so cluster is used to mirror that behavior.

Quoted 3 lines

I don't think that blocks merging the drivers though. But this needs to be addressed.

Best Regards,
Martina

maintainer
#12 lore raw

Hi Martina,

Quoted 34 lines · Martina

Hi Sakari,

Thanks for the review

Quoted 16 lines · Sakari Ailus

Hi Martina,

Quoted 11 lines · Martina Krasteva

From: Martina Krasteva <[email protected]>

Patch series contains Sony IMX335, Sony IMX412 and OmniVision OV9282 camera sensor drivers and respective binding documentation.

v1->v2:
- define maxItems for reset-gpios in dt binding document
- make sure the device is powered off on remove
- use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

v1: https://patchwork.kernel.org/project/linux-media/list/?series=458115

Thanks for the update.

Quoted 7 lines

The patches seem fine, but I noticed one problem: the analogue gain is only updated when exposure is set. This is a bug.

Most drivers do not try to synchronise setting analogue gain and exposure to the same frame. Do you need that? Alternatively the control framework would probably need to be amended a little --- something that would have other benefits, too.

Analog gain and exposure are "clustered". If I understand correctly, when several controls are in a cluster and one/several of them are set/get from userspace only the first control ops is called - V4L2_CID_EXPOSURE in my case.

Quoted 7 lines

Analog gain can be set explicitly, exposure control ops will be called with analog gain new value and current exp. value.
Then I could have checked the is_new flag, so I can write the reg value just to the updated control, not to both.

In my case the userspace provides gain and exposure settings in sync so cluster is used to mirror that behavior.

I missed that, indeed that's fine then.

Signature · 3 lines
Regards,

Sakari Ailus