<?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 Re: Over-Current detection reported later when OC removed in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Over-Current-detection-reported-later-when-OC-removed/m-p/1366143#M182578</link>
    <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You may refer to the following post for this:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/iMX6-USB-OC-functionality/m-p/326129" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/iMX6-USB-OC-functionality/m-p/326129&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Best regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Nov 2021 00:22:58 GMT</pubDate>
    <dc:creator>AldoG</dc:creator>
    <dc:date>2021-11-04T00:22:58Z</dc:date>
    <item>
      <title>Over-Current detection reported later when OC removed</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Over-Current-detection-reported-later-when-OC-removed/m-p/1321182#M178158</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are testing over-current detection on &lt;STRONG&gt;Linux-imx 4.19.35&lt;/STRONG&gt; kernel over &lt;STRONG&gt;imx6s&lt;/STRONG&gt; . the OC kernel message "usb usb2-port1: &lt;STRONG&gt;over-current condition&lt;/STRONG&gt;" is reported only we when remove the OC from USB pins (VCC/GND) but not when applied .&lt;/P&gt;&lt;P&gt;When apply an OC ,the kernel report a portchange but when reading the port status it doesn't match an USB_PORT_STAT_OVERCURRENT but only when removing OC from USB pins (on the next portchange event) later.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Here kernel messages :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;When OC applied :&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;[ 504.688638] usb usb2: usb wakeup-resume&lt;BR /&gt;[ 504.692729] hub 2-0:1.0: hub_resume&lt;BR /&gt;[ 504.696352] hub 2-0:1.0: state 7 ports 1 chg 0002 evt 0000&lt;BR /&gt;[ 504.707508] usb usb2-port1: over-current change #1&lt;BR /&gt;[ 504.831475] hub 2-0:1.0: enabling power on all ports&lt;BR /&gt;[ 504.951552] usb usb2-port1: status 0100, change 0008, 12 Mb/s&lt;BR /&gt;[ 504.957354] hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000&lt;BR /&gt;[ 504.967493] hub 2-0:1.0: hub_suspend&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;When OC removed:&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;[ 507.557030] usb usb2: usb wakeup-resume&lt;BR /&gt;[ 507.560906] hub 2-0:1.0: hub_resume&lt;BR /&gt;[ 507.569719] hub 2-0:1.0: state 7 ports 1 chg 0002 evt 0000&lt;BR /&gt;[ 507.577432] usb usb2-port1: over-current change #2&lt;BR /&gt;[ 507.701476] hub 2-0:1.0: enabling power on all ports&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;[ 507.821540] usb usb2-port1: over-current condition&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;[ 507.826374] usb usb2-port1: status 0000, change 0008, 12 Mb/s&lt;BR /&gt;[ 507.832939] hub 2-0:1.0: state 7 ports 1 chg 0000 evt 0000&lt;BR /&gt;[ 507.838469] hub 2-0:1.0: hub_suspend&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Here code from core/hub.c&lt;/STRONG&gt; &lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (portchange &amp;amp; USB_PORT_STAT_C_OVERCURRENT) {&lt;BR /&gt;u16 status = 0, unused;&lt;BR /&gt;port_dev-&amp;gt;over_current_count++;&lt;/P&gt;&lt;P&gt;dev_dbg(&amp;amp;port_dev-&amp;gt;dev, "over-current change #%u\n",&lt;BR /&gt;port_dev-&amp;gt;over_current_count);&lt;BR /&gt;usb_clear_port_feature(hdev, port1,&lt;BR /&gt;USB_PORT_FEAT_C_OVER_CURRENT);&lt;BR /&gt;msleep(100); /* Cool down */&lt;BR /&gt;hub_power_on(hub, true);&lt;BR /&gt;hub_port_status(hub, port1, &amp;amp;status, &amp;amp;unused);&lt;BR /&gt;if (status &amp;amp; USB_PORT_STAT_OVERCURRENT)&lt;BR /&gt;dev_err(&amp;amp;port_dev-&amp;gt;dev, "over-current condition\n");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Here related device-tree node :&lt;/P&gt;&lt;P&gt;&amp;amp;usbotg {&lt;BR /&gt;vbus-supply = &amp;lt;&amp;amp;reg_usb_otg_vbus&amp;gt;;&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_usbotg_t&amp;gt;;&lt;BR /&gt;dr_mode = "otg";&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;pinctrl_usbotg_t: usbotggrp {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0xb0&lt;BR /&gt;MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have you please an idea about this issue ? Are we missing some polarity configs on dts ?&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 14:24:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Over-Current-detection-reported-later-when-OC-removed/m-p/1321182#M178158</guid>
      <dc:creator>wzairi</dc:creator>
      <dc:date>2021-08-10T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Over-Current detection reported later when OC removed</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Over-Current-detection-reported-later-when-OC-removed/m-p/1366143#M182578</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;You may refer to the following post for this:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/iMX6-USB-OC-functionality/m-p/326129" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/iMX6-USB-OC-functionality/m-p/326129&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Best regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 00:22:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Over-Current-detection-reported-later-when-OC-removed/m-p/1366143#M182578</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2021-11-04T00:22:58Z</dc:date>
    </item>
  </channel>
</rss>

