Ampere eMAG systems have XHCI just descibed in ACPI, not on PCI.
Details
- Reviewers
manu andrew - Group Reviewers
Contributor Reviews (src) - Commits
- rS347343: Add support for USB 3.0 XHCI via ACPI
Original version tested on Ampere eMAG by Tuan Phan <tphan@amperecomputing.com>
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
yeah, sure. I forgot about that one (even though I wrote a comment there) and I was looking at sys/dev/ahci/ahci_generic.c instead :)
As with GregV's report in PR237055 dsdt has for USB:
Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x00) }
regardless of BIOS settings; I wasn't able to test this here.
The fdt needs it's own detach function where we disable the phy (like it's done in D19389 for ehci).
I know that it wasn't done before (my bad ...) but since we are changing since might as well do it correctly :)
sys/dev/usb/controller/generic_xhci_fdt.c | ||
---|---|---|
33–50 ↗ | (On Diff #56658) | We don't actually need xhcireg (I think I've seen an error related to that earlier, but removing it is fine now). We need xhci for the softc and all other USB stuff for xhci… |
sys/dev/usb/controller/generic_xhci_acpi.c | ||
---|---|---|
2–4 ↗ | (On Diff #56915) | I doubt Semihalf and Stormshield own the copyright on this file. |
sys/dev/usb/controller/generic_xhci_acpi.c | ||
---|---|---|
2–4 ↗ | (On Diff #56915) | okay, I can put myself here I guess (also added SPDX) |
Tinh Nguyen from Ampere tested and it doesn't seems to make usb working (xhci controller is discovered but nothing more), I've tried on my overdrive in FDT mode and it works.
In acpi mode this doesn't but it doesn't without this patch too, looks like the acpi table is missing info about interrupts, I'll do one more test on the macchiatobin and then commit this.