Page MenuHomeFreeBSD

dwc3: add more quirks and checks
ClosedPublic

Authored by bz on Jul 2 2022, 9:07 PM.
Tags
None
Referenced Files
F102415006: D35699.diff
Mon, Nov 11, 11:16 PM
Unknown Object (File)
Wed, Nov 6, 3:01 PM
Unknown Object (File)
Fri, Nov 1, 10:30 AM
Unknown Object (File)
Wed, Oct 30, 2:29 PM
Unknown Object (File)
Fri, Oct 25, 4:19 AM
Unknown Object (File)
Wed, Oct 16, 5:29 PM
Unknown Object (File)
Mon, Oct 14, 6:23 AM
Unknown Object (File)
Oct 12 2024, 8:43 PM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46237
Build 43126: arc lint + arc unit

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.