AnsweredAssumed Answered

How to configure i.MX6Q to support camera parallel with greyscale 16-bit input data?

Question asked by liam Tien on Aug 13, 2018
Latest reply on Aug 13, 2018 by liam Tien
  • According to iMX6-IPU.pdf, camera parallel supports grayscale 16-bit data input, but why IPUx_CSI0_SENS_CONF register's bit 10–8 (CSI0_SENS_DATA_FORMAT) doesn't support grayscale 16-bit data input?

    Table 37-2. Data Formats Supported By The Camera Port

    Gray scale 8 bits  Yes

    Gray scale 16 bits  Written to the MSB of a 16-bit word


    Data format from the sensor. This field defines the data format for the input of the CSI sensor.


    000 full RGB or YUV444

    001 YUV422 (YUYV...)

    010 YUV422 (UYVY...)

    011 Bayer or Generic data

    100 RGB565

    101 RGB555

    110 RGB444

    111 JPEG

  16 bit camera support

    16 bit RGB as generic data

    In this mode the CSI receives 3 components per cycle. If the external device is 24bit -

    the user can get connect a 16 bit sample of it (such as RGB565) The CSI is

    programmed to accept the data as 16 bit generic data.

    When the data is read back from the memory for further processing

    in the IPU it will be read as 16 bit RGB data. The IDMAC's mapping unit will be used

    to remap the 16 bit data to the internal 24bpp RGB format

      I follows above description to configure it to "16 bit RGB as generic data" mode. In hardware, our FPGA connects i.MX6Q with 8 data pins. FPGA sends 1-byte greyscale data twice,  i.e 16-bit per pixel.

  • I am using Linux kernel v4.1.44, it is default to support YUYV format and can work.

  • The attached p0.jpg is the captured picture. The left is FPGA's original input picture, the right is i.MX6Q captures and saved picture.

  • The attached grey16.raw is the log file dumped from _ipu_ch_param_dump() which is called by ipu_init_channel_buffer() in ipu_common.c.

  • How to modify my drivers? any patch I can reference?  Thank a lot in advcance!