<?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>i.MX Processors中的主题 OV5640 MIPI Driver Register Address</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1399208#M185801</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to use and configure the OV5640 camera througth the MIPI interface on IMX6Q.SABRE SD board.&lt;/P&gt;&lt;P&gt;I got some promblem with the driver file of the ov5640(drivers/media/paltform/mxc/capture/ov5640_mipi.c) provided by imx_4.14.98_2.3.0. In the driver file, I find some ov5640 register addresses are not descirbed or the function description is not same as the ov5640 datasheet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static void ov5640_set_virtual_channel(int channel)&lt;BR /&gt;{&lt;BR /&gt;u8 channel_id;&lt;/P&gt;&lt;P&gt;ov5640_read_reg(0x4814, &amp;amp;channel_id);&lt;BR /&gt;channel_id &amp;amp;= ~(3 &amp;lt;&amp;lt; 6);&lt;BR /&gt;ov5640_write_reg(0x4814, channel_id | (channel &amp;lt;&amp;lt; 6));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;the register address 0x4814 is decripted as DEBUG_MODE in the datasheet, but in the driver file is to set virtual channel. I can not figure out what the really usage of the register and that confuses me. I wonder wheather there is another rule to set the register which not metion in the manual.&lt;/P&gt;&lt;P&gt;Besides, there are also many registers are not metioned in the ov5640 datasheet but the driver write data to them. e.g. the underlined register address would be initailized, and I don't know what the driver do to the ov5640.&amp;nbsp;&lt;/P&gt;&lt;P&gt;//ov5640 init configuration&lt;/P&gt;&lt;P&gt;static struct reg_value &lt;U&gt;ov5640_init_setting_30fps_VGA&lt;/U&gt;[] = {&lt;/P&gt;&lt;P&gt;{0x3103, 0x11, 0, 0}, {0x3008, 0x82, 0, 5}, {0x3008, 0x42, 0, 0},&lt;BR /&gt;{0x3103, 0x03, 0, 0}, {0x3017, 0x00, 0, 0}, {0x3018, 0x00, 0, 0},&lt;BR /&gt;{0x3034, 0x18, 0, 0}, {0x3035, 0x14, 0, 0}, {0x3036, 0x38, 0, 0},&lt;BR /&gt;{0x3037, 0x13, 0, 0}, {0x3108, 0x01, 0, 0}, &lt;U&gt;{0x3630,&lt;/U&gt; 0x36, 0, 0&lt;U&gt;},&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;{0x3631,&lt;/U&gt; 0x0e, 0, 0&lt;U&gt;}&lt;/U&gt;, {0x3632, 0xe2, 0, 0}, {0x3633, 0x12, 0, 0},&lt;BR /&gt;{0x3621, 0xe0, 0, 0}, {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0},&lt;BR /&gt;{0x3715, 0x78, 0, 0}, {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0},&lt;BR /&gt;{0x3705, 0x1a, 0, 0}, {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0},&lt;BR /&gt;{0x3901, 0x0a, 0, 0}, {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0},&lt;BR /&gt;{0x3601, 0x33, 0, 0}, {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0},&lt;BR /&gt;{0x371b, 0x20, 0, 0}, {0x471c, 0x50, 0, 0}, {0x3a13, 0x43, 0, 0},......&lt;/P&gt;&lt;P&gt;//ov5640 init code&lt;/P&gt;&lt;P&gt;static int ov5640_init_mode(enum ov5640_frame_rate frame_rate,&lt;BR /&gt;enum ov5640_mode mode, enum ov5640_mode orig_mode)&lt;BR /&gt;{&lt;BR /&gt;......&lt;BR /&gt;if (mode == ov5640_mode_INIT) {&lt;BR /&gt;&lt;U&gt;pModeSetting = ov5640_init_setting_30fps_VGA&lt;/U&gt;;&lt;BR /&gt;ArySize = ARRAY_SIZE(ov5640_init_setting_30fps_VGA);&lt;/P&gt;&lt;P&gt;ov5640_data.pix.width = 640;&lt;BR /&gt;ov5640_data.pix.height = 480;&lt;BR /&gt;retval = ov5640_download_firmware(&lt;U&gt;pModeSetting&lt;/U&gt;, ArySize);&lt;BR /&gt;......&lt;BR /&gt;ov5640_set_virtual_channel(ov5640_data.csi);&lt;BR /&gt;...&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Wheather there are some other rules that I missed to configure the ov5640. Any information on this will be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 03:04:24 GMT</pubDate>
    <dc:creator>Gamer_Lee6</dc:creator>
    <dc:date>2022-01-14T03:04:24Z</dc:date>
    <item>
      <title>OV5640 MIPI Driver Register Address</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1399208#M185801</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying to use and configure the OV5640 camera througth the MIPI interface on IMX6Q.SABRE SD board.&lt;/P&gt;&lt;P&gt;I got some promblem with the driver file of the ov5640(drivers/media/paltform/mxc/capture/ov5640_mipi.c) provided by imx_4.14.98_2.3.0. In the driver file, I find some ov5640 register addresses are not descirbed or the function description is not same as the ov5640 datasheet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static void ov5640_set_virtual_channel(int channel)&lt;BR /&gt;{&lt;BR /&gt;u8 channel_id;&lt;/P&gt;&lt;P&gt;ov5640_read_reg(0x4814, &amp;amp;channel_id);&lt;BR /&gt;channel_id &amp;amp;= ~(3 &amp;lt;&amp;lt; 6);&lt;BR /&gt;ov5640_write_reg(0x4814, channel_id | (channel &amp;lt;&amp;lt; 6));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;the register address 0x4814 is decripted as DEBUG_MODE in the datasheet, but in the driver file is to set virtual channel. I can not figure out what the really usage of the register and that confuses me. I wonder wheather there is another rule to set the register which not metion in the manual.&lt;/P&gt;&lt;P&gt;Besides, there are also many registers are not metioned in the ov5640 datasheet but the driver write data to them. e.g. the underlined register address would be initailized, and I don't know what the driver do to the ov5640.&amp;nbsp;&lt;/P&gt;&lt;P&gt;//ov5640 init configuration&lt;/P&gt;&lt;P&gt;static struct reg_value &lt;U&gt;ov5640_init_setting_30fps_VGA&lt;/U&gt;[] = {&lt;/P&gt;&lt;P&gt;{0x3103, 0x11, 0, 0}, {0x3008, 0x82, 0, 5}, {0x3008, 0x42, 0, 0},&lt;BR /&gt;{0x3103, 0x03, 0, 0}, {0x3017, 0x00, 0, 0}, {0x3018, 0x00, 0, 0},&lt;BR /&gt;{0x3034, 0x18, 0, 0}, {0x3035, 0x14, 0, 0}, {0x3036, 0x38, 0, 0},&lt;BR /&gt;{0x3037, 0x13, 0, 0}, {0x3108, 0x01, 0, 0}, &lt;U&gt;{0x3630,&lt;/U&gt; 0x36, 0, 0&lt;U&gt;},&lt;/U&gt;&lt;BR /&gt;&lt;U&gt;{0x3631,&lt;/U&gt; 0x0e, 0, 0&lt;U&gt;}&lt;/U&gt;, {0x3632, 0xe2, 0, 0}, {0x3633, 0x12, 0, 0},&lt;BR /&gt;{0x3621, 0xe0, 0, 0}, {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0},&lt;BR /&gt;{0x3715, 0x78, 0, 0}, {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0},&lt;BR /&gt;{0x3705, 0x1a, 0, 0}, {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0},&lt;BR /&gt;{0x3901, 0x0a, 0, 0}, {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0},&lt;BR /&gt;{0x3601, 0x33, 0, 0}, {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0},&lt;BR /&gt;{0x371b, 0x20, 0, 0}, {0x471c, 0x50, 0, 0}, {0x3a13, 0x43, 0, 0},......&lt;/P&gt;&lt;P&gt;//ov5640 init code&lt;/P&gt;&lt;P&gt;static int ov5640_init_mode(enum ov5640_frame_rate frame_rate,&lt;BR /&gt;enum ov5640_mode mode, enum ov5640_mode orig_mode)&lt;BR /&gt;{&lt;BR /&gt;......&lt;BR /&gt;if (mode == ov5640_mode_INIT) {&lt;BR /&gt;&lt;U&gt;pModeSetting = ov5640_init_setting_30fps_VGA&lt;/U&gt;;&lt;BR /&gt;ArySize = ARRAY_SIZE(ov5640_init_setting_30fps_VGA);&lt;/P&gt;&lt;P&gt;ov5640_data.pix.width = 640;&lt;BR /&gt;ov5640_data.pix.height = 480;&lt;BR /&gt;retval = ov5640_download_firmware(&lt;U&gt;pModeSetting&lt;/U&gt;, ArySize);&lt;BR /&gt;......&lt;BR /&gt;ov5640_set_virtual_channel(ov5640_data.csi);&lt;BR /&gt;...&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Wheather there are some other rules that I missed to configure the ov5640. Any information on this will be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 03:04:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1399208#M185801</guid>
      <dc:creator>Gamer_Lee6</dc:creator>
      <dc:date>2022-01-14T03:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: OV5640 MIPI Driver Register Address</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1400719#M185939</link>
      <description>&lt;P&gt;for imx6 ov5640 mipi camera, I think you should refer to the driver as below:&lt;/P&gt;
