Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

John Youn and committed by
Felipe Balbi
7580862b 2c7f1bd9

+8
+8
drivers/usb/dwc3/gadget.c
··· 1667 1667 case USB_SPEED_HIGH: 1668 1668 reg |= DWC3_DSTS_HIGHSPEED; 1669 1669 break; 1670 + case USB_SPEED_SUPER_PLUS: 1671 + reg |= DWC3_DSTS_SUPERSPEED_PLUS; 1672 + break; 1670 1673 case USB_SPEED_SUPER: /* FALLTHROUGH */ 1671 1674 case USB_SPEED_UNKNOWN: /* FALTHROUGH */ 1672 1675 default: ··· 2374 2371 dwc3_update_ram_clk_sel(dwc, speed); 2375 2372 2376 2373 switch (speed) { 2374 + case DWC3_DCFG_SUPERSPEED_PLUS: 2375 + dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512); 2376 + dwc->gadget.ep0->maxpacket = 512; 2377 + dwc->gadget.speed = USB_SPEED_SUPER_PLUS; 2378 + break; 2377 2379 case DWC3_DCFG_SUPERSPEED: 2378 2380 /* 2379 2381 * WORKAROUND: DWC3 revisions <1.90a have an issue which