I had the same question but figured it out from the kernel source and IMX6 and IMX7 datasheets.
One part of the confusion stems from the inappropriate file placement and naming. The second part of the confusion stems from the fact that the IMX6 supports IPU and virtual channel muxing, whereas the IMX7 has only VC0 and is hardwired (cost-down perhaps?). On top of that, the CSI2 registers of the IMX6 and IMX7 are different and incompatible. However, the CSI peripheral does have identical registers for IMX6 and IMX7. For both IMX6 and IMX7 the CSI2 is always routed through the CSI, and not directly accessible. Hence you need both CSI2 and CSI drivers.
To sort this mess out, somehow, we ended up with the the following drivers:
CSI driver for IMX6, IMX7.
./drivers/media/platform/mxc/subdev/mx6s_capture.c
CSI2 driver for IMX7
./drivers/media/platform/mxc/subdev/mxc_mipi_csi.c
CSI2 driver for IMX6
./drivers/mxc/mipi/mxc_mipi_csi2.c
./include/linux/mipi_csi2.h
And of course, because the software API is different, the OV drivers are duplicated as well....
For the IMX7 interface (which is cleaner, using V4L -> CSI2)
./drivers/media/platform/mxc/subdev/ov5640_mipi.c
./drivers/media/platform/mxc/subdev/ov5640.c
For the IMX6 interface (nasty, couples directly to mxc_mipi_csi2)
./drivers/media/platform/mxc/capture/ov5640_mipi.c
./drivers/media/platform/mxc/capture/ov5640.c
Hope this helps anyone else having the same question...