Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 13, 2014 at 09:41:17PM +0000, Paul Zimmerman wrote:
> > From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> > Sent: Wednesday, August 13, 2014 2:09 PM
> > 
> > On Wed, 13 Aug 2014, Paul Zimmerman wrote:
> > 
> > > > > Is there a difference between a VBus on/off and a connect/disconnect?
> > > > > Because AFAIK the Synopsys USB 3.0 controller (unless it is configured
> > > > > for OTG mode) does not have a way to detect when VBus is enabled/
> > > > > disabled, other than by a connect/disconnect interrupt.
> > > >
> > > > That's an excellent point; it completely slipped my mind.  So we
> > > > already have all the callbacks we need.
> > >
> > > No, that was a brain fart on my part. The DWC3 controller needs to have
> > > the pullups enabled before it can see a connect. Well, it's actually
> > > the host that won't see the device being connected until the pullups
> > > are enabled, but it amounts to the same thing, since the device needs
> > > to see some bus activity from the host before it asserts the ConnectDone
> > > interrupt.
> > 
> > Then how can the DWC3 be USB-compliant?  It can't see a connect unless
> > the pullups are enabled, but enabling the pullups before Vbus is active
> > violates the USB spec.
> > 
> > Does the controller hardware have some special switch that prevents the
> > pullup from engaging if Vbus is off?
> 
> Either in the controller or in the Synopsys Phy, I'm not sure which. It
> seems like an obvious thing to be handled automatically by the hardware.
> 
> We've never seen a failure on the USB-IF test suite as was mentioned
> earlier in the thread, and we have our device hardware recertified on
> a regular basis.
> 

What's voltage for dwc3 platfrom's dp before connecting to host?
If you connect a usb cable with host (using another board), but the
host does not supply vbus, will you see a CONNECT?
If the host power off vbus, but the usb cable does not disconnect, will
you see DISCONNECT?

I assume you will only see CONNECT if vbus is there, and DISCONNECT if vbus
is off when the cable is connected , the physical dp pullup should need vbus.
Please correct me if my assumption is wrong.

When talking about Alan's suggestion, for the platform like dwc3 which doesn't
need to know vbus, it can set .vbus_active at usb_gadget_driver as true at udc_start
unconditionally.  

-- 
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux