adv7180 IPU1 csi0 改为IPU2 csi1
板子是官方的imx6Q sabreauto的,版本是用kk4.4.2 ,新手求各位前辈指教。。。各位前辈指教。。。
现在
在adv7180.c的adv7180_probe中改了
/* Set initial values for the sensor struct. */
memset(&adv7180_data, 0, sizeof(adv7180_data));
adv7180_data.sen.i2c_client = client;
adv7180_data.sen.streamcap.timeperframe.denominator = 30;
adv7180_data.sen.streamcap.timeperframe.numerator = 1;
adv7180_data.std_id = V4L2_STD_ALL;
video_idx = ADV7180_NOT_LOCKED;
adv7180_data.sen.pix.width = video_fmts[video_idx].raw_width;
adv7180_data.sen.pix.height = video_fmts[video_idx].raw_height;
adv7180_data.sen.pix.pixelformat = V4L2_PIX_FMT_UYVY; /* YUV422 */
//adv7180_data.sen.pix.pixelformat = V4L2_PIX_FMT_RGB565; /* by ruofeng add*/
adv7180_data.sen.pix.priv = 1; /* 1 is used to indicate TV in */
adv7180_data.sen.on = true;
adv7180_data.sen.csi = 1;//by ruofeng add
在board_mx6_sabreauto.c中
static struct fsl_mxc_capture_platform_data capture_data[] = {
{
//.csi = 0,
//.ipu = 0,
.csi = 1,//add by ruofeng
.ipu = 1,//add by ruofeng
.mclk_source = 0,
.is_mipi = 0,
}, {
.csi = 1,
.ipu = 0,
.mclk_source = 0,
.is_mipi = 1,
},
};
在board_mx6_sabreauto.h中
static iomux_v3_cfg_t mx6q_sabreauto_pads[] = {
......
/**by ruofeng*/
#if 0
/* ipu1 csi0 */
MX6Q_PAD_CSI0_DAT4__IPU1_CSI0_D_4,
MX6Q_PAD_CSI0_DAT5__IPU1_CSI0_D_5,
MX6Q_PAD_CSI0_DAT6__IPU1_CSI0_D_6,
MX6Q_PAD_CSI0_DAT7__IPU1_CSI0_D_7,
MX6Q_PAD_CSI0_DAT8__IPU1_CSI0_D_8,
MX6Q_PAD_CSI0_DAT9__IPU1_CSI0_D_9,
MX6Q_PAD_CSI0_DAT10__IPU1_CSI0_D_10,
MX6Q_PAD_CSI0_DAT11__IPU1_CSI0_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