Page MenuHomeFreeBSD

dwc3: add more quirks and checks
ClosedPublic

Authored by bz on Jul 2 2022, 9:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 10:19 AM
Unknown Object (File)
Sun, Apr 7, 9:05 PM
Unknown Object (File)
Sun, Apr 7, 9:05 PM
Unknown Object (File)
Sun, Apr 7, 8:51 PM
Unknown Object (File)
Feb 23 2024, 3:49 PM
Unknown Object (File)
Feb 5 2024, 3:38 AM
Unknown Object (File)
Dec 20 2023, 6:12 AM
Unknown Object (File)
Dec 13 2023, 8:38 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
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.