AnsweredAssumed Answered

i.MX6Q with Deserializer/Serializer/MIPI Camera OV5640

Question asked by Dustin Zhu on Sep 19, 2017
Latest reply on Sep 25, 2017 by Dustin Zhu

Hi Guys,


I'm working on self-design hardware referred to i.MX6Q SabreLite and software  based on Yocto Project with Kernel  4.1.15. Right now Deserializer is connected to SoC with MIPI of 4 Lanes directly. Camera (2 MIPI Lanes) is connected to Serializer which connecting to Deserializer via a STP cable.


In test case, I did not connect serializer and use internal pattern generator of Deserialize to output frames with 1280x720 30FPS RGB888.

Writing an application with V4L2 IOCTL to capture and save the frame, but it always failed. I found  register MIPI_CSI_ERR1 is not 0 and Dphy state was not jumping between 0x300 and 0x3f0.


mipi_reg[MIPI_CSI_ERR1 ]=0xf
datatype = 0x24
error2[MIPI_CSI_ERR2] = 0xaf90
status[ MIPI_CSI_PHY_STATE ] = 0x6f0


As for Kernel code, I modified the code based on ov5640_mipi.c.

1. Change lane number from 2 to 4.

2. Change pixelformat to V4L2_PIX_FMT_RGB24, and MIPI support

+ mipi_csi2_set_datatype(mipi_csi2_info, MIPI_DT_RGB888);

3. Change MIPI CSI2 Clock

- mipi_csi2_write(info, 0x00000014, MIPI_CSI2_PHY_TST_CTRL1);
+ mipi_csi2_write(info, 0x00000004, MIPI_CSI2_PHY_TST_CTRL1); // 1280x720 30fps RGB888 12Bit


Could you give me some advice?