Hi,
I suppose by raw you mean Bayer RGB, right?
Unfortunately i.MX6 doesn't convert Bayer format by hardware, so you will need to convert it using SW. If you already has the Bayer content into memory, I suggest you to use some SW like gstreamer or ffmpeg to make this conversion.
If you need to capture the Bayer data from a sensor, you can read the following threads:
https://community.nxp.com/thread/302769
https://community.nxp.com/thread/320618
https://community.nxp.com/thread/355469
https://community.nxp.com/thread/319780
If possible, I recommend to use a camera that sends a known format for i.MX like RGB or YUV. So you can leverage the i.MX IPU to process the image and let the CPU free.
Best regards,
Rogerio