Unable to get feed from MIPI CSI2 camera

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

Unable to get feed from MIPI CSI2 camera

1,515 Views
srinivasaporam
Contributor II

Hi,

We have got IMX6Q custom board designed based on reference Board (Wandboard). Now We are connecting MIPI CSI sensor to connector and want to get the camera feed from the sensor. The Camera that we have selected is ada fruit's spy camera (https://www.adafruit.com/products/1937 )

 

Voltage we have supplied is 1.8 V and when we are running the following command:

 

$sudo avconv -f video4linux2 -i /dev/video0 out.avi

 

then no file is being created with name out.avi  or no camera is working.

 

I have included following in the dtsi file :

 

v4l2_cap_0 {

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

        ipu_id = <0>;

        csi_id = <0>;

                //csi_id = <0>;

        mclk_source = <0>;

              // mipi_camera = <1>;

               //default_input = <1>;

        status = "okay";

    };

 

    v4l2_out {

        compatible = "fsl,mxc_v4l2_output";

        status = "okay";

    };

 

 

for camera :

 

&i2c1 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c1_1>;

    status = "okay";

 

   ov5647_mipi@36 {

        compatible = "ovti,ov5647_mipi";

        reg = <0x36>;

        // Pi camera has its own 25MHz clock.

        clocks = <&clks 0>;

        clock-names = "csi_mclk";

        DOVDD-supply = <&reg_1p8v>;

        AVDD-supply = <&reg_2p5v>;

        DVDD-supply = <&reg_1p8v>;

        pwn-gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;

        ipu_id = <0>;

        csi_id = <0>;

                //csi_id = <1>;

        mclk = <25000000>;

        mclk_source = <0>;

       

           };

  };

 

 

 

&iomuxc {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_hog_1>;

 

    imx6qdl-wandboard {

        pinctrl_hog_1: hoggrp-1 {

            fsl,pins = <

                             

                               MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30            0x80000000

                                  

>;

        };

    };

 

 

and for mipi-csi:

 

&mipi_csi {

    ipu_id = <0>;

    csi_id = <0>;

        //csi_id = <1>;

    v_channel = <0>;

    lanes = <2>;

        //mipi_dphy_clk = <0x14>;

    status = "okay";

};

 

 

 

But, the camera is not working.

 

Since we have connected CSI0_MCLK to the Camera, We have tried as below also:

 

&i2c1 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c1_1>;

    status = "okay";

 

   ov5647_mipi@36 {

        compatible = "ovti,ov5647_mipi";

        reg = <0x36>;

       

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

        DOVDD-supply = <&reg_1p8v>;

        AVDD-supply = <&reg_2p5v>;

        DVDD-supply = <&reg_1p8v>;

        pwn-gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;

        ipu_id = <0>;

        csi_id = <0>;

                //csi_id = <1>;

        mclk = <24000000>;

        mclk_source = <0>;

       

           };

  };

 

 

&iomuxc {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_hog_1>;

 

    imx6qdl-wandboard {

        pinctrl_hog_1: hoggrp-1 {

            fsl,pins = <

                             

                                //MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1        0x000b0

                                MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1                 0x80000000

                                MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30            0x80000000

                                  

>;

        };

    };

 

 

in this case, camera feed is not coming. What is mistake that we are doing???? Why camera feed is not coming??? is GPU necessary for the mipi csi2 work???

 

 

Please find attached  ov5647_mipi.c (driver file) as well as schematic for the same????

Original Attachment has been moved to: ov5647_mipi.c.zip

Labels (5)
0 Kudos
2 Replies

757 Views
srinivasaporam
Contributor II

Hi,

I have already checked humming board schematics, and patch for dts files etc... But it is not working with our custom board which is designed based on Wandboard.

Only differences are as below:

1. Humming Board csi_id = <1> where as Wandboard is using csi_id = <0>. Which one i should use.

2. Humming board uses  the following:

v4l2_cap_0 {

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

        ipu_id = <0>;

        csi_id = <1>;

               

        mclk_source = <0>;

        mipi_camera = <1>;

        default_input = <1>;

        status = "okay";

    };

here mipi_camera=  <1> and default_input =<1>  but Wandboard doen't have these entries. Whether we should use them or not?????

3.  Humming board has the following :

&mipi_csi {

    ipu_id = <0>;

    csi_id = <1>;

      

    v_channel = <0>;

    lanes = <2>;

    mipi_dphy_clk = <0x28>;

    status = "okay";

};

where as wandboard has :

&mipi_csi {

    ipu_id = <0>;

    csi_id = <0>;

      

    v_channel = <0>;

    lanes = <2>;

       

    status = "okay";

};

Which one we should use?????

0 Kudos

757 Views
igorpadykov
NXP Employee
NXP Employee

Hi Srinivasa

seems OV5647 is working on hummingboard, so one can look at

https://community.freescale.com/thread/310786

http://forum.solid-run.com/linux-kernel-and-bootloaders-on-cubox-i-and-hummin-f10/ov5647-driver--t17...

linux-linaro-stable-mx6/imx6qdl-hummingboard.dtsi at linux-linaro-lsk-v3.14-mx6-picam · n-aizu/linux...

Best regards

igor

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

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

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

0 Kudos