Page MenuHomeFreeBSD

dwc3: add more quirks and checks

Authored by bz on Jul 2 2022, 9:07 PM.
Referenced Files
F68425851: D35699.diff
Thu, Sep 28, 4:44 PM
Unknown Object (File)
Fri, Sep 15, 1:48 AM
Unknown Object (File)
Thu, Sep 14, 4:53 PM
Unknown Object (File)
Wed, Sep 13, 1:00 AM
Unknown Object (File)
Wed, Sep 6, 4:05 AM
Unknown Object (File)
Aug 16 2023, 5:19 AM
Unknown Object (File)
Jul 31 2023, 6:08 AM
Unknown Object (File)
Jul 12 2023, 8:49 AM



Rather than just printing the Global SNPS ID Register store it as well
so we can do a version check later.
In addition, for debugging purposes, read the Global Hardware Parameters
Registers and print them.

Based on the snpsid disable an XHCI feature using a quirk prepared
in 447c418da03454a2a00bc115a69c62055a6d5272.
Add the "snps,dis_u3_susphy_quirk" quirk and handle Suspend USB3.0 SS PHY
after power-on-reset/during core initialization (suggested to be cleared)
based on the DWC3_GHWPARAMS0 register.

MFC after: 2 weeks
Obtained from: an old debugging patch

Test Plan

This mentioned debugging patch was running for months on my HC and
a rk3399 without noticing a regression at least. I went and looked
up the bit for the description.

Extracted from D35484 as requested by @mw.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jul 2 2022, 9:07 PM
bz added a parent revision: D35484: dwc3: fix and add more quirks.
This revision is now accepted and ready to land.Jul 3 2022, 6:45 AM

Only minor nit.
Is necessary to shadow HWPARAMS? Shadowing the HW registry is always a pain and a source of confusion and errors. IMHO it should only be used as a last resort...

No longer cache the hwparams (given they could change) but make the
information printing a debug statment and read the register the times
we need it as suggested by @mmel

This revision now requires review to proceed.Jul 3 2022, 1:52 PM

Arg sorry I screwed the arc udpate; I'll upload a new diff in a minute.

Correct diff without some of the other changes of the stack.

If you feel strongly about it I could even move the new DWC3_DEBUG section into D35700 to keep debugging together. On the other hand this is where we start using the register so having the debugging along that also makes sense. Let me know if I should move it.

That's fine with me, thank you.

This revision is now accepted and ready to land.Jul 3 2022, 3:46 PM
This revision was automatically updated to reflect the committed changes.