we don't offer exiting driver code for mt9p031, but you can refer to the
Chapter 7 Supporting the i.MX 6 Camera Sensor Interface CSI0 of porting guide.
you also can refer to the Reference Manual to set the correct register to your camera. I also send the linux Reference Manula to you for reference, you can find other camera driver's path in the bsp.