OV5640 mipi camera on mcimx6q-sdb

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OV5640 mipi camera on mcimx6q-sdb

3,830 Views
kamilhorák
Contributor I

I need to do some tests with the mipi camera module on sabresd board but unfortunatelly no success: the module is detected on i2c bus but no success in getting any image from it:

# uname -a

Linux (none) 3.14.38+ge4944a5 #1 SMP PREEMPT Mon Mar 14 15:34:18 CET 2016 armv7l GNU/Linux

(dmesg)

...

i2c /dev entries driver

camera ov5640_mipi is found

mag3110 2-000e: check mag3110 chip ID

...

but:

v4l2-ctl -d /dev/video0 -D

ERROR: v4l2 capture: slave not found!

Failed to open /dev/video0: Resource temporarily unavailable

The dts is as follows (used the dual-ov5640 patch as a pattern):

#include "imx6q-sabresd.dts"

&i2c2 {

       mipi_camera: ov5640@3c {

               compatible = "ovti,ov5640_mipi";

               reg = <0x3c>;

               clocks = <&clks 201>;

               clock-names = "csi_mclk";

               mclk = <25000000>;

           mclk_source = <0>;

               ipu_id = <0>;

               csi_id = <1>;

               DOVDD-supply = <&vgen4_reg>; /* 1.8v */

               AVDD-supply = <&vgen5_reg>;  /* 2.8v, rev C board is VGEN3

                                               rev B board is VGEN5 */

               DVDD-supply = <&vgen2_reg>;  /* 1.5v*/

           pwn-gpios = <&gpio6 9 1>;

               rst-gpios = <&gpio2 5 0>;

               port {

                       #address-cells = <1>;

                       #size-cells = <0>;

                       ov5640_1: endpoint@1 {

                               reg = <1>;

                               remote-endpoint = <&csi1_vc0>;

                               data-lanes = <0 1>;

                               clock-lanes = <2>;

                       };

               };

       };

};

&ipu1 { /* IPU1 */

       status = "okay";

       v4l2-capture {

               compatible = "fsl,imx6-v4l2-capture";

               #address-cells = <1>;

               #size-cells = <0>;

               status = "okay";

               pinctrl-names = "default";

               /* CSI1 */

               port@1 {

                       #address-cells = <1>;

                       #size-cells = <0>;

                       reg = <1>;

                       /* MIPI CSI-2 virtual channel 0 */

                       csi1_vc0: endpoint@0 {

                               reg = <0>;

                               remote-endpoint = <&ov5640_1>;

                               data-lanes = <0 1>;

                               clock-lanes = <2>;

                       };

               };

       };

};

There module has no power-down and reset signals connected and it has its own clock source (25MHz). Could this be the problem or am I missing something else?

Tags (2)
0 Kudos
4 Replies

1,296 Views
jimmychan
NXP TechSupport
NXP TechSupport

one more suggestion, the mxc_v4l2_capture and some modules were built as a module by default. You may change it in the kernel configuration menu or insert the module before run the test.

For example, we suggested customer to do this below before run the test.

insmod ipu_prp_enc.ko

insmod ipu_bg_overlay_sdc.ko

insmod ipu_fg_overlay_sdc.ko

insmod ipu_csi_enc.ko

insmod ov5640_camera_mipi.ko

insmod mxc_v4l2_capture.ko

0 Kudos

1,296 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kamil

please try latest BSP

Board Support Packages (29)

L3.14.52_1.1.0_MX6QDLSOLO (REV L3.14.52_1.1.0)

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

and check attached Linux Manual sect. 6.4 Unit Test and /doc folder (FSL-UT-V4L2-008.txt, FSL-UT-V4L2-009.txt)

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,296 Views
kamilhorák
Contributor I

Hi Igor,

tried the last BSP as recommended - just to be sure, I already was trying it before - but I realized that the file with same name is now about 1MB bigger. No success though. The mxc_v4l2_capture.out from the unit tests directory produces a file containing only 0xFF bytes for any resolution selected.
Tried with the modules as loaded by default then blacklisted apparently unused ones (ov5640_camera, ov5642_camera ov5640_camera_int), no success.

Meanwhile, I checked the signals on the MIPI camera connector and verified that there is no CSI_MCLK signal output from the GPIO_0_CLKO pin, although it seems to be enabled in the device tree - it is enabled in the default setup, isn't? The source dts file was imx6q-sabresd.dts as found in the BSP. The CSI_MCLK also does not appear with my customized dts. We currently do not need the signal because there is a local clock generator on the camera module (and it is definitely up and running, the imager chip would not communicate on the i2c bus without it) but as far I understand it, the clock should be there regardless of another conditions (camera module initialized etc)?

Kamil Horak, 2N Telecommunications

0 Kudos

1,296 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kamil

if camera module has own clock then CSI_MCLK signal output

is not needed. Also one can try demo images included in BSP in above link.

~igor

0 Kudos