&lt;P&gt;"&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/ov5640.c?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/ov5640.c?h=lf-5.10.y&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 07:03:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1400719#M185939</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2022-01-18T07:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: OV5640 MIPI Driver Register Address</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1401304#M185983</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Hi，joanxie&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your advise.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My OV5640 camera connects to the IMX6Q SABRESD board through J5 MIPI interface. It seems that if the driver is not &lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/ov5640_mipi.c?h=lf-5.10.y" target="_self"&gt;ov5640_mipi.c&lt;/A&gt; the camera cannot be found. And besides, there are still some register addresses unmentioned in the ov5640 datesheet but they are inside the driver for &lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/mxc/capture/ov5640.c?h=lf-5.10.y" target="_blank" rel="noopener"&gt;ov5640.c&lt;/A&gt;&amp;nbsp;just like I have talked about before. That still confuses me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, it is much appreciated for your advise and time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 03:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1401304#M185983</guid>
      <dc:creator>Gamer_Lee6</dc:creator>
      <dc:date>2022-01-19T03:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: OV5640 MIPI Driver Register Address</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1417961#M187392</link>
      <description>&lt;P&gt;for mipi driver is drivers/media/platform/mxc/capture/ov5640.c, and imx6q can support parallel camera and mipi camera, if you just uses one camera, don't forget disable another one&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 06:36:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OV5640-MIPI-Driver-Register-Address/m-p/1417961#M187392</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2022-02-23T06:36:25Z</dc:date>
    </item>
  </channel>
</rss>

