USB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk

Add support for the "snps,dis_rxdet_inp3_quirk" quirk needed
at least on SolidRun's HoneyComb.

Reviewed by:	manu, mw
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D32921
This commit is contained in:
Bjoern A. Zeeb 2021-11-10 00:22:20 +00:00
parent fad51d34f2
commit 3987e50611
2 changed files with 7 additions and 4 deletions

View file

@ -264,11 +264,13 @@ snps_dwc3_do_quirks(struct snps_dwc3_softc *sc)
reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
DWC3_WRITE(sc, DWC3_GUCTL1, reg);
if (OF_hasprop(sc->node, "snps,dis-del-phy-power-chg-quirk")) {
reg = DWC3_READ(sc, DWC3_GUSB3PIPECTL0);
reg = DWC3_READ(sc, DWC3_GUSB3PIPECTL0);
if (OF_hasprop(sc->node, "snps,dis-del-phy-power-chg-quirk"))
reg |= DWC3_GUSB3PIPECTL0_DELAYP1TRANS;
DWC3_WRITE(sc, DWC3_GUSB3PIPECTL0, reg);
}
if (OF_hasprop(sc->node, "snps,dis_rxdet_inp3_quirk"))
reg |= DWC3_GUSB3PIPECTL0_DISRXDETINP3;
DWC3_WRITE(sc, DWC3_GUSB3PIPECTL0, reg);
}
static int

View file

@ -90,6 +90,7 @@
#define DWC3_GUSB3PIPECTL0 0xc2c0
#define DWC3_GUSB3PIPECTL0_PHYSOFTRST (1 << 31)
#define DWC3_GUSB3PIPECTL0_DISRXDETINP3 (1 << 28)
#define DWC3_GUSB3PIPECTL0_DELAYP1TRANS (1 << 18)
#define DWC3_GTXFIFOSIZ(x) (0xc300 + 0x4 * (x))