(a general request: could you please configure your mailer to wrap lines at somewhere around 70 characters?) On Tue, 18 Jan 2011, Qing Xu wrote: > Hi, > > Our chip support both MIPI and parallel interface. The HW connection logic is > sensor(such as ov5642) -> our MIPI controller(handle DPHY timing/ CSI-2 > things) -> our camera controller (handle DMA transmitting/ fmt/ size > things). Now, I find the driver of sh_mobile_csi2.c, it seems like a > CSI-2 driver, but I don't quite understand how it works: > 1) how the host controller call into this driver? This is a normal v4l2-subdev driver. Platform data for the sh_mobile_ceu_camera driver provides a link to CSI2 driver data, then the host driver loads the CSI2 driver, which then links itself into the subdevice list. Look at arch/arm/mach-shmobile/board-ap4evb.c how the data is linked: static struct sh_mobile_ceu_info sh_mobile_ceu_info = { .flags = SH_CEU_FLAG_USE_8BIT_BUS, .csi2_dev = &csi2_device.dev, }; and in the hosz driver drivers/media/video/sh_mobile_ceu_camera.c look in the sh_mobile_ceu_probe function below the lines: csi2 = pcdev->pdata->csi2_dev; if (csi2) { ... > 2) how the host controller/sensor negotiate MIPI variable with this > driver, such as D-PHY timing(hs_settle/hs_termen/clk_settle/clk_termen), > number of lanes...? Since I only had a limited number of MIPI setups, I haven't implemented maximum flexibility. A part of the parameters is hard-coded, another part is provided in the platform driver, yet another part is calculated dynamically. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html