Parallel camera i.mx6QUAD

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel camera i.mx6QUAD

1,144 Views
sebaseba
Contributor II

Hello.

I am using i.m6QUAD with hummingboard2 (hummingboard Gate) with 3.14.79 linux kernel from this site GitHub - SolidRun/linux-fslc: Linux kernel source tree 

 

It's been a loong time since i am playing with ov5642 parallel camera and I can't get it to work...

As i see on schematic of hummingboard I can use parallel camera using IPU2_CSI1.

I set up device tree as this:

-in file "imx6qdl-hummingboard2.dtsi" (this file contains common part fo quad and dual-lite) I set up v4l2 to use IPU2/CSI1:

v4l2_cap_0 {
        compatible = "fsl,imx6q-v4l2-capture";
        ipu_id = <1>;   //default was <0>
        csi_id = <1>;   //default was <0>
        mclk_source = <0>;
        /*mipi_camera = <1>; */
        /*default_input = <0>; */
        status = "okay";
    };

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

- Then in file "imx6q-hummingboard2.dts" I add following settings:

 

&iomuxc{
hummingboard2{
pinctrl_hummingboard2_parallel: hummingboard2_parallel{
fsl,pins= <                                                           //SHOULD BE fsl,pins or different ??
MX6QDL_PAD_EIM_A24__IPU2_CSI1_DATA19 0x0b0b1
MX6QDL_PAD_EIM_A23__IPU2_CSI1_DATA18 0x0b0b1
MX6QDL_PAD_EIM_A22__IPU2_CSI1_DATA17 0x0b0b1
MX6QDL_PAD_EIM_A21__IPU2_CSI1_DATA16 0x0b0b1
MX6QDL_PAD_EIM_A20__IPU2_CSI1_DATA15 0x0b0b1
MX6QDL_PAD_EIM_A19__IPU2_CSI1_DATA14 0x0b0b1
MX6QDL_PAD_EIM_A18__IPU2_CSI1_DATA13 0x0b0b1
MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12 0x0b0b1
MX6QDL_PAD_EIM_DA11__IPU2_CSI1_HSYNC 0x0b0b1
MX6QDL_PAD_EIM_DA12__IPU2_CSI1_VSYNC 0x0b0b1
MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK 0x0b0b1

MX6QDL_PAD_EIM_DA10__GPIO3_IO10 0x400130b1  //pwn
MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x400130b1 //rst
>;

};
};
};

 

&i2c3{
ov5642: ov5642@3c{
compatible = "ovti,ov5642";
reg = <0x3c>;
clocks = <&clks IMX6QDL_CLK_CKO2>;
clock-names = "csi_mclk";

pwn-gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
rst-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
ipu_id = <1>;  //the same as in v4l2
csi_id = <1>;  //the same as in v4l2
mclk = <24000000>;
mclk_source=<0>;   //the same as in v4l2

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hummingboard2_parallel>;

};
};

 

When I reboot my system and do "sudo modprobe ov5642_camera" i got in "dmesg":

"pin MX6Q_PAD_EIM_A24 already requested by 20e0000.iomuxc; cannot claim for 2-003c. "

The same error is for other pins dafined in "pinctrl_hummingboard2_parallel"

But when I change "fsl,pins" to "fsl,ipu" error disapears but gstreamer shows only a black screen and after some while turns off. Pipeline I use:

gst-launch-1.0 imxv4l2videosrc device=/dev/video0 imx-capture-mode=3 ! decodebin ! autovideosink

 

 

 

dmesg messages when I use "fsl,pins" are shown in attached pisture "fls,pins-dmesg" and when I use "fsl,ipu" in picture "fsl,ipu-dmesg". I also attach device tree files and a file "imx6qdl.dtsi" - there is a declaration of iomuxc: iomuxc@20e0000. the same iomuxc is also used in imx6qdl-hummingboard2.dtsi file.

 

Can someone hepl me to run this camera ??

Original Attachment has been moved to: imx6qdl.dtsi.zip

Original Attachment has been moved to: imx6q-hummingboard2.dts.zip

Original Attachment has been moved to: imx6qdl-hummingboard2.dtsi.zip

Original Attachment has been moved to: imx6q.dtsi.zip

Labels (5)
0 Kudos
3 Replies

300 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Seba

seems pin MX6Q_PAD_EIM_A24 is already used by some other modules.

For parallel camera example one can look at imx6qdl-sabresd.dtsi
pinctrl_ipu1_2: ipu1grp-2 { /* parallel camera */ 

linux-imx.git - i.MX Linux Kernel 

In general this could be posted on meta-fsl-arm mailing list, so that someone familiar with

hummingboard could try to assist you.
https://lists.yoctoproject.org/listinfo/meta-freescale

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

0 Kudos

300 Views
sebaseba
Contributor II

Thank You Igor for Your reply.

I have followed egsample of sabreboard. In addition, settings of device tree I use are proposed by hummingboard manufacturer - so I strongly think they should be correct. Pin MX6Q_PAD_EIM_A24 only appears in imx6qdl-hummingboard2.dtsi file in line 354 in "&iomuxc{..." node but nowhere else. It is in default configured as GPIO pin which is available on board 36-pins connector. If I set in &iomuxc{... "status" property to "disabled" my system does not boot.

Is there a way to check which module is using this pad at the same time (if any) ??

Or it could be a problem with overlays of "fsl,pins" settings ??

0 Kudos

300 Views
mhilt
Contributor II

Hi Seba,

I'm not sure if you solved your issue, but I had the same problem initially when connecting a parallel ov5640 to the Hummingboard2. In case you have not fixed your issue, you need to remove (or comment out) the GPIO configuration lines that you mention in imx6qdl-hummingboard2.dtsi. These do conflict with the IO configuration you are adding for the camera.

In case you fixed that, I also found that if you have removed the MIPI camera from the dtsi, you must also add the CKO2 signal to your IO mux configuration. If you left the MIPI camera, it already configures that clock.

I am now able to get some output from the camera using gstreamer, unfortunately the image is discolored (very pink), scrolling vertically on the screen and pixelated. At least one problem seems to be the clock signal quality, which on my setup is connected through a fairly long flex cable and adapter from the MIPI port on the board. I am trying to improve this, but I think there must be other issues as well.

Were you able to get your camera working? If so, I would like to know what camera module you tested with, and any other steps that helped you.

Thanks,

Matt

0 Kudos