<?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 Generate USB device detach event in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700432#M108796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using U-Boot's USB Gadget stack for a USB client protocol implementation generates a proper USB disconnect on i.MX 6 devices, however, on i.MX 7 it does not generate a USB disconnect. This seem to cause issues on some hosts for subsequent USB reenumeration, hence I am trying to understand why i.MX 7 behaves differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understand the USB disconnect is generated by udc_disconnect in drivers/usb/gadget/ci_udc.c by writing a 0 to USBCMD RS field. According to the i.MX 6 and 7 Reference Manual this should cause a disconnect&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Device operation mode:&lt;BR /&gt;Writing a one to this bit will cause the controller to enable a pull-up on D+ and initiate an attach event. This&lt;BR /&gt;control bit is not directly connected to the pull-up enable, as the pull-up will become disabled upon&lt;BR /&gt;transitioning into high-speed mode. Software should use this bit to prevent an attach event before the&lt;BR /&gt;controller has been properly initialized. Writing a 0 to this will cause a detach event.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It just seems that this does not work on i.MX 7... How can I properly cause a detach even on i.MX 7?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I also noticed is that in the i.MX 7 Reference Manaul some register are described in the USB-PHY chapter 11.5, however, a register map&amp;nbsp;for the USB PHY seems to be missing....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2017 21:36:44 GMT</pubDate>
    <dc:creator>falstaff</dc:creator>
    <dc:date>2017-08-16T21:36:44Z</dc:date>
    <item>
      <title>Generate USB device detach event</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700432#M108796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using U-Boot's USB Gadget stack for a USB client protocol implementation generates a proper USB disconnect on i.MX 6 devices, however, on i.MX 7 it does not generate a USB disconnect. This seem to cause issues on some hosts for subsequent USB reenumeration, hence I am trying to understand why i.MX 7 behaves differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understand the USB disconnect is generated by udc_disconnect in drivers/usb/gadget/ci_udc.c by writing a 0 to USBCMD RS field. According to the i.MX 6 and 7 Reference Manual this should cause a disconnect&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Device operation mode:&lt;BR /&gt;Writing a one to this bit will cause the controller to enable a pull-up on D+ and initiate an attach event. This&lt;BR /&gt;control bit is not directly connected to the pull-up enable, as the pull-up will become disabled upon&lt;BR /&gt;transitioning into high-speed mode. Software should use this bit to prevent an attach event before the&lt;BR /&gt;controller has been properly initialized. Writing a 0 to this will cause a detach event.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It just seems that this does not work on i.MX 7... How can I properly cause a detach even on i.MX 7?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I also noticed is that in the i.MX 7 Reference Manaul some register are described in the USB-PHY chapter 11.5, however, a register map&amp;nbsp;for the USB PHY seems to be missing....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 21:36:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700432#M108796</guid>
      <dc:creator>falstaff</dc:creator>
      <dc:date>2017-08-16T21:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Generate USB device detach event</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700433#M108797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;Could you please specify which NXP boards and BSP are you using? Have you ensured that you are testing the same kind of USB port on both devices (Host only / OTG, with/without PHY).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be useful for you.&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;/Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 05:31:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700433#M108797</guid>
      <dc:creator>CarlosCasillas</dc:creator>
      <dc:date>2017-08-23T05:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generate USB device detach event</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700434#M108798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is&amp;nbsp;on our Toradex Colibri iMX6/iMX7 boards.&amp;nbsp;I can replicate the issue on GA 4.1.15_2..0.0 as well as on mainline, it is not really software related, since I can&amp;nbsp;reproduce it when poking the register using U-Boot memory write (mw.l) commands directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am especially wondering where the registers documented in&amp;nbsp;i.MX 7 Reference Manaul in the USB-PHY chapter 11.5 actually are located...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 20:07:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Generate-USB-device-detach-event/m-p/700434#M108798</guid>
      <dc:creator>falstaff</dc:creator>
      <dc:date>2017-08-28T20:07:25Z</dc:date>
    </item>
  </channel>
</rss>

