<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ov5640 camera RAW10 format on i.MX8MM  in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946343#M141552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I'm trying to configure ov5640 camera on the i.MX8MM platform to work in RAW 10-bit mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I'm using a custom board board with Android based on the p9.0.0-1.0.0_ga release from NXP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I configured the ov5640 to work in 10-bit mode and output RAW BGGR format by setting the following registers in the camera driver (ov5640_mipi_v2.c):&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x3034, 0x1A, 0, 0}, // MIPI mode: 10-bit&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x4300, 0x00, 0, 0}, // Output data format: RAW BGGR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x501F, 0x03, 0, 0}, // ISP Format: ISP RAW (DPC)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I also added the RAW 10 media bus format to the supported colour formats in the ov5640 driver:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;static const struct ov5640_datafmt ov5640_colour_fmts[] = {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{MEDIA_BUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG},&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{MEDIA_BUS_FMT_SBGGR10_1X10, V4L2_COLORSPACE_RAW}&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I added support for the V4L2_PIX_FMT_SBGGR10 format in mx6s_capture.c driver. I also configured the following registers, based on what is reported in the i.MX8M Mini reference manual:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;- CSI_CSICR1: set bit 0 (PIXEL_BIT) to 1 (i.e. 10-bit per pixel)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;- CSI_CSICR18: set bits 25~30 (MIPI_DATA_FORMAT) to 0x2B (i.e. RAW10 format)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;With this configuration, resulting raw image is very noisy (see attached image).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;By looking at the interrupts, I can see multiple `32e30000.mipi_csi` interrupts firing when the frame is captured. By enabling additional debug in the mxc_mipi_csi.c driver, I noticed these interrupts signal multiple errors on the bus:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;[&amp;nbsp;&amp;nbsp; 84.310700] ov5640_mipisubdev 5-003c: s_stream: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.380096] CRC Error: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.382639] Frame Start: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.385425] CRC Error: 2&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.387986] CRC Error: 3&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.390568] CRC Error: 4&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.393153] CRC Error: 5&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.395735] CRC Error: 6&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.398313] CRC Error: 7&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.400885] CRC Error: 8&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.403464] CRC Error: 9&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.406022] CRC Error: 10&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.408675] CRC Error: 11&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.411343] CRC Error: 12&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.413980] CRC Error: 13&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.416643] CRC Error: 14&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.419305] CRC Error: 15&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.421947] CRC Error: 16&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.424624] CRC Error: 17&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.427278] Lost Frame Start Error: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.430944] CRC Error: 18&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.433563] Frame End: 1&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Do you have any advice on how to further debug this issue? Is there any other register I'm missing for configuring 10-bit mode for the MIPI CSI bus?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Laura&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jul 2019 16:13:40 GMT</pubDate>
    <dc:creator>lauranao</dc:creator>
    <dc:date>2019-07-05T16:13:40Z</dc:date>
    <item>
      <title>Ov5640 camera RAW10 format on i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946343#M141552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I'm trying to configure ov5640 camera on the i.MX8MM platform to work in RAW 10-bit mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I'm using a custom board board with Android based on the p9.0.0-1.0.0_ga release from NXP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I configured the ov5640 to work in 10-bit mode and output RAW BGGR format by setting the following registers in the camera driver (ov5640_mipi_v2.c):&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x3034, 0x1A, 0, 0}, // MIPI mode: 10-bit&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x4300, 0x00, 0, 0}, // Output data format: RAW BGGR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;{0x501F, 0x03, 0, 0}, // ISP Format: ISP RAW (DPC)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I also added the RAW 10 media bus format to the supported colour formats in the ov5640 driver:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;static const struct ov5640_datafmt ov5640_colour_fmts[] = {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{MEDIA_BUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG},&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{MEDIA_BUS_FMT_SBGGR10_1X10, V4L2_COLORSPACE_RAW}&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;I added support for the V4L2_PIX_FMT_SBGGR10 format in mx6s_capture.c driver. I also configured the following registers, based on what is reported in the i.MX8M Mini reference manual:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;- CSI_CSICR1: set bit 0 (PIXEL_BIT) to 1 (i.e. 10-bit per pixel)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;- CSI_CSICR18: set bits 25~30 (MIPI_DATA_FORMAT) to 0x2B (i.e. RAW10 format)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;With this configuration, resulting raw image is very noisy (see attached image).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;By looking at the interrupts, I can see multiple `32e30000.mipi_csi` interrupts firing when the frame is captured. By enabling additional debug in the mxc_mipi_csi.c driver, I noticed these interrupts signal multiple errors on the bus:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;[&amp;nbsp;&amp;nbsp; 84.310700] ov5640_mipisubdev 5-003c: s_stream: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.380096] CRC Error: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.382639] Frame Start: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.385425] CRC Error: 2&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.387986] CRC Error: 3&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.390568] CRC Error: 4&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.393153] CRC Error: 5&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.395735] CRC Error: 6&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.398313] CRC Error: 7&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.400885] CRC Error: 8&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.403464] CRC Error: 9&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.406022] CRC Error: 10&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.408675] CRC Error: 11&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.411343] CRC Error: 12&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.413980] CRC Error: 13&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.416643] CRC Error: 14&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.419305] CRC Error: 15&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.421947] CRC Error: 16&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.424624] CRC Error: 17&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.427278] Lost Frame Start Error: 1&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.430944] CRC Error: 18&lt;BR /&gt;[&amp;nbsp;&amp;nbsp; 84.433563] Frame End: 1&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Do you have any advice on how to further debug this issue? Is there any other register I'm missing for configuring 10-bit mode for the MIPI CSI bus?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 0pt; margin-bottom: 0pt;"&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: transparent; font-weight: 400; text-decoration: none;"&gt;Laura&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2019 16:13:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946343#M141552</guid>
      <dc:creator>lauranao</dc:creator>
      <dc:date>2019-07-05T16:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ov5640 camera RAW10 format on i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946344#M141553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laura&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try with linux&lt;/P&gt;&lt;P&gt;linux/arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts?h=imx_4.14.98_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dts?h=imx_4.14.98_2.0.0_ga"&gt;fsl-imx8mm-evk.dts\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/505857"&gt;https://community.nxp.com/thread/505857&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2019 23:38:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946344#M141553</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-07-05T23:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ov5640 camera RAW10 format on i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946345#M141554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;BR /&gt;I tried switching to Linux and capturing some RAW8 and RAW10 frames using v4l-utils as follows:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;v4l2-ctl -d /dev/video0 --verbose --set-fmt--video=width=2592,height=1944,pixelformat=BA81 --stream-mmap --stream-count=1 --stream-to=raw8_2592x1944.raw&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=2592,height=1944,pixelformat=BG10 --stream-mmap --stream-count=1 --stream-to=raw10_2592x1944.raw&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unfortunately raw images are still not looking right (see screenshots attached, after I converted the raw captures from bayer to rgb). CRC errors like the ones below are reported in the kernel log when the frame is captured, both for 8-bit and 10-bit formats: &lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;6,15197,289730726,-;mxc_mipi-csi.0: CRC Error: 1&lt;BR /&gt;6,15198,289730734,-;mxc_mipi-csi.0: Frame Start: 1&lt;BR /&gt;6,15199,289730738,-;mxc_mipi-csi.0: status: 01000002&lt;BR /&gt;6,15200,289730773,-;mxc_mipi-csi.0: CRC Error: 2&lt;BR /&gt;6,15201,289730778,-;mxc_mipi-csi.0: status: 00000002&lt;BR /&gt;6,15202,289730795,-;mxc_mipi-csi.0: CRC Error: 3&lt;BR /&gt;6,15203,289730799,-;mxc_mipi-csi.0: status: 00000002&lt;BR /&gt;6,15204,289730809,-;mxc_mipi-csi.0: CRC Error: 4&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do you have any insight on what might be causing these CRC errors on Linux during 8-bit raw capture too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the board I'm using, different drivers are selected for ov5640 and MIPI CSI controller than the one for the imx8mm-evk, specifically ov5640_mipi_v2, mx6s_capture and mxc_mipi_csi. Apart from this, configuration for the csi endpoint in the device tree looks pretty much the same as the one in the imx8mm-evk dt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the discussion on the second link, I already modified the register suggested for enabling bayer format (cr18 register).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you aware of any specific PLL configuration for 10-bit MIPI mode? Not sure, but I'm guessing that might be a possible cause for the images being corrupted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 08:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946345#M141554</guid>
      <dc:creator>lauranao</dc:creator>
      <dc:date>2019-07-15T08:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ov5640 camera RAW10 format on i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946346#M141555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laura&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you try with latest Linux L4.19.35&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.19.35_1.0.0" title="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.19.35_1.0.0"&gt;linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 11:04:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946346#M141555</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-07-15T11:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ov5640 camera RAW10 format on i.MX8MM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946347#M141556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Laura&lt;/P&gt;&lt;P&gt;Any success on this? We are trying this as well with our own interpreter but not having good success decoding the bitstream that comes back to us.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2019 20:51:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ov5640-camera-RAW10-format-on-i-MX8MM/m-p/946347#M141556</guid>
      <dc:creator>drgeneral</dc:creator>
      <dc:date>2019-12-17T20:51:31Z</dc:date>
    </item>
  </channel>
</rss>

