Contribute
Register

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

Hi RehabMan,

I am a new hacker. From this thread and the config-HD630*.plist you provided, there 3 ways to implement USB power property injection for machines with EC device:
  1. Change EC0 to EC;
  2. Change H_EC to EC;
  3. Chang ECDV to EC.
However, the third(ECDV to EC) method you did not mention on this tutorial(mention in the comment). For the third method, can I understand this: there's some left laptops use ECDV for the Embedded Controller?

More Important:
In my DSDT.aml(see attachment), there are 2 kind of EC devices: ECDV and H_EC(return zero). How should I patch this situation? Can you help me to check?

You can look at ioreg to determine what name your native ACPI uses for the EC.
 
You can look at ioreg to determine what name your native ACPI uses for the EC.

How to check? Is it checked before or after the patch? (The patch now is Change ECDV to EC)
 

Attachments

  • PR-HackXiong.zip
    4.9 MB · Views: 98
Because of network issue, I can not use the gen_debug.sh tool.

Actually the gen_debug.sh README has instructions for off-line use.

But your ioreg shows EC. Native is ECDV, but your config.plist is renaming ECDV to EC. Without the patch, you would see ECDV in ioreg.

Relevant part of native DSDT:
Code:
        Device (ECDV)
        {
            Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
...
            Method (_STA, 0, Serialized)  // _STA: Status
            {
                Return (0x0F)
            }

You still need to read post #1 regarding USBX.
 
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.
 

Attachments

  • debug_32768.zip
    5.5 MB · Views: 109
But your ioreg shows EC. Native is ECDV, but your config.plist is renaming ECDV to EC. Without the patch, you would see ECDV in ioreg.

:thumbup:, I see ECDV in ioreg after disable that patch.

You still need to read post #1 regarding USBX.
Do you mean adding USBX to UIAC? I merged, can you help me see if it is right?

You're using H_EC->EC patch in config.plist/ACPI/DSDT/Patches... but this patch applies only to ACPI/patched/DSDT.aml, not the SSDTs you have in ACPI/patched. And in ACPI/patched, I find SSDTs with H_EC references:
You mentioned that need to rename SSDTs references. Is this only needed for static patches?
 

Attachments

  • SSDT-USB-P5520.aml
    497 bytes · Views: 95
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?
 

Attachments

  • problem reporting.zip
    3.9 MB · Views: 98
Last edited:
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?

EH0->EH* used for USB port discovery. See https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/ .

Your config.plist has no any patch for the Embedded Controller, need Change EC0 to EC patch. You do not need SSDT-EC.aml.

Relevant part of native DSDT:
Code:
Device (EC0)
        {
            Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
            Name (_GPE, 0x50)  // _GPE: General Purpose Events
            Name (OKEC, One)
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {

You still need to read post #1 about USBX:
For SMBIOS that are not already covered in IOUSBHostFamily.kext/Contents/Info.plist, you will need to inject the USBX device in order to provide the power properties for AppleBusPowerControllerUSB.
 
EH0->EH* used for USB port discovery. See https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/ .

Your config.plist has no any patch for the Embedded Controller, need Change EC0 to EC patch. You do not need SSDT-EC.aml.
Done.
You still need to read post #1 about USBX:
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.
 

Attachments

  • Archive.zip
    3.8 MB · Views: 97
Back
Top