Hi, John Youn <[email protected]> writes: > Enable SuperSpeedPlus by programming the DCFG.speed and after > enumerating, set gadget->speed appropriately. > > Signed-off-by: John Youn <[email protected]> > --- > drivers/usb/dwc3/gadget.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 73db723..5bbdf5d 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -1629,6 +1629,9 @@ static int dwc3_gadget_start(struct usb_gadget *g, > case USB_SPEED_HIGH: > reg |= DWC3_DSTS_HIGHSPEED; > break; > + case USB_SPEED_SUPER_PLUS: > + reg |= DWC3_DSTS_SUPERSPEED_PLUS; > + break; > case USB_SPEED_SUPER: /* FALLTHROUGH */ > case USB_SPEED_UNKNOWN: /* FALTHROUGH */ > default:
I'm thinking about amending this change to this patch:
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 5bbdf5d9c35e..d8566ad60d9b 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1633,9 +1633,14 @@ static int dwc3_gadget_start(struct usb_gadget *g,
reg |= DWC3_DSTS_SUPERSPEED_PLUS;
break;
case USB_SPEED_SUPER: /* FALLTHROUGH */
+ reg |= DWC3_DSTS_SUPERSPEED;
+ break;
case USB_SPEED_UNKNOWN: /* FALTHROUGH */
default:
- reg |= DWC3_DSTS_SUPERSPEED;
+ if (dwc_is_usb31(dwc))
+ reg |= DWC3_DSTS_SUPERSPEED_PLUS;
+ else
+ reg |= DWC3_DSTS_SUPERSPEED;
}
}
dwc3_writel(dwc->regs, DWC3_DCFG, reg);
the reason being that default speed should always be the fastest speed
supported by current core and, after this patchset we start support
superspeed plus.
What do you think ?
--
balbi
signature.asc
Description: PGP signature
