OV5640_ MIPI camera probe failed

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

OV5640_ MIPI camera probe failed

Jump to solution
4,189 Views
sindhujakapugan
Contributor III

Hai Everyone,

We are using the  BSP-Linux-3.14.28 with i.MX6Solo/Dual lite board and  trying to insert the ov5640_mipi.ko,

The following errors is reported.

            ov5640_read_reg:write reg error:reg=300a

            camera ov5640_mipi is not found

The  Camera connected to following pins

I2C  Pins

      MX6QDL_PAD_EIM_D17__I2C3_SCL

      MX6QDL_PAD_EIM_D18__I2C3_SDA

Reset and Power Down

           MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00(RST)

           MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31(pwdn)

The DTSI  for Camera is ..

pinctrl_i2c3: i2c3grp {

            fsl,pins = <

                MX6QDL_PAD_EIM_D18__I2C3_SDA        0x4001b8b1

                MX6QDL_PAD_EIM_D17__I2C3_SCL        0x4001b8b1

   

            >;

        };

&i2c3 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c3>;

    status = "okay";

    /* FOR CAMERA */

    ov5640_mipi@0x3c {

        compatible = "ovti,ov5640_mipi";

        reg = <0x3c>; //<0x78>;

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

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

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

        pinctrl-0 = <&pinctrl_ipu1_2>;                /*rev B board is VGEN5 */

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

        pwn-gpios = <&gpio5 31 1>;   /* active low: CSIO_DAT13 */

        rst-gpios = <&gpio6 00 0>;   /* active high: CSIO_DAT14*/

        ipu_id = <0>;

        csi_id = <1>;

        vc = <0>;

        mclk = <24000000>;

        mclk_source = <0>;

        status="okay";

    };

};

v4l2_cap_0 {

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

        ipu_id = <0>;

        csi_id = <0>;

        mclk_source = <0>;

        status = "okay";

    };

    v4l2_cap_1 {

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

        ipu_id = <0>;

        csi_id = <1>;

        mclk_source = <0>;

        status = "okay";

    };

    v4l2_out {

        compatible = "fsl,mxc_v4l2_output";

        status = "okay";

    };

    mipi_dsi_reset: mipi-dsi-reset {

        compatible = "gpio-reset";

        reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;

        reset-delay-us = <50>;

        #reset-cells = <0>;

    };

    /**/

};

&mipi_csi{

    compatible = "fsl,imx6q-mipi-csi2";

    status = "okay";

    ipu_id = <0>;

    csi_id = <1>;

    v_channel = <0>;

    lanes = <2>;

};

Thanking you.

Labels (4)
0 Kudos
1 Solution
3,130 Views
sindhujakapugan
Contributor III

We are trying to interface OV5640 camera using the MIPI interface on to a iMX6 processor.

We find that the camera is getting correctly detected in i2C with the correct I2C id (as 0x3c). We found this out by running the i2c detect command and it reports the 3C device on the i2C bus it has been connected.

However, when booting the image (We are using the standard OV5640 device driver that is coming with Linux kernel 3.x), we get the following error message:

ov5640_read_reg: write reg error:reg=300a

ov5640_probe: cannot find camera

On inspecting the code, we find that this error message is coming because of the fact either the i2c read was not successful or the value in the register address 300a was not 0x56. Since we are able to detect this device successfully in i2c detect, can we safely assume that there is no problem in reading on i2c bus?

If I comment this section out for checking the High Byte and Low Byte, it goes further below and gives the error in the next i2C command as follows:

ov5640_write_reg: write reg error reg=3103, val=13

Finally, we have the error reported as "v4l2 capture: slave not found"

View solution in original post

0 Kudos
8 Replies
3,131 Views
sindhujakapugan
Contributor III

We are trying to interface OV5640 camera using the MIPI interface on to a iMX6 processor.

We find that the camera is getting correctly detected in i2C with the correct I2C id (as 0x3c). We found this out by running the i2c detect command and it reports the 3C device on the i2C bus it has been connected.

However, when booting the image (We are using the standard OV5640 device driver that is coming with Linux kernel 3.x), we get the following error message:

ov5640_read_reg: write reg error:reg=300a

ov5640_probe: cannot find camera

On inspecting the code, we find that this error message is coming because of the fact either the i2c read was not successful or the value in the register address 300a was not 0x56. Since we are able to detect this device successfully in i2c detect, can we safely assume that there is no problem in reading on i2c bus?

If I comment this section out for checking the High Byte and Low Byte, it goes further below and gives the error in the next i2C command as follows:

ov5640_write_reg: write reg error reg=3103, val=13

Finally, we have the error reported as "v4l2 capture: slave not found"

0 Kudos
3,130 Views
igorpadykov
NXP Employee
NXP Employee

please try nxp linux found on

i.MX 6 Series Software and Development Tool|NXP

~igor

0 Kudos
3,130 Views
sindhujakapugan
Contributor III

ov5640_power_on: cannot get io voltage error

power is success

ov5640_read_reg:write reg error:reg=300a

retval  -1 CHIP_ID_HIGH 67

camera ov5640_mipi is not found

0 Kudos
3,130 Views
igorpadykov
NXP Employee
NXP Employee

Hi sindhuja

could you attach oscilloscope and check if there are i2c signals.

Best regards

igor

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

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

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

0 Kudos
3,130 Views
sindhujakapugan
Contributor III

Hi sir,

     we are using oscilloscope to check i2c signals some signals going on

Thankyou

0 Kudos
3,130 Views
igorpadykov
NXP Employee
NXP Employee

suggest to add debug printfs in ov5640_probe()

function in drivers/media/platform/mxc/capture/ov5640_mipi.c

to get more details about failure

~igor

0 Kudos
3,130 Views
sindhujakapugan
Contributor III

Hi sir,

Here is the attachments for SDA,SCL lines

ThankyouCAMERA 1.png

0 Kudos
3,130 Views
sindhujakapugan
Contributor III

CAMERA2.bmp

0 Kudos