<?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 I.MX6 : Using USB OTG without dynamic VBUS pin ? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377493#M54192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On our design based in i.MX6Q, we're using USB OTG (as host or as device). On this design, we have a OTG ID pin on i.MX6 (GPIO1) but no dynamic VBUS pin : this one is set to +5V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With our previous Linux kernel (3.0.35), it wasn't a problem. But with the new 3.10.31, it seems that the USB ChipIdea driver monitors the changes of VBUS pin in the OTG stage machine :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14222845233269505" jivemacro_uid="_14222845233269505" modifiedtitle="true"&gt;
&lt;P&gt;} else if (otg_int_src &amp;amp; OTGSC_AVVIS) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; hw_write_otgsc(ci, OTGSC_AVVIS, OTGSC_AVVIS);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (otgsc &amp;amp; OTGSC_AVV) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;a_vbus_vld = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; } else {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;a_vbus_vld = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;b_conn = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this kernel, the USB device is disconnected few milliseconds after detecting it, as the condition 'fsm-&amp;gt;a_vbus_vld = 1' cannot be generated as there is no change on VBUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So is there a way to get a working OTG with VBUS pin connected to +5V ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made this workaround in ci_hdrc_otg_fsm_init() :&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14222859087314519" jivemacro_uid="_14222859087314519"&gt;
&lt;P&gt;ci-&amp;gt;fsm.a_vbus_vld = hw_read_otgsc(ci, OTGSC_AVV) ? 1 : 0;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;So like this, 'fsm-&amp;gt;a_vbus_vld' reflects the correct state of VBUS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2015 15:26:07 GMT</pubDate>
    <dc:creator>frederic_coiffi</dc:creator>
    <dc:date>2015-01-26T15:26:07Z</dc:date>
    <item>
      <title>I.MX6 : Using USB OTG without dynamic VBUS pin ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377493#M54192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On our design based in i.MX6Q, we're using USB OTG (as host or as device). On this design, we have a OTG ID pin on i.MX6 (GPIO1) but no dynamic VBUS pin : this one is set to +5V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With our previous Linux kernel (3.0.35), it wasn't a problem. But with the new 3.10.31, it seems that the USB ChipIdea driver monitors the changes of VBUS pin in the OTG stage machine :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14222845233269505" jivemacro_uid="_14222845233269505" modifiedtitle="true"&gt;
&lt;P&gt;} else if (otg_int_src &amp;amp; OTGSC_AVVIS) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; hw_write_otgsc(ci, OTGSC_AVVIS, OTGSC_AVVIS);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (otgsc &amp;amp; OTGSC_AVV) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;a_vbus_vld = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; } else {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;a_vbus_vld = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsm-&amp;gt;b_conn = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this kernel, the USB device is disconnected few milliseconds after detecting it, as the condition 'fsm-&amp;gt;a_vbus_vld = 1' cannot be generated as there is no change on VBUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So is there a way to get a working OTG with VBUS pin connected to +5V ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made this workaround in ci_hdrc_otg_fsm_init() :&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14222859087314519" jivemacro_uid="_14222859087314519"&gt;
&lt;P&gt;ci-&amp;gt;fsm.a_vbus_vld = hw_read_otgsc(ci, OTGSC_AVV) ? 1 : 0;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;So like this, 'fsm-&amp;gt;a_vbus_vld' reflects the correct state of VBUS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 15:26:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377493#M54192</guid>
      <dc:creator>frederic_coiffi</dc:creator>
      <dc:date>2015-01-26T15:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX6 : Using USB OTG without dynamic VBUS pin ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377494#M54193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frederic ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Generally speaking, during hardware design, USB OTG VBUS should be connected to +5V, because it will work at dual role(Host or device).&lt;/P&gt;&lt;P&gt;Host :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBUS pin on CPU side can be connected to 5V or not.&lt;/P&gt;&lt;P&gt;Device :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBUS pin on CPU side must be connected to 5V from external USB host.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In software, user can get status of VBUS by reading corresponding bit in register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So I think your handing way on it is no problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Weidong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 07:40:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377494#M54193</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2015-01-27T07:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX6 : Using USB OTG without dynamic VBUS pin ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377495#M54194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Weidong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer. I agree with your hardware approach but in our case as the hardware is already done, my question was essentially about the Linux 3.10 support of this configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, my workaround gives me a good behaviour. So except if you have a better proposal, I think this question can be closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 13:01:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377495#M54194</guid>
      <dc:creator>frederic_coiffi</dc:creator>
      <dc:date>2015-01-27T13:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: I.MX6 : Using USB OTG without dynamic VBUS pin ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377496#M54195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, Frederic,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; you can press "correct " or "helpful" button, then the question will be signed as "closed".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Weidong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 04:53:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/I-MX6-Using-USB-OTG-without-dynamic-VBUS-pin/m-p/377496#M54195</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2015-01-29T04:53:45Z</dc:date>
    </item>
  </channel>
</rss>

