Commit 7580862b authored by John Youn's avatar John Youn Committed by Felipe Balbi

usb: dwc3: Enable SuperSpeedPlus

Enable SuperSpeedPlus by programming the DCFG.speed and after
enumerating, set gadget->speed appropriately.
Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 2c7f1bd9
...@@ -1667,6 +1667,9 @@ static int dwc3_gadget_start(struct usb_gadget *g, ...@@ -1667,6 +1667,9 @@ static int dwc3_gadget_start(struct usb_gadget *g,
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
reg |= DWC3_DSTS_HIGHSPEED; reg |= DWC3_DSTS_HIGHSPEED;
break; break;
case USB_SPEED_SUPER_PLUS:
reg |= DWC3_DSTS_SUPERSPEED_PLUS;
break;
case USB_SPEED_SUPER: /* FALLTHROUGH */ case USB_SPEED_SUPER: /* FALLTHROUGH */
case USB_SPEED_UNKNOWN: /* FALTHROUGH */ case USB_SPEED_UNKNOWN: /* FALTHROUGH */
default: default:
...@@ -2371,6 +2374,11 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) ...@@ -2371,6 +2374,11 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
dwc3_update_ram_clk_sel(dwc, speed); dwc3_update_ram_clk_sel(dwc, speed);
switch (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: case DWC3_DCFG_SUPERSPEED:
/* /*
* WORKAROUND: DWC3 revisions <1.90a have an issue which * WORKAROUND: DWC3 revisions <1.90a have an issue which
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment