Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SSDT-USBX] vs _DSM XHC Clarifications #1609

Closed
1alessandro1 opened this issue Apr 13, 2021 · 6 comments
Closed

[SSDT-USBX] vs _DSM XHC Clarifications #1609

1alessandro1 opened this issue Apr 13, 2021 · 6 comments

Comments

@1alessandro1
Copy link

There are a few ways to specify current limits on USB ports, one of them is using AppleUsbPower compatibility table for Skylake+ (also known as SSDT-USBX)

However there are some other properties that can be specified either though SSDT:

image

Or though DevicesProperties converting the HEX values to Little Endian format:

image

My doubts on this were:

  1. Does specifying the properties for the XHC device or via PciRoot(0x0)/Pci(0x14,0x0) - which in the end is the same thing - have any relevant impact/change on correct USB power management?
  2. Are these two methods doing the same thing?
  3. Is SSDT-USBX enough for handling USB port currents or maybe needs some more properties?
  4. If the answer for 2. is "SSDT-USBX is enough", why?

Thank you for your time and patience

@vit9696
Copy link
Contributor

vit9696 commented Apr 13, 2021

  1. On IOUSBFamily (pre-10.11 if I remember correctly) it does and works correctly. Required to be AAPL,-prefixed properties. On IOUSBHostFamily these values are ignored I believe.
  2. Using DeviceProperties and _DSM is about the same thing as long as you can specify the device path in DeviceProperties (for USBX you cannot for instance, since it is not a PCI device) and as long as the device exists in ACPI.
  3. Depends on the hardware. For Haswell you must specify the values in the plist of the kext describing ports. For Skylake I experienced mixed results. Most likely you need to specify them in both places to get reliable behaviour. Easiest to check is to try charging an iPad.

@vit9696 vit9696 closed this as completed Apr 13, 2021
@1alessandro1
Copy link
Author

1alessandro1 commented Apr 15, 2021

Thanks a lot for making this more clear

Also I recently noticed this (AppleACPIEC) from the Kernel ACPI Log:
image

  1. Is this USBX related?
  2. Should I care about this?
  3. Why on laptops AppleACPIEC should be loaded and in desktops it does not?

@vit9696
Copy link
Contributor

vit9696 commented Apr 15, 2021

  1. Not sure. It think it is about no T1/T2 support.
  2. No.
  3. I think it is coincidental.

@1alessandro1
Copy link
Author

1alessandro1 commented Apr 18, 2021

Depends on the hardware. For Haswell you must specify the values in the plist of the kext describing ports.

Regarding USB mapping on firmware which have ports described only in the DSDT, I successfully managed to map all my ports on a Q85 chipset with a i5 4590 using a _UPC to XUPC hotpach that can be found here and I mapped ports though SSDT that can be found here even if it's not Skylake which has a separate SSDT for that

I'd like to know your thoughts on this, since this is going to help me to update the PR here, where the method I proposed currently applies to skylake and above by dropping the original OEM SSDT (hence the USB table must be separate right now) while if this rename is a viable method, this approach can be used on all firmware, replacing the kext approach which breaks when changing SMBIOS, and it's not as clean as an ACPI-only solution

Thanks for your time

@1alessandro1
Copy link
Author

tiny bump, @vit9696 ^

@vit9696
Copy link
Contributor

vit9696 commented Apr 21, 2021

Not sure I have a good opinion on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants