<?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.MX25 3stack usb issue and fix in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-3stack-usb-issue-and-fix/m-p/152739#M1495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;1. Remove 5V pulse in OTG VBUS when insmod ehci-hcd.ko&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What's the issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In mx25 3stack board, the sequence to insmod USBOTG driver is&lt;/P&gt;&lt;P&gt;insmod fsl_otg_arc.ko&lt;/P&gt;&lt;P&gt;insmod ehci-hcd.ko&lt;/P&gt;&lt;P&gt;insmod arcotg_udc.ko&lt;/P&gt;&lt;P&gt;insmod g_file_storage file=xxxx&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when insmod ehci-hcd.ko, there is a 5V pulse in USB_5V_VBUS_OTG, this pulse will keep about 1 second.&lt;/P&gt;&lt;P&gt;Some customer don’t want this 5V pulse. They hope the output in USB_5V_VBUS_OTG is always 0, until usb disk is inserted to the OTG port.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why there is a 5V pulse&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1926_1926.GIF"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/118821iD273ED40B6996501/image-size/large?v=v2&amp;amp;px=999" role="button" title="1926_1926.GIF" alt="1926_1926.GIF" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="43-VBUS.GIF"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/10861iEB474FA2F88C78DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="43-VBUS.GIF" alt="43-VBUS.GIF" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Above picture is OTG VBUS connection in mx25 3stack schematic&lt;/P&gt;&lt;P&gt;The output of USB_5V_VBUS_OTG is decided by pin USBOTG_PWR, when USBOTG_PWR is low, there is a 5V in USB_5V_VBUS_OTG.&lt;/P&gt;&lt;P&gt;After insmod ehci-hcd.ko, in kernel driver, &lt;EM&gt;usb_hcd_fsl_probe() -&amp;gt; usb_add_hcd ()&lt;/EM&gt; and &lt;EM&gt;usb_hcd_fsl_probe() -&amp;gt; fsl_platform_set_vbus_power ()&lt;/EM&gt;, bit PORT_POWER of PORTSC1 is set to 1, which will pull pin USBOTG_PWR low, so there is a 5V out in pin USB_5V_VBUS_OTG.&lt;/P&gt;&lt;P&gt;If there is not a mini A cable connected to OTG port, ehci_fsl_drv_suspend will be called, bit PORT_POWER of PORTSC1 is set to 0 to pull USBOTG_PWR high, USB_5V_VBUS_OTG is pulled from 5V to 0. You will see a 5V pulse in USB_5V_VBUS_OTG for about 1 second.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to remove it&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch enable_usbotg_pwr_pin_after_host_init.patch can remove the 1 second 5V output. It will postpone the configure of GPIO_A to USBOTG_PWR from otg init to the end of usb_hcd_fsl_probe().&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. If insert USB disk before insmod all the usb dirver, USB disk cannot be recognize.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch 0001-Remove-usb-irq-disable-and-low-power-mode-in-fsl_udc.patch can fix the issue&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. If run USBOTG in usb slave mode, not enable the OTG mode, D- is high after insmod the slave driver.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch 0001-workaround-for-mx25-mx35-usbotg-auto-resume-issue.patch can fix the issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;0001-workaround-for-mx25-mx35-usbotg-auto-resume-issue.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;enable_usbotg_pwr_pin_after_host_init.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;0001-Remove-usb-irq-disable-and-low-power-mode-in-fsl_udc.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2012 09:47:27 GMT</pubDate>
    <dc:creator>shaojun_wang</dc:creator>
    <dc:date>2012-04-11T09:47:27Z</dc:date>
    <item>
      <title>i.MX25 3stack usb issue and fix</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-3stack-usb-issue-and-fix/m-p/152739#M1495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;1. Remove 5V pulse in OTG VBUS when insmod ehci-hcd.ko&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What's the issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In mx25 3stack board, the sequence to insmod USBOTG driver is&lt;/P&gt;&lt;P&gt;insmod fsl_otg_arc.ko&lt;/P&gt;&lt;P&gt;insmod ehci-hcd.ko&lt;/P&gt;&lt;P&gt;insmod arcotg_udc.ko&lt;/P&gt;&lt;P&gt;insmod g_file_storage file=xxxx&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when insmod ehci-hcd.ko, there is a 5V pulse in USB_5V_VBUS_OTG, this pulse will keep about 1 second.&lt;/P&gt;&lt;P&gt;Some customer don’t want this 5V pulse. They hope the output in USB_5V_VBUS_OTG is always 0, until usb disk is inserted to the OTG port.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why there is a 5V pulse&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1926_1926.GIF"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/118821iD273ED40B6996501/image-size/large?v=v2&amp;amp;px=999" role="button" title="1926_1926.GIF" alt="1926_1926.GIF" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="43-VBUS.GIF"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/10861iEB474FA2F88C78DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="43-VBUS.GIF" alt="43-VBUS.GIF" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Above picture is OTG VBUS connection in mx25 3stack schematic&lt;/P&gt;&lt;P&gt;The output of USB_5V_VBUS_OTG is decided by pin USBOTG_PWR, when USBOTG_PWR is low, there is a 5V in USB_5V_VBUS_OTG.&lt;/P&gt;&lt;P&gt;After insmod ehci-hcd.ko, in kernel driver, &lt;EM&gt;usb_hcd_fsl_probe() -&amp;gt; usb_add_hcd ()&lt;/EM&gt; and &lt;EM&gt;usb_hcd_fsl_probe() -&amp;gt; fsl_platform_set_vbus_power ()&lt;/EM&gt;, bit PORT_POWER of PORTSC1 is set to 1, which will pull pin USBOTG_PWR low, so there is a 5V out in pin USB_5V_VBUS_OTG.&lt;/P&gt;&lt;P&gt;If there is not a mini A cable connected to OTG port, ehci_fsl_drv_suspend will be called, bit PORT_POWER of PORTSC1 is set to 0 to pull USBOTG_PWR high, USB_5V_VBUS_OTG is pulled from 5V to 0. You will see a 5V pulse in USB_5V_VBUS_OTG for about 1 second.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to remove it&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch enable_usbotg_pwr_pin_after_host_init.patch can remove the 1 second 5V output. It will postpone the configure of GPIO_A to USBOTG_PWR from otg init to the end of usb_hcd_fsl_probe().&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. If insert USB disk before insmod all the usb dirver, USB disk cannot be recognize.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch 0001-Remove-usb-irq-disable-and-low-power-mode-in-fsl_udc.patch can fix the issue&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. If run USBOTG in usb slave mode, not enable the OTG mode, D- is high after insmod the slave driver.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Patch 0001-workaround-for-mx25-mx35-usbotg-auto-resume-issue.patch can fix the issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;0001-workaround-for-mx25-mx35-usbotg-auto-resume-issue.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;enable_usbotg_pwr_pin_after_host_init.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336185"&gt;0001-Remove-usb-irq-disable-and-low-power-mode-in-fsl_udc.patch.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 09:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX25-3stack-usb-issue-and-fix/m-p/152739#M1495</guid>
      <dc:creator>shaojun_wang</dc:creator>
      <dc:date>2012-04-11T09:47:27Z</dc:date>
    </item>
  </channel>
</rss>

