Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,423
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
That's an outstanding helpful tutorial. Thank you very much for compiling all the information. As an addition, you already indicated: when running High Sierra 10.13.6 the USB-Limit-Removal does not work.

In my case it didn't. This meant, that I could not see any of the SSxx USB3.0 ports in IORegistryExplorer. Because of Apple's 15 ports limit, it showed only HS01 until HS14 and USR01 (=15 ports), which left me wondering, what I was missing for my Gigabyte Z270 Gaming K3 (Bios rev8).

What I did while blind-flying and not seeing any of the SSxx ports:
  1. I patched DSDT accordingly in Clover (Change XHC1 to XHC_) as written above.
  2. I evaluated first the USB2.0 (HSxx) ports only, by probing with a USB-Stick (since I didn't see the USB3.0 ports anyway). And I decided which of the ports to keep.
  3. I then checked the mainboard-manual for which ports are USB2.0 only (there are some)
  4. I prepared and compiled the SSDT-USB.aml accordingly (without having probed the SSxx ports, but by guessing HS01 = port 0x01, SS01 = port 0x11) and put it into /EFI/CLOVER/ACPI/patched/
  5. For the first round I could only add those unneeded ports to Clover's config.plist, that I could see: Since I couldn't see all of them first, I added these to be excluded: "uia_exclude=HS05;HS06;USR1;"
  6. After rebooting I could see some of the SSxx ports and another USR2 port. By adding one port after the other to the "uia-exclude-list" of ports that I didn't need, the IORegistryExplorer showed me by step more ports (of course within the 15 ports scope) and eventually showed me the SSxx ports aswell.
  7. After a cpl of reboots I had my list of boot arguments finished: "uia_exclude=HS05;HS06;HS09;HS10;SS05;SS06;USR1;USR2"
At the moment everything is stable and running smooth. I nevertheless wanted to ask if anyone can tell me that this created SSDT is correct? I attached it for reference. Thanks again to UtterDisbelief :)

P.S. I also found another USB 3.1. port with a non intel manufacturer ID 0x1b21 and device ID 0x2142 which in IORegExp is found under: RP19 / PXSX (see screenshot). Does anybody have a hint, if (or how) I have to configure this one? Thanks!! :)
Okay. Thanks for the feedback:thumbup:

A couple of observations -

Two errors in your SSDT:

1) You Vendor/Device ID at the top should be - "8086_a2af", Package()

2) You have forgotten to include the highest port number in your SSDT. So where you have:

"port-count", Buffer() { 0xNN, 0, 0, 0}

at the top of the template under the vendor/device ID, it should be altered to the highest port, so:

"port-count", Buffer() { 0x18, 0, 0, 0}

3) That extra Device ID for the USB 3.1 port is an ASMedia 2142 chipset. It is probably not one you can configure easily.

:)
 
Joined
Jan 26, 2012
Messages
14
Motherboard
Gigabyte GA Z270 Gaming K3
CPU
i5-7600K
Graphics
RX 580
Mac
MacBook Air, MacBook Pro
Mobile Phone
iOS
Okay. Thanks for the feedback:thumbup:

A couple of observations -

Two errors in your SSDT:

1) You Vendor/Device ID at the top should be - "8086_a2af", Package()

2) You have forgotten to include the highest port number in your SSDT. So where you have:

"port-count", Buffer() { 0xNN, 0, 0, 0}

at the top of the template under the vendor/device ID, it should be altered to the highest port, so:

"port-count", Buffer() { 0x18, 0, 0, 0}

3) That extra Device ID for the USB 3.1 port is an ASMedia 2142 chipset. It is probably not one you can configure easily.

:)
Thanks a bunch for your lightspeed feedback. I tought I fixed the device-id and the highest port already (but well, I have become an old man, my brain does things, you don't wanna know ;-) )

For the ASMedia USB3.1: it works ootb. I used it for installation purposes. As nice to understand, but not a must have: probably you or somebody else can give me a hint, what RPxx/PXSX means and why it is found in a very different branch in the device-tree in IORegExp? Why does Gigabyte integrate two chipsets for USB anyway?

Thanks again!
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,423
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
UPDATE - JUNE 2019

As of the time of writing the main kext we use in this guide - USBInjectAll.kext - has not been updated since November 2018. As such it does not include the latest System Definition "iMac19,2" which people with Z390 motherboards and 9000 series CPUs are choosing.

This means you won't easily be able to create a successful port-definition for iMac19,2 using our method.

The tutorial here was only intended as a Beginner's Guide, however there is a more modern method for configuring USB ports that does NOT involve using USBInjectAll.kext.

Here is the link to: ASUS 100 Series and Later Custom SSDT for XHCI USB port Control.

It is not a Beginner's Guide and doesn't, as yet, feature any official detail on how to translate this over to Gigabyte, MSI or ASRock motherboards, though this is in the pipeline. There are a few posts in the thread from builders who have done the conversion. This is worth a read for the more confident builder.
 
Last edited:

Sniki

Moderator
Joined
Jan 5, 2016
Messages
1,594
Motherboard
Lenovo V330 - 15IKB
CPU
i5-8250U
Graphics
UHD 620 /1920x1080
Mobile Phone
iOS
Updated USBInjectAll.kext

Although i recommend testing the method by the link provided by @UtterDisbelief on post #293 as it seems very promising, for you that already had/have good configuration with USBInjectall.kext and have updated/need to update to iMac19,2 i did fork Rehabman USB-Inject-All repository and added support for iMac19,2 (not tested yet on my own as i have no hardware for iMac19,2).

Attached you can find the Debug and Release version of the USBInjectAll.kext

Please test and report back with results.
 

Attachments

Sniki

Moderator
Joined
Jan 5, 2016
Messages
1,594
Motherboard
Lenovo V330 - 15IKB
CPU
i5-8250U
Graphics
UHD 620 /1920x1080
Mobile Phone
iOS

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,423
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,423
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Last edited:
Joined
Jul 26, 2012
Messages
13
Motherboard
ASUS H370-i
CPU
i7-8700
Graphics
Vega 56
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
iOS
Good to have a direct link to the fork. Thank you. Is there an external link to the zips, as in post #294, yet? If so I'll add it to the main guide. :thumbup: .
I've created a release with .zip in my repo that you can use for direct links:
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
1,594
Motherboard
Lenovo V330 - 15IKB
CPU
i5-8250U
Graphics
UHD 620 /1920x1080
Mobile Phone
iOS
Good to have a direct link to the fork. Thank you. Is there an external link to the zips, as in post #294, yet? If so I'll add it to the main guide. :thumbup: .
I will add the builds later today as i needed testing/confirmation first. I will let you know as soon as i upload them.
 
Top