Add the adv7180 on imx6dl

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

Add the adv7180 on imx6dl

Jump to solution
1,633 Views
542411838
Contributor I

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!

Labels (1)
0 Kudos
1 Solution
980 Views
igorpadykov
NXP Employee
NXP Employee

Hi yanfeng

i.MX6DL has only one IPU1, for ADV7180 examples one can look at

https://community.freescale.com/thread/310477

https://community.freescale.com/message/314760#314760

Best regards

igor

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

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

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

View solution in original post

0 Kudos
3 Replies
981 Views
igorpadykov
NXP Employee
NXP Employee

Hi yanfeng

i.MX6DL has only one IPU1, for ADV7180 examples one can look at

https://community.freescale.com/thread/310477

https://community.freescale.com/message/314760#314760

Best regards

igor

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

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

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

0 Kudos
509 Views
wanbenzhou
Contributor II

这个链接不存在了, 我也有IMX6U/IMX6DL 驱动ADV7180的问题, 6S/6D都没有问题, 6U就花屏

0 Kudos
980 Views
542411838
Contributor I

Hi igorpadykov

Thank you very much for your help, my problem solved!

0 Kudos