On Tue, Oct 25, 2016 at 04:08:50PM +0300, Felipe Balbi wrote: > > Hi, > > Bin Liu <b-liu@xxxxxx> writes: > >> >> > I run into a link state problem when dwc3 is in supper-speed device > >> >> > mode. > >> >> > > >> >> > Modprobe g_zero, link state is U3 (checked in DSTS). > >> >> > > >> >> > After dwc3 is enumerated by the host, the trace on the bus is as: > >> >> > > >> >> > [both Device and Host are in U0 now] > >> >> > D->H: LGO_U1 > >> >> > H->D: LAU > >> >> > D->H: LPMA > >> >> > > >> >> > but actually dwc3 goes to U2. Is this expected? > >> >> > >> >> That's host putting the bus to U2 due to inactivity. No problems there. > >> >> > >> >> > Now remove the cable from the host, but dwc3 does not generate any > >> >> > change, link state is still in U2, no any ftrace log either from the > >> >> > point when removing the cable. > >> >> > >> >> Are you missing a disconnect interrupt? Which revision of dwc3 are you > >> > > >> > Yes, no disconnect interrupt in the first detach. > >> > >> yeah, that confuses dwc3 quite a bit :-) This controller won't do > >> anything if it doesn't know about voltage levels. > >> > >> >> dealing with? Which SoC is this? Do you have that TI mailbox to generate > >> > > >> > This is TI AM57x on DRA7-EVM. dwc3 version is 2.02a. > >> > >> Why aren't you using the UTMI mailbox? There's even a driver written for > >> it already. > > > > Yes, the driver is there. Right now mailbox is only used for ID pin. > > But the board does not register extcon for VBUS detect, so the mailbox > > is not used for VBUS events. > > Seems like dwc3-omap doesn't like ID-only boards. I remember that used > to work just fine. Maybe track down the regression? > > >> >> UTMI messages about VBUS levels? Are you programming that correctly to > >> >> tell dwc3 VBUS is not valid anymore? > >> > > >> > There is no VBUS detection on this device and board. Is the VBUS > >> > detection needed for dwc3 to work in device mode? > >> > >> In the case of DRA7x, you don't *really* need detection. All you need to > >> do is correctly update UTMI mailbox. > > > > But the UTMI mailbox is driven by extcon events, right? The board > > doesn't have external circuit or gpio to detect VBUS. > > Then you should use ID event to *also* fiddle with VBUSVALID bit. That > used to work just fine, I guess commit below broke it: I don't understand how this dra7-evm worked before. dwc3 is in SS device mode, microB cable does not ground ID pin, so there is ID event when attach/detach dwc3 to the host. I am confused... Regards, -Bin. -- 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