what OS do you use? if linux, you can find the ipu_capture.c(IPU CSI capture base driver) and mxc_mipi_csi2.c(MIPI CSI driver source file), for more detailed inforamtion, pls download "i.MX Linux® Reference Manual" from official webiste for your interested bsp version.