Hi joanxie
The only register change I make between the working PAL and the non-working (scrolling) NTSC is to change register CSI_CSIIMAG_PARA (Addr: 3071_0034h) from ((720 << 16) | 576) for PAL, to ((720 << 16) | 480) for NTSC.
This change is made within module mx6s_capture.c (/drivers/media/platform/mxc/subdev). This register is first initialized to a default in function csi_init_interface()....
static void csi_init_interface(struct mx6s_csi_dev *csi_dev)
{
unsigned int val = 0;
unsigned int imag_para;
val |= BIT_SOF_POL;
val |= BIT_REDGE;
val |= BIT_GCLK_MODE;
val |= BIT_HSYNC_POL;
val |= BIT_FCC;
val |= 1 << SHIFT_MCLKDIV;
val |= BIT_MCLKEN;
__raw_writel(val, csi_dev->regbase + CSI_CSICR1);
// imag_para = (720 << 16) | 576; //PAL
imag_para = (720 << 16) | 480; //NTSC
__raw_writel(imag_para, csi_dev->regbase + CSI_CSIIMAG_PARA);
val = BIT_DMA_REFLASH_RFF;
__raw_writel(val, csi_dev->regbase + CSI_CSICR3);
}
and is then set as part of the negotiated supported image format as per function csi_set_imagepara()....
static void csi_set_imagpara(struct mx6s_csi_dev *csi, int width, int height)
{
int imag_para = 0;
unsigned long cr3 = __raw_readl(csi->regbase + CSI_CSICR3);
#ifdef DH_DEBUG2
printk("[MX6S_CAPTURE] %s : width = %d | height = %d\n", __func__, width, height);
#endif
imag_para = (width << 16) | height;
__raw_writel(imag_para, csi->regbase + CSI_CSIIMAG_PARA);
/* reflash the embeded DMA controller */
__raw_writel(cr3 | BIT_DMA_REFLASH_RFF, csi->regbase + CSI_CSICR3);
}
My DH_DEBUG2 printk(), above, confirms that the driver has set width=720 and height=480 for NTSC.