Hi,
Our custom design is based on i.MX535.
The design is almost based on Sabre Tablet Design with the peripheral changes alone. We are using Android R10.4 BSP as our reference BSP.
Have interfaced OV7675 Camera sensor via CSI0 interface to i.MX535 similar to the Sabre design.
As per this design CSI0_MCLK pad is used for CSI0_HSYNC functionality.
The only change with respect to Sabre design is that we have used CCM's CSI0_MCLK output @ pad NANDF_CS2 as the Sensor's system clock.
1. As soon as the CCM is configured, I find the clock overriding on the pad CSI0_MCLK (which is to be used as CSI0_HSYNC). Changing this pad configuration also did not help. Have anyone come across this issue? Pls advice how this can be avoided.
2. Why CCM's CSI0_MCLK is not used in Sabre / QSB? Any errata?
Regards,
Sridevi
For your question 1. Changing the IOMUX PAD configuration should be more than enough to do the trick, where are you modifing the PAD?, there is something like
arch/arm/mach-mx6/board-mx6q_sabrelite.c, but for the i.MX53 QSB board where it is located all the PADs configurations. You are going to find an structure :
static struct fsl_mxc_capture_platform_data capture_data[] = {
{
.csi = 0,
.ipu = 0,
.mclk_source = 0,
.is_mipi = 0,
}, {
.csi = 1,
.ipu = 0,
.mclk_source = 0,
.is_mipi = 1,
}, {
.csi = 1,
.ipu = 1,
.mclk_source = 0,
.is_mipi = 0,
},
};
static struct mipi_csi2_platform_data mipi_csi2_pdata = {
.ipu_id = 0,
.csi_id = 1,
.v_channel = 0,
.lanes = 2,
.dphy_clk = "mipi_pllref_clk",
.pixel_clk = "emi_clk",
};
static struct fsl_mxc_camera_platform_data mipi_csi2_data = {
.mclk = 24000000,
.mclk_source = 0,
.csi = 1,
.io_init = mx6q_mipi_sensor_io_init,
.pwdn = mx6q_mipi_powerdown,
};
static struct fsl_mxc_camera_platform_data camera_data = {
.mclk = 24000000,
.mclk_source = 0,
.csi = 0,
.io_init = mx6q_csi0_io_init,
.pwdn = mx6q_csi0_cam_powerdown,
};
static struct fsl_mxc_camera_platform_data camera2_data = {
.mclk = 24000000,
.mclk_source = 0,
.csi = 1,
.io_init = mx6q_csi1_io_init,
.pwdn = mx6q_csi1_cam_powerdown,
};
static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
I2C_BOARD_INFO("ov564x", 0x3c),
.platform_data = (void *)&camera_data,
},
};
static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
{
I2C_BOARD_INFO("ov5640_mipi", 0x3c),
.platform_data = (void *)&mipi_csi2_data,
},
};
static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
{
I2C_BOARD_INFO("ov564x", 0x3c),
.platform_data = (void *)&camera2_data,
},
};
In function mx6q_mipi_sensor_io_init():
if (cpu_is_mx6q())
mxc_iomux_set_gpr_register(1, 19, 1, 1);
In function mx6q_csi0_io_init():
if (cpu_is_mx6q())
mxc_iomux_set_gpr_register(1, 19, 1, 1);
In function mx6q_csi1_io_init():
if (cpu_is_mx6q())
mxc_iomux_set_gpr_register(1, 20, 1, 1);
In function mx6_sabresd_board_init():
imx6q_add_v4l2_capture(0, &capture_data[0]);
imx6q_add_v4l2_capture(1, &capture_data[1]);
imx6q_add_v4l2_capture(2, &capture_data[2]);
imx6q_add_mipi_csi2(&mipi_csi2_pdata);