Integrating custom camera sensor with i.MX8M

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Integrating custom camera sensor with i.MX8M

Contributor III

Hi NXP Team,

I am integrating the sony i.MX219 sensor with i.MX8M Plus. It is a RAW10 and RAW8 sensor, for now we are not targetting ISP and just focusing on capturing raw images.

Some Insights:

  1. We are using only MIPI lines and I2C lines in our design. There is no other reset, power down or master clock line associated with camera.
  2. As the camera is RAW sensor, I have added the support of RAW10 and RAW8 in ISI and MIPI CSI driver. (Changes are in attachment)
  3. Using the "mx8_v4l2_cap_drm.out" utility available in "unit-test/V4L2" to verify the RAW10/RAW8 dump. It was not supporting RAW10 and RAW8, so I have also modified the utility as well to support RAW format. (Changes are in attachment)

Command used for raw dump:

  1. ./mx8_v4l2_cap_drm.out -cam 1 -d /dev/video1 -num 1 -of -ow 640 -oh 480 -fr 30 -fmt GBRG10
  2. ./mx8_v4l2_cap_drm.out -cam 1 -d /dev/video1 -num 1 -of -ow 640 -oh 480 -fr 30 -fmt GBRG8


  1. dts.txt - Device tree node for sensor and MIPI CSI.
  2. imx219_logs.txt - Kernel mipi logs and media-ctl, v4l2 related device information
  3. 0001-Added-support-of-RAW10-and-RAW8-in-MIPI-CSI-and-ISI.patch - Changes in Kernel Driver
  4. 0001-Modified-mx8_v4l2_cap_drm-utility-for-adding-RAW-sen.patch - Changes in mx8_v4l2_cap_drm.c utility.
  5. 0.GBRG8_480p.raw - Image with RAW8 dump
  6. 0.GBRG10_480p - Image with RAW10 dump


  1. In device tree, we have this "csis-hs-settle", "csis-clk-settle" and "csis-wclk" property. Can you please help us in identifying which value should be placed here? I found the Table for mipi clock frequency in forum, however, that was for i.MX7D and not i.MX8MPlus. Can you suggest which value should we keep here?
  2. For RAW10 I have modified in ISI and the depth is kept as 16 bit. Is it proper? Is anything needs to be added anywhere in kernel to add support for RAW10/RAW8 sensor apart form the changes I did?
  3. From the RAW dump file you can see that out of 480p I am only able to get the 120 lines. Rest of the image lines are totally black. Can it be due to hs-settle configuration?
  4. Is the utility appropriate to test the RAW dump, or some other commands/method should be used?

Any In-line pointers on above questions will be much helpful, as I am stuck with ISI and looking for suggestions ASAP. Thanks in advance.




0 Kudos
3 Replies

Contributor III

Hi Team,


After adding the support for RAW in ISI and MIPI driver with some modifications I am able to capture the image. We can close this ticket.




0 Kudos

Contributor III

Hi kunal,

I'm facing the exact same issue as yours, where the image captured contains only one fourth of the data while the remaining pixel data  is completely dark.

can you please share the modifications you made to get proper image.

Thanks and regards,



0 Kudos

Contributor II


Hi Kunal,

Please help to share the kernel modification you have done later.

I am also facing same problem.


Best Regards,


0 Kudos