Contribute
Register

[Guide] USB power property injection for Sierra (and later)

Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630
Done.

So I should just get some default kusb* from the internet, and paste it to the SSDT-UIAC? I did it, and it still doesn't show the USBX0 in ioreg. I still can't grasp the understanding about the USBX, sorry.
Your config.plist and ACPI/patched is still incorrect. I recommend that you use the hotpatch method to do the DSDT&SSDT patch.
1. Remove
Code:
<key>Name</key>
<string>DSDT.aml</string>
from your config.plist;
2. Delete native DSDT&SSDT from ACPI/patched folder. eg. DSDT.aml, SSDT.aml and SSDT-7-CB-01.aml

Then Restart.
 
Joined
Oct 15, 2016
Messages
67
CPU
i7 6500U
Graphics
HD520
Mobile Phone
Android
Your config.plist and ACPI/patched is still incorrect. I recommend that you use the hotpatch method to do the DSDT&SSDT patch.
1. Remove
Code:
<key>Name</key>
<string>DSDT.aml</string>
from your config.plist;
2. Delete native DSDT&SSDT from ACPI/patched folder. eg. DSDT.aml, SSDT.aml and SSDT-7-CB-01.aml

Then Restart.
... I refrain from doing that. I honesty forget all patches that I applied there, and it would be messed up if I removed it.
The goal is to have USBX0 in ioreg, right? Then somehow I managed to do it.
Thanks anyway.
 
Joined
Jul 23, 2012
Messages
32
Motherboard
HP Zbook 15 G2
CPU
i7 4910MQ
Graphics
FirePro M5100 (3200x1800)
Hi @RehabMan

I added a minor modification to support Docking Station's USB ports for Zbook 15 G2. It's using HS01 and SSP01 which wasn't included in your code. 4 USB 3.0 ports on the Docking Station work great in both 2.0 and 3.0 mode.

Code:
Device (UIAC)
    {
        Name (_HID, "UIA00000")  // _HID: Hardware ID
        Name (RMCF, Package (0x04)
        {
            "8086_9cb1",
            Package (0x02)
            {
                "ports",
                Package (0x10)
                {
                    "HS01",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x01, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS02",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x02, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS03",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x03, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS04",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x04, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS07",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x07, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP1",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x0C, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP2",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x0D, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP3",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x0E, 0x00, 0x00, 0x00                    
                        }
                    }
                }
            },

            "8086_8c31",
            Package (0x02)
            {
                "ports",
                Package (0x16)
                {
                    "HS01",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x01, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS02",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x02, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS06",
                    Package (0x04)
                    {
                        "UsbConnector",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x06, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS07",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x07, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS09",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x09, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS10",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x0A, 0x00, 0x00, 0x00                    
                        }
                    },

                    "HS12",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0xFF,
                        "port",
                        Buffer (0x04)
                        {
                             0x0C, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP1",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x10, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP2",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x11, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP5",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x14, 0x00, 0x00, 0x00                    
                        }
                    },

                    "SSP6",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,
                        "port",
                        Buffer (0x04)
                        {
                             0x15, 0x00, 0x00, 0x00                    
                        }
                    }
                }
            }
        })
    }
Hope this is helpful for anyone that's looking for it.

FYI: Zbook 15 G2 with 3200x1800 screen has no IntelHD graphic (disabled by default). QE/CI with latest Lilu and Whatevergreen, brightness works.

Oops, it should be posted in here: https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
I'm so sorry for my mistake, could you please move it. Thank you so much!
 
Last edited:
Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630
... I refrain from doing that. I honesty forget all patches that I applied there, and it would be messed up if I removed it.
The goal is to have USBX0 in ioreg, right? Then somehow I managed to do it.
Thanks anyway.
Just delete DSDT.aml, and
Remove
Code (Text):
<key>Name</key>
<string>DSDT.aml</string>
from your config.plist,
Otherwise change EC0 to EC will not work.
If you are afraid of mess up, you can make a backup.
 
Joined
Apr 14, 2013
Messages
87
Motherboard
Aorus Z370 Gaming 7
CPU
i7-8700K
Graphics
GTX 970
Mobile Phone
iOS
Few weeks late but I couldn't get it to work with my previous configuration, even after setting Devices/USB/Inject = true. HighCurrent true/false also didn't seem to make a difference.

I ended up changing my SMBIOS to iMac 18,3 to match my Kaby Lake/Z270 build, and am now trying to make it work using the USBX SSDT method. It still doesn't work, even though I see USBX@0 and EC loaded in IOReg. In system information it says 500mA when my iPhone is plugged in.
I'm attaching the gen_debug.sh output.

Thanks in advance!

Your ioreg shows missing legacy power injections.
You need to set config.plist/Devices/USB/Inject=true.
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I believe i have implemented USB power as my iPhone charges, should this also work for Android devices? They don't show that they are using any extra current.
Your ioreg shows USB power properties implemented as expected.
I don't have any Android devices, therefore no experience with them.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Do you mean adding USBX to UIAC? I merged, can you help me see if it is right?
You would need to attach full problem reporting files as requested in post #1.

You mentioned that need to rename SSDTs references. Is this only needed for static patches?
If you use AutoMerge=true and name your patched SSDTs correctly, config.plist/ACPI/DSDT/Patches will apply to those SSDTs.
Any add-on SSDTs ("add-on SSDTs" are not "patched SSDTs") would need to refer to the new names that result from config.plist/ACPI/DSDT/Patches.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi,
Is there anything missing? I can't find the usbx in ioreg despite using usbinjectall kext and all.
Thanks.

Edit: After lurking around in page 20s, since I didn't find usbx and used 13,2. I should just use EH0 -> EH patch, right?
No expectation of USBX in ioreg without the appropriate ACPI code to add it. Read post #1.

No need for EHCx->EH0x patches for the hardware in your profile (100-series chipset and later do not have EHCI controllers).
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Done.

So I should just get some default kusb* from the internet, and paste it to the SSDT-UIAC? I did it, and it still doesn't show the USBX0 in ioreg. I still can't grasp the understanding about the USBX, sorry.
You cannot use multiple DefinitionBlock with the macOS/OS X ACPI host.
 
Top