@@ -105,6 +105,7 @@ static struct isif_oper_config {
.hd_pol = VPFE_PINPOL_POSITIVE,
.pix_order = CCDC_PIXORDER_CBYCRY,
.buf_type = CCDC_BUFTYPE_FLD_INTERLEAVED,
+ .ycswap = YCIN_NOT_SWP,
},
.bayer = {
.pix_fmt = CCDC_PIXFMT_RAW,
@@ -864,6 +865,7 @@ static void isif_setfbaddr(unsigned long addr)
static int isif_set_hw_if_params(struct vpfe_hw_if_param *params)
{
isif_cfg.if_type = params->if_type;
+ isif_cfg.ycbcr.ycswap = params->ycswap;
switch (params->if_type) {
case VPFE_BT656:
@@ -914,7 +916,9 @@ static int isif_config_ycbcr(void)
}
modeset |= (VPFE_PINPOL_NEGATIVE << ISIF_VD_POL_SHIFT);
regw(3, REC656IF);
- ccdcfg = ccdcfg | ISIF_DATA_PACK8 | ISIF_YCINSWP_YCBCR;
+ ccdcfg = ccdcfg | ISIF_DATA_PACK8;
+ if (params->ycswap == YCIN_SWP)
+ ccdcfg |= ISIF_YCINSWP_YCBCR;
break;
case VPFE_BT656_10BIT:
if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
@@ -466,6 +466,8 @@ struct isif_ycbcr_config {
enum vpfe_pin_pol hd_pol;
/* isif 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;
/* isif buffer type. Only used for ycbcr capture */
enum ccdc_buftype buf_type;
};
@@ -40,12 +40,20 @@ enum vpfe_hw_if_type {
VPFE_BT656_10BIT
};
+/* 8 bit interface can be swapped */
+enum vpfe_data_swap {
+ YCIN_NOT_SWP,
+ YCIN_SWP,
+};
+
/* 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