OV5647 sensor driver
Subsystems (4)
cover OV5647 sensor driver
From: roliveir <roliveir-HKixBCOQz3hWk0Htik3J/[email protected]>
Hello,
This patch adds support for the Omnivision OV5647 sensor.
At the moment it only supports 640x480 in Raw 8.
Ramiro Oliveira (2):
Add OV5647 device tree documentation
Add support for Omnivision OV5647
.../devicetree/bindings/media/i2c/ov5647.txt | 19 + MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5647.c | 891 +++++++++++++++++++++ 5 files changed, 929 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt create mode 100644 drivers/media/i2c/ov5647.c
Signature · 7 lines
2.8.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/2 Add OV5647 device tree documentation
In reply to a message not in the archiveFrom: roliveir <roliveir-HKixBCOQz3hWk0Htik3J/[email protected]>
--- .../devicetree/bindings/media/i2c/ov5647.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +19 -0
@@ -0,0 +1,19 @@ +Omnivision OV5657 raw image sensor +--------------------------------- + +OV5657 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces +and CCI (I2C compatible) control bus. + +Required properties: + +- compatible : "ov5647"; +- reg : I2C slave address of the sensor; + +The common video interfaces bindings (see video-interfaces.txt) should be +used to specify link to the image data receiver. The OV5647 device +node should contain one 'port' child node with an 'endpoint' subnode. + +Following properties are valid for the endpoint node: + +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in + video-interfaces.txt. The sensor supports only two data lanes.
Signature · 7 lines
2.8.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 Add support for Omnivision OV5647
In reply to Ramiro OliveiraFrom: roliveir <[email protected]>
--- MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5647.c | 891 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 910 insertions(+) create mode 100644 drivers/media/i2c/ov5647.c
MAINTAINERS +7 -0
@@ -8370,6 +8370,13 @@ M: Harald Welte <[email protected]> S: Maintained F: drivers/char/pcmcia/cm4040_cs.* +OMNIVISION OV5647 SENSOR DRIVER +M: Ramiro Oliveira <[email protected]> +L: [email protected] +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/ov5647.c + OMNIVISION OV7670 SENSOR DRIVER M: Jonathan Corbet <[email protected]> L: [email protected]
drivers/media/i2c/Kconfig +11 -0
@@ -500,6 +500,17 @@ config VIDEO_OV2659 To compile this driver as a module, choose M here: the module will be called ov2659. +config VIDEO_OV5647 + tristate "OmniVision OV5647 sensor support" + depends on I2C && VIDEO_V4L2 + depends on MEDIA_CAMERA_SUPPORT + ---help--- + This is a Video4Linux2 sensor-level driver for the OmniVision + OV5647 camera. + + To compile this driver as a module, choose M here: the + module will be called ov5647. + config VIDEO_OV7640 tristate "OmniVision OV7640 sensor support" depends on I2C && VIDEO_V4L2
drivers/media/i2c/Makefile +1 -0
@@ -80,3 +80,4 @@ obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_OV2659) += ov2659.o obj-$(CONFIG_VIDEO_TC358743) += tc358743.o +obj-$(CONFIG_VIDEO_OV5647) += ov5647.o
drivers/media/i2c/ov5647.c new file +891 -0
891 lines not on this page · raw message
Signature · 1 line
2.8.1
kbuild test robot
build botRe: [PATCH 2/2] Add support for Omnivision OV5647
reproduce:
Hi,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.7-rc1 next-20160603]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ramiro-Oliveira/OV5647-sensor-driver/20160604-013955 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-x001-201623 (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/media/i2c/ov5647.c: In function 'ov5647_open':
>> drivers/media/i2c/ov5647.c:757:5: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration]
v4l2_subdev_get_try_format(subdev, fh->pad, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/ov5647.c:757:42: error: 'struct v4l2_subdev_fh' has no member named 'pad'
v4l2_subdev_get_try_format(subdev, fh->pad, 0);
^~
>> drivers/media/i2c/ov5647.c:759:5: error: implicit declaration of function 'v4l2_subdev_get_try_crop' [-Werror=implicit-function-declaration]
v4l2_subdev_get_try_crop(subdev, fh->pad, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov5647.c:759:40: error: 'struct v4l2_subdev_fh' has no member named 'pad'
v4l2_subdev_get_try_crop(subdev, fh->pad, 0);
^~cc1: some warnings being treated as errors
vim +/v4l2_subdev_get_try_format +757 drivers/media/i2c/ov5647.c
751 * @param[in] fh v4l2 file handler
752 * @return Error code
753 */
754 static int ov5647_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh)
755 {
756 struct v4l2_mbus_framefmt *format =
> 757 v4l2_subdev_get_try_format(subdev, fh->pad, 0); 758 struct v4l2_rect *crop = > 759 v4l2_subdev_get_try_crop(subdev, fh->pad, 0);
760
761 crop->left = OV5647_COLUMN_START_DEF;
762 crop->top = OV5647_ROW_START_DEF;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Rob Herring
maintainerRe: [PATCH 1/2] Add OV5647 device tree documentation
In reply to Ramiro OliveiraQuoted 14 lines · Ramiro Oliveira
From: roliveir <[email protected]>
Signed-off-by Ramiro Oliveira <[email protected]>--- .../devicetree/bindings/media/i2c/ov5647.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txtDocumentation/devicetree/bindings/media/i2c/ov5647.txt new file +0
-0
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +1
-0@@ -0,0 +1,19 @@ +Omnivision OV5657 raw image sensor
Still 5657?
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 9
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +8
-0+--------------------------------- + +OV5657 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces +and CCI (I2C compatible) control bus. + +Required properties: + +- compatible : "ov5647";
Needs vendor prefix?
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 10
Quoted 1 line
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +1
-0+- reg : I2C slave address of the sensor;
What happened to the clocks property. I'm pretty sure the driver always needs to know the input clock freq.
Quoted 13 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +9
-0+ +The common video interfaces bindings (see video-interfaces.txt) should be +used to specify link to the image data receiver. The OV5647 device +node should contain one 'port' child node with an 'endpoint' subnode. + +Following properties are valid for the endpoint node: + +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in + video-interfaces.txt. The sensor supports only two data lanes.Signature · 1 line
2.8.1
Re: [PATCH 1/2] Add OV5647 device tree documentation
Quoted 9 lines · Rob Herring
Quoted 8 lines · Ramiro Oliveira
From: roliveir <roliveir-HKixBCOQz3hWk0Htik3J/[email protected]>
--- .../devicetree/bindings/media/i2c/ov5647.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 1
Quoted 7 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +1
-0@@ -0,0 +1,19 @@ +Omnivision OV5657 raw image sensorStill 5657?
Sorry, I thought I had changed it.
Quoted 9 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 9
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +8
-0+--------------------------------- + +OV5657 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces +and CCI (I2C compatible) control bus. + +Required properties: + +- compatible : "ov5647";Needs vendor prefix?
I'll add the ovti prefix
Quoted 3 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt line 10
Quoted 1 line
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +1
-0+- reg : I2C slave address of the sensor;What happened to the clocks property. I'm pretty sure the driver always needs to know the input clock freq.
I've seen some drivers that don't make any reference to clock freq, but I can add it, if you think it's necessary.
Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +5
-0+ +The common video interfaces bindings (see video-interfaces.txt) should be +used to specify link to the image data receiver. The OV5647 device +node should contain one 'port' child node with an 'endpoint' subnode. +
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/ov5647.txt new file +4
-0+Following properties are valid for the endpoint node: + +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in + video-interfaces.txt. The sensor supports only two data lanes.Signature · 1 line
2.8.1
Regards,
Ramiro
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html