usb: dwc3: Enable SuperSpeedPlus
authorJohn Youn <John.Youn@synopsys.com>
Sat, 6 Feb 2016 01:09:13 +0000 (17:09 -0800)
committerFelipe Balbi <balbi@kernel.org>
Fri, 4 Mar 2016 13:14:27 +0000 (15:14 +0200)
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>
drivers/usb/dwc3/gadget.c

index 3ad7ac6aadf875156141bb727fcca8e5531ded18..482e6a17d92107631e8ae7989fdbae074484f11d 100644 (file)
@@ -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
This page took 0.028749 seconds and 5 git commands to generate.