<?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のトピックIM8XMM USB resume issue</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IM8XMM-USB-resume-issue/m-p/1451691#M189915</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have issues with the USB2.0 Dual Role on the USB1 of an IMX8MM running mainline Linux Kernel v5.15.&lt;/P&gt;&lt;P&gt;The role switch works fine when I connect a USB stick or a PC to the device. When I disconnect the cable, the device switches to “device mode”, in case it was connected to the USB stick, or it just detects a VBUS change, if it was instead connected to the PC, being already in “device mode”.&lt;/P&gt;&lt;P&gt;The switch from “host mode” (USB stick connected) to “device mode” when the cable is disconnected is understandable, because the USB_ID is pulled-up, like suggested here: &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-USB-TYPE-C/ta-p/1129527" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-USB-TYPE-C/ta-p/1129527&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;However, when the cable is unplugged, the device continuously receives wake-up interrupts from the USB_ID every time it tries to suspend the controller, causing an infinite loop of suspend-resume.&lt;/P&gt;&lt;P&gt;The driver enables the WKUP_VBUS_EN and WKUP_ID_EN bits of the CTRL1 register before suspending the controller, so I tried to fix the issue disabling the WKUP_ID_EN.&lt;/P&gt;&lt;P&gt;In this way there are no suspend-resume loops, but I cannot resume the controller anymore plugging the cable. I don’t understand why this can happen, because the DP/DM lines are also enabled as interrupts when I check the WKUP_DPDM_EN bit.&lt;/P&gt;&lt;P&gt;Do you know what could be the cause and what could be missing to detect the attach event?&lt;/P&gt;&lt;P&gt;I would like to check if the suspend procedure of the driver is correctly followed as explained in the reference manual, but USBPHY_PWD register and USBPHY_CTRL.CLKGATE bit are not present in the document. Reading discussion &lt;A href="https://community.nxp.com/t5/Vybrid-Processors/USB-suspend-resume-issue-on-Vybrid/m-p/445657" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Vybrid-Processors/USB-suspend-resume-issue-on-Vybrid/m-p/445657&lt;/A&gt; they seem to be quite important for the Vybrid processor and I thought they could be so for the IMX8 as well.&lt;/P&gt;&lt;P&gt;Is there an error or some parts missing in the reference manual?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2022 07:29:35 GMT</pubDate>
    <dc:creator>massimo_toscanelli</dc:creator>
    <dc:date>2022-05-02T07:29:35Z</dc:date>
    <item>
      <title>IM8XMM USB resume issue</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IM8XMM-USB-resume-issue/m-p/1451691#M189915</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have issues with the USB2.0 Dual Role on the USB1 of an IMX8MM running mainline Linux Kernel v5.15.&lt;/P&gt;&lt;P&gt;The role switch works fine when I connect a USB stick or a PC to the device. When I disconnect the cable, the device switches to “device mode”, in case it was connected to the USB stick, or it just detects a VBUS change, if it was instead connected to the PC, being already in “device mode”.&lt;/P&gt;&lt;P&gt;The switch from “host mode” (USB stick connected) to “device mode” when the cable is disconnected is understandable, because the USB_ID is pulled-up, like suggested here: &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-USB-TYPE-C/ta-p/1129527" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-USB-TYPE-C/ta-p/1129527&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;However, when the cable is unplugged, the device continuously receives wake-up interrupts from the USB_ID every time it tries to suspend the controller, causing an infinite loop of suspend-resume.&lt;/P&gt;&lt;P&gt;The driver enables the WKUP_VBUS_EN and WKUP_ID_EN bits of the CTRL1 register before suspending the controller, so I tried to fix the issue disabling the WKUP_ID_EN.&lt;/P&gt;&lt;P&gt;In this way there are no suspend-resume loops, but I cannot resume the controller anymore plugging the cable. I don’t understand why this can happen, because the DP/DM lines are also enabled as interrupts when I check the WKUP_DPDM_EN bit.&lt;/P&gt;&lt;P&gt;Do you know what could be the cause and what could be missing to detect the attach event?&lt;/P&gt;&lt;P&gt;I would like to check if the suspend procedure of the driver is correctly followed as explained in the reference manual, but USBPHY_PWD register and USBPHY_CTRL.CLKGATE bit are not present in the document. Reading discussion &lt;A href="https://community.nxp.com/t5/Vybrid-Processors/USB-suspend-resume-issue-on-Vybrid/m-p/445657" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Vybrid-Processors/USB-suspend-resume-issue-on-Vybrid/m-p/445657&lt;/A&gt; they seem to be quite important for the Vybrid processor and I thought they could be so for the IMX8 as well.&lt;/P&gt;&lt;P&gt;Is there an error or some parts missing in the reference manual?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 07:29:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IM8XMM-USB-resume-issue/m-p/1451691#M189915</guid>
      <dc:creator>massimo_toscanelli</dc:creator>
      <dc:date>2022-05-02T07:29:35Z</dc:date>
    </item>
  </channel>
</rss>

