diff options
author | John Youn <John.Youn@synopsys.com> | 2016-02-05 17:09:13 -0800 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 15:14:27 +0200 |
commit | 7580862b3e80af9b90dd12daeedee63e3f5683c2 (patch) | |
tree | f60abd297170488b85bc676fd4a54ffcc496394c /drivers | |
parent | 2c7f1bd9127a1a49ee25d9c2b2ce17b11c7fb05f (diff) | |
download | linux-stable-7580862b3e80af9b90dd12daeedee63e3f5683c2.tar.gz linux-stable-7580862b3e80af9b90dd12daeedee63e3f5683c2.tar.bz2 linux-stable-7580862b3e80af9b90dd12daeedee63e3f5683c2.zip |
usb: dwc3: Enable SuperSpeedPlus
Enable SuperSpeedPlus by programming the DCFG.speed and after
enumerating, set gadget->speed appropriately.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3ad7ac6aadf8..482e6a17d921 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1667,6 +1667,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: @@ -2371,6 +2374,11 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) dwc3_update_ram_clk_sel(dwc, speed); switch (speed) { + case DWC3_DCFG_SUPERSPEED_PLUS: + dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512); + dwc->gadget.ep0->maxpacket = 512; + dwc->gadget.speed = USB_SPEED_SUPER_PLUS; + break; case DWC3_DCFG_SUPERSPEED: /* * WORKAROUND: DWC3 revisions <1.90a have an issue which |