Skip to content

Commit

Permalink
Silicon/Rockchip: DWC3: Disable SS instances in park mode
Browse files Browse the repository at this point in the history
No, I did not notice any issues, but Rockchip have enabled this quirk in their
kernel, so let's do the same.

Apparently, on some implementations of DWC3 the controller would halt under high
load and never come back online.
  • Loading branch information
mariobalanica committed Aug 30, 2023
1 parent dbaeeac commit f187fa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edk2-rockchip/Silicon/Rockchip/Drivers/UsbHcdInitDxe/UsbHcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ XhciCoreInit (
MmioAndThenOr32 ((UINTN)&Dwc3Reg->GUsb3PipeCtl[0], ~DWC3_GUSB3PIPECTL_DEPOCHANGE, 0);
/* snps,dis-tx-ipgap-linecheck-quirk */
MmioOr32 ((UINTN)&Dwc3Reg->GUctl1, DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS);
/* snps,parkmode-disable-ss-quirk */
MmioOr32 ((UINTN)&Dwc3Reg->GUctl1, DWC3_GUCTL1_PARKMODE_DISABLE_SS);

/* Set max speed */
MmioAndThenOr32 ((UINTN)&Dwc3Reg->DCfg, ~DCFG_SPEED_MASK, DCFG_SPEED_SS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

/* Global UCTL1 Register */
#define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT28
#define DWC3_GUCTL1_PARKMODE_DISABLE_SS BIT17

/* Global USB2 PHY Configuration Register */
#define DWC3_GUSB2PHYCFG_PHYSOFTRST BIT31
Expand Down

0 comments on commit f187fa7

Please sign in to comment.