ov5640 not working with imx53

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

ov5640 not working with imx53

1,401 Views
varmas
Contributor I

I working on a IMX53 board based on the IMX53-QSB HW and linaro-bsp(linux-2.6.35.3). I've connected OV5640 camera module on the CSI0 interface. The camera is not getting detected.

Looking at the kernel boot log. I can see that the I2C transfer is not successful.

I made a few modifications to the mx53_loco.c file and added a few lines(taken from mx53_smd.c) as shown below.

static struct mxc_camera_platform_data camera_data = {

    //.analog_regulator = "DA9052_LDO7",

    //.core_regulator = "DA9052_LDO9",

    .mclk = 24000000,

    .csi = 0,

};

static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {

    {

    .type = "mma8450",

    .addr = 0x1C,

     },

    {

    .type = "ov5640",

    .addr = 0x3C,

    .platform_data = (void *)&camera_data,

     },

};

 

I don't know what is missing. I've attached my interface diagram and the kernel boot logs. Added extra I2C debug messages to the log.

Can someone help me on this?

Original Attachment has been moved to: kern_log.txt.zip

Labels (3)
3 Replies

807 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Varma,

     Your setting in BSP file is correct !

     It seems that you are using MX53QSB-START-R board based on MC34708+I.MX535, On this board, due to the limitiation of hardware, MC34708 needs an independent I2C channle. It means if I2C1 is used for MC34708, other device can't be connected to I2C1 bus.

     So please change it to I2C2 or I2C3, or use 2 GPIO signals to emulate I2C bus for your OV5640 camera.

Regards,

Weidong

808 Views
varmas
Contributor I

Hi Weidong,

I changed to I2C3 channel and still have the same issue. I did a change to the ov5640_id to work on I2C3 as below.

static const struct i2c_device_id ov5640_id[] = {
    {"ov5640", 2},
    {},
};

I used i2cdetect to check whether the OV5640 got initialized on the I2C3 bus. It detects a device at address 0x3C as shown below.

pastedImage_4.png.

I still get error message in the boot-log as

pastedImage_0.png

Does this mean that the camera chip is getting detected but not responding? What could be the possible reason?

Regards

Varma

0 Kudos

808 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Varma,

     I2C3 on MX53QSB is pulled up to 3.3V High, I remember VDDIO of OV5640 should be 1.8V or 2.8V, if it's VDDIO=1.8v, CPU I2C3 can't communicate with ov5640 module. If it's VDDIO=2..8v, i2c2 should normally transmit data between CPU and OV5640 even if you don't use I2C level shifter.

     So please check VDDIO's voltage of OV5640 module.

regards,

Weidong

0 Kudos