lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <23672d66d229d3be4cc854ddf1462c3507f1c2fc.camel@toradex.com>
Date:   Mon, 20 Jul 2020 10:10:58 +0000
From:   Philippe Schenker <philippe.schenker@...adex.com>
To:     "peter.chen@....com" <peter.chen@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
CC:     "jun.li@....com" <jun.li@....com>,
        "linux-imx@....com" <linux-imx@....com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "festevam@...il.com" <festevam@...il.com>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm

On Mon, 2020-07-20 at 08:06 +0000, Peter Chen wrote:
>  
> > On Mon, 2020-07-20 at 03:44 +0000, Peter Chen wrote:
> > > > On Wed, 2020-07-15 at 00:51 +0000, Peter Chen wrote:
> > > > > > The Toradex Colibri iMX6ULL board has a special USB hardware
> > > > > > design.
> > > > > > With runtime-pm enabled USB reset itself continuously.
> > > > > > Furthermore
> > > > > > the OTG port is also not enumerating devices if the Chipidea
> > > > > > IP
> > > > > > is in runtime sleep mode and a device or host gets plugged
> > > > > > in.
> > > > > > 
> > > > > 
> > > > > Hi Philippe,
> > > > > 
> > > > > You may describe the detail what's the special USB hardware
> > > > > design
> > > > > for your board,
> > > > 
> > > > If I only knew the root-cause of that problem - unfortunately I
> > > > don't.
> > > > That's also why I have such a hard time to describe it.
> > > > 
> > > > > and why it causes the problem, and why disable runtime pm
> > > > > could
> > > > > fix this issue, then,
> > > > 
> > > > I cannot provide the 'why' part yet. I'll try something more and
> > > > hope I can provide you guys with the exact description.
> > > > 
> > > > > the other users could know if it could apply to their
> > > > > platforms or
> > > > > not in future.
> > > > 
> > > > I only found out about it because you were pointing me in that
> > > > direction. I debugged for hours now and didn't came to the
> > > > root-cause of the issue. I think to really understand it I would
> > > > need to know much more about the Chipidea IP.
> > > > 
> > > > I'll get back to you guys with a proposal for a new description.
> > > > 
> > > 
> > > Philippe, is it possible to share your USB hardware design at
> > > 6ULL?
> > 
> > It's actually pretty simple: We have on USB_OTG1_VBUS a 1uF
> > capacitor and
> > +3.0V on VDD_USB_CAP together with 100n and 10u bypass caps. Now the
> > big
> > problem is that the driver can not detect the 5V on VBUS signal.
> > 
> 
> Could you confirm it does not see VBUS at register OTGSC? If it is,
> how can it work with runtime
> disabled, the USBCMD.RS setting (ci_hdrc_gadget_connect is called)
> depends on VBUS.
> 
> Peter

For this reason I'm using a workaround in extcon like this:

extcon = <&extcon_usbc_det>, <&extcon_usbc_det>;

I know that this is undocumented and wrong, but it works for our
hardware. With this and enabled runtime-pm devices do not get
enumerated.

But with runtime-pm disabled, devices get enumerated.

Further with this workaround the VBUS signal gets 'simulated'
in hw_read_otgsc.

Another problem with runtime-pm enabled is that with no devices plugged
into USB it resets itself every ~1 second.

Philippe.
> 
> > I tried to 'inject' 5V to that pin last week and things got really
> > better with runtime-pm.
> > But I still thinks disabling it for our board would make sense.
> > 
> > I'll send a new description today where I try to point to VBUS
> > signal not connected.
> > 
> > Philippe
> > 
> > > And how ci_hdrc_gadget_connect is called when the runtime pm is
> > > disabled?
> > > 
> > > Thanks,
> > > Peter
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