lkml.org 
[lkml]   [2018]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 5/5] usb:cdns3 Add Cadence USB3 DRD Driver
Date

> >
> >@@ -299,6 +306,7 @@ int cdns3_drd_init(struct cdns3 *cdns)
> > cdns->version = CDNS3_CONTROLLER_V0;
> > cdns->otg_v1_regs = NULL;
> > cdns->otg_regs = regs;
> >+ writel(0x1, &cdns->otg_v0_regs->simulate);
> > dev_info(cdns->dev, "DRD version v0 (%08x)\n",
> > readl(&cdns->otg_v0_regs->version));
> > } else {
>
> I have confirmation from HW team that time that driver should wait after de-
> selecting mode is 2-3ms for simulate mode. It's time when FSM is in
> DRD_H_WAIT_VBUS_FAIL.
> Driver cannot re-enable the host/device mode before this time has elapsed.
>
> 3 ms is the maximum time. Additionally, you can confirm the current FSM state by
> reading the host_otg_state (bit 5:3) or dev_otg_state (2:0) from OTGSTATE
> register.
>
> If bit 0 in simulate register is cleared the time is exactly 1s.
>

Thanks, Pawel.

Would you please add below changes in your next revision?
- Set bit 0 in simulate register
- timeout logic for waiting host_otg_state or dev_otg_state at OTGSTATE
when switch to host or device.

Peter

\
 
 \ /
  Last update: 2018-12-28 02:32    [W:1.547 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site