I've been asked to help to upload the doc in MPU support space. The doc describes some ideas about how to support a customer to enable a mipi-csi2 sensor connected with i.MX6DQ/6DL. Hope this may be helpful.
Thank you very much for a very helpful document! For item C.2, MIPI DPHY clock should match the camera sensor clock, I don't know which camera output clock mentioned here, mipi_clk, SCLK or something else.
If I understand that document correct you will need to use the MIPI_CLK as mipi clock, and then use the double of that (since it's DDR) as bitrate for looking up the value you need to set in CSI2_PHY_TST_CTRL1 (using the list in the document).
You will also need to set the MIPI Global timing register on the ov564x to match the PCLK.
Also, I've found that the clock from sensor must not be running when CSI2 is configured.
I've done this for OV5645 sensor (based on the Freescale OV5640 driver), I could share the code if you're interested. They should be very similar.
Since I modified OV5640 driver for another camera sensor which supports only 8 bit raw output format, MIPI_DT_RAW8 is used for mipi_csi2_set_datatype, and IPU_PIX_FMT_GENERIC for IPU setting.
However, I am not clear how this output format may affect IPU and CSI2 setting or another part. Could you advice me more?
From my limited knowledge I don't see any problems with using that, assuming that sensor is setup to use that format, mipi_csi2 and IPU (might need to add it to csi_enc_setup?).
From my experience, checking the CSI2 ERR1, ERR2 and PHY_STATE registers could provide some hints on where things go wrong.