Problem with OV6540 MIPI camera

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem with OV6540 MIPI camera

768 次查看
shree97
Contributor II

Hello all,

I am trying to interface the OV5640MIPI camera with our custom board running on i-MX6 solo.In our schematics below signals are coming to MIPI connector from processor:

1)MIPI_CSI_CLK0_N

2)MIPI_CSI_CLK0_P

3)MIPI_CSI_D0_N

4)MIPI_CSI_D0_P

5)MIPI_CSI_D1_N

6)MIPI_CSI_D1_P

7)CAM_PWR_EN(GPIO) from pad CSI0_DAT18

8)CAM_PWDN_3V3 (GPIO) from pad CSI0_DAT14

9)CAM_RESET_3V3(GPIO) from pad CSI0_DAT15

After that I referred many device tree files but I didn't find this pin muxing in any DTSI file which are using MIPI camera.Instead of that I found below pin-muxing in every dtsi file which are using MIPI camera:

pinctrl_ipu1_2: ipu1grp-2 { /* parallel camera */

            fsl,pins = <

                MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000

                MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000

                MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000

                MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000

                MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000

                MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000

                MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000

                MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000

                MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000

                MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000

                MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000

                MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000

            >;

        };

So my question is are this Pin muxing is necessary for MIPI camera to work ? In our schematics this pads are ued for other functionalities like UART,I2S,GPIO etc, So is it causing problem.

By referring all these DTSI files I modified my DTSI file as below:

pinctrl_ipu1_2: ipu1grp-2 { /* parallel camera */

            fsl,pins = <

                MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000

                MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000

                MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000

                MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000

                MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000

                MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000

                MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000

                MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000

                MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000

                MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000

                MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000

                MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000

            >;

        };

&i2c3 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c3>;

    status = "okay";

   

    ft5x06_ts@38 {

        compatible = "ft5x06-ts";

        reg = <0x38>;

                interrupts-extended = GPIRQ_I2C3_J7;

        wakeup-gpios = GP_I2C3_J7;

    };

    ov5640_mipi: ov5640_mipi@3c { /* i2c2 driver */

        compatible = "ovti,ov5640_mipi";

        reg = <0x3c>;

        //pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ipu1_2>;

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

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

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

                        rev B board is VGEN5 */

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

        pwn-gpios = <&gpio6 00 1>;   /* active low: SD1_CLK */

        rst-gpios = <&gpio6 01 0>;   /* active high: SD1_DAT2 */

        csi_id = <1>;

        mclk = <24000000>;

        mclk_source = <0>;

    };

};

&i2c3 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c3>;

    status = "okay";

   

    ft5x06_ts@38 {

        compatible = "ft5x06-ts";

        reg = <0x38>;

                interrupts-extended = GPIRQ_I2C3_J7;

        wakeup-gpios = GP_I2C3_J7;

    };

    ov5640_mipi: ov5640_mipi@3c { /* i2c2 driver */

        compatible = "ovti,ov5640_mipi";

        reg = <0x3c>;

        //pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ipu1_2>;

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

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

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

                        rev B board is VGEN5 */

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

        pwn-gpios = <&gpio6 00 1>;   /* active low: SD1_CLK */

        rst-gpios = <&gpio6 01 0>;   /* active high: SD1_DAT2 */

        csi_id = <1>;

        mclk = <24000000>;

        mclk_source = <0>;

    };

};

&mipi_csi {

    status = "okay";

    ipu_id = <0>;

    csi_id = <1>;

    v_channel = <0>;

    lanes = <2>;

};

but its giving below errors after inserting ov5640_camera_mipi.ko

ov5640_read_reg:write reg error:reg=300a                                  

camera ov5640_mipi is not found

Kindly help regarding this issue.

Thanks & Regards,

Shrikant

标记 (2)
0 项奖励
回复
0 回复数