AnsweredAssumed Answered

Add the adv7180 on imx6dl

Question asked by yanfeng li on Jan 5, 2016
Latest reply on Jan 6, 2016 by yanfeng li

Version is 4.4.2,I add the adv7180 device on IPU2 CSI1 ,but the board startup errors as shown in attachment.

modified board-imx6q_sabresd.c :

    

static void adv7180_pwdn(int pwdn)
{
        if (pwdn)
                gpio_set_value(SABRESD_CSI1_PWN, 1);
        else
                gpio_set_value(SABRESD_CSI1_PWN, 0);
}

 

static void mx6q_csi1_io_init(void)
{
        if (cpu_is_mx6q())
                mxc_iomux_v3_setup_multiple_pads(mx6q_sabresd_csi1_sensor_pads,
                        ARRAY_SIZE(mx6q_sabresd_csi1_sensor_pads));
        else if (cpu_is_mx6dl())
                mxc_iomux_v3_setup_multiple_pads(mx6dl_sabresd_csi1_sensor_pads,
                        ARRAY_SIZE(mx6dl_sabresd_csi1_sensor_pads));

 

        if (cpu_is_mx6q())
                mxc_iomux_set_gpr_register(1, 20, 1, 1);//by ruofeng
                //mxc_iomux_set_gpr_register(1, 19, 1, 1);
        else if (cpu_is_mx6dl())
                //mxc_iomux_set_gpr_register(13, 0, 3, 4);
                mxc_iomux_set_gpr_register(13, 3, 3, 4);
}

 

/*static struct fsl_mxc_tvin_platform_data adv7180_data = {
    .dvddio_reg    = NULL,
    .dvdd_reg    = NULL,
    .avdd_reg    = NULL,
    .pvdd_reg    = NULL,
    .pwdn        = adv7180_pwdn,
    .reset        = NULL,
    .cvbs        = true,
    .io_init    = mx6q_csi1_io_init,
};*/

 

static struct fsl_mxc_camera_platform_data adv7180_data = {
        .mclk = 24000000,
        .mclk_source = 0,
        .csi = 1,
        .io_init = mx6q_csi1_io_init,
        .pwdn = adv7180_pwdn,
};

 

static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
                         .....
#ifdef MYDEBUG
        {
                I2C_BOARD_INFO("adv7180", 0x21),
                .platform_data = (void *)&adv7180_data,
        },
#endif
};

 

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,
        },
#ifdef MYDEBUG
        {
                .csi = 1,
                .ipu = 1,
                .mclk_source = 0,
                .is_mipi = 0,
        },
#endif
};


static void __init mx6_sabresd_board_init(void)
{           ....

        imx6q_add_v4l2_capture(0, &capture_data[0]);
        imx6q_add_v4l2_capture(1, &capture_data[1]);
#ifdef MYDEBUG
        imx6q_add_v4l2_capture(2, &capture_data[2]);
#endif
           ....
}

 

Where is my wrong Or what's the problem I overlooked? HELP!

Attachments

Outcomes