===================================================================
@@ -1181,8 +1181,9 @@
case VPFE_BT656_10BIT:
case VPFE_YCBCR_SYNC_8:
ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_8BIT;
ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_CBYCRY;
+ ccdc_cfg.ycbcr.ycswap = params->ycswap;
break;
case VPFE_BT1120:
case VPFE_YCBCR_SYNC_16:
ccdc_cfg.ycbcr.pix_fmt = CCDC_PIXFMT_YCBCR_16BIT;
@@ -1285,9 +1286,11 @@
modeset |=
((VPFE_PINPOL_NEGATIVE & CCDC_VD_POL_MASK)
<< CCDC_VD_POL_SHIFT);
regw(3, REC656IF);
- ccdcfg = ccdcfg | CCDC_DATA_PACK8 | CCDC_YCINSWP_YCBCR;
+ ccdcfg = ccdcfg | CCDC_DATA_PACK8;
+ if(params->ycswap == VPFE_DATA_Y)
+ ccdcfg |= CCDC_YCINSWP_YCBCR;
break;
case VPFE_BT656_10BIT:
if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
dev_dbg(dev, "Invalid pix_fmt(input mode)\n");
@@ -1308,9 +1311,10 @@
break;
case VPFE_YCBCR_SYNC_8:
ccdcfg |= CCDC_DATA_PACK8;
- ccdcfg |= CCDC_YCINSWP_YCBCR;
+ if(params->ycswap == VPFE_DATA_Y)
+ ccdcfg |= CCDC_YCINSWP_YCBCR;
if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
dev_dbg(dev, "Invalid pix_fmt(input mode)\n");
return -EINVAL;
}
===================================================================
@@ -39,13 +39,19 @@
/* BT656 - 10 bit */
VPFE_BT656_10BIT
};
+enum vpfe_data_swap {
+ VPFE_DATA_Y,
+ VPFE_DATA_C
+};
+
/* interface description */
struct vpfe_hw_if_param {
enum vpfe_hw_if_type if_type;
enum vpfe_pin_pol hdpol;
enum vpfe_pin_pol vdpol;
+ enum vpfe_data_swap ycswap;
};
#endif
#endif
===================================================================
@@ -497,8 +497,9 @@
.ccdc_if_params = {
.if_type = VPFE_YCBCR_SYNC_8,
.hdpol = VPFE_PINPOL_POSITIVE,
.vdpol = VPFE_PINPOL_POSITIVE,
+ .ycswap = VPFE_DATA_C,
},
.board_info = {
I2C_BOARD_INFO("mt9d131", 0x48),
/* this is for PCLK rising edge */
===================================================================
@@ -674,8 +674,10 @@
/* interface HD polarity */
enum vpfe_pin_pol hd_pol;
/* ccdc pix order. Only used for ycbcr capture */
enum ccdc_pixorder pix_order;
+ /* ccdc data connection. 8 bit ycbcr data bus connection */
+ enum vpfe_data_swap ycswap;
/* ccdc buffer type. Only used for ycbcr capture */
enum ccdc_buftype buf_type;
};