diff --git a/Patches.xcodeproj/project.pbxproj b/Patches.xcodeproj/project.pbxproj
index 91817fd..84d77ef 100644
--- a/Patches.xcodeproj/project.pbxproj
+++ b/Patches.xcodeproj/project.pbxproj
@@ -18,6 +18,8 @@
ED16FCE51C98D3F6002B97A6 /* SSDT-XWAK.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-XWAK.dsl"; path = "hotpatch/SSDT-XWAK.dsl"; sourceTree = "<group>"; };
ED2500581CF681E2006A5FB7 /* config_HD5600.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = config_HD5600.plist; sourceTree = "<group>"; };
ED3636B91CA426EF004CE8B4 /* config_HD520_530_540.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = config_HD520_530_540.plist; sourceTree = "<group>"; };
+ ED415C871DDE28C900AC633E /* SSDT-Disable_EH01.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-Disable_EH01.dsl"; path = "hotpatch/SSDT-Disable_EH01.dsl"; sourceTree = "<group>"; };
+ ED415C881DDE28CF00AC633E /* SSDT-Disable_EH02.dsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "SSDT-Disable_EH02.dsl"; path = "hotpatch/SSDT-Disable_EH02.dsl"; sourceTree = "<group>"; };
ED57679B1CF5D81300ABAEF8 /* config_HD550.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = config_HD550.plist; sourceTree = "<group>"; };
ED6DB3B41C873F5C00DB1B7A /* config_HD3000_1366x768_7series.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = config_HD3000_1366x768_7series.plist; sourceTree = "<group>"; };
ED6DB3B51C873F5C00DB1B7A /* config_HD3000_1366x768.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = config_HD3000_1366x768.plist; sourceTree = "<group>"; };
@@ -105,6 +107,8 @@
ED9956131C94BA0C00B3B13F /* SSDT-LANC_PRW.dsl */,
ED99560F1C94BA0C00B3B13F /* SSDT-PTSWAK.dsl */,
ED99560E1C94BA0C00B3B13F /* SSDT-Disable_EHCI.dsl */,
+ ED415C871DDE28C900AC633E /* SSDT-Disable_EH01.dsl */,
+ ED415C881DDE28CF00AC633E /* SSDT-Disable_EH02.dsl */,
ED16FCE51C98D3F6002B97A6 /* SSDT-XWAK.dsl */,
EDB68B771C99B72500147700 /* SSDT-XSEL.dsl */,
EDD76F281C9B1E4A0023D100 /* SSDT-ESEL.dsl */,
diff --git a/hotpatch/SSDT-Disable_EH01.dsl b/hotpatch/SSDT-Disable_EH01.dsl
new file mode 100644
index 0000000..d0b9104
--- /dev/null
+++ b/hotpatch/SSDT-Disable_EH01.dsl
@@ -0,0 +1,49 @@
+// Disabling EHCI #1 (and EHCI #2)
+
+DefinitionBlock("", "SSDT", 2, "hack", "D-EH01", 0)
+{
+ External(_SB.PCI0, DeviceObj)
+ External(_SB.PCI0.EH01, DeviceObj)
+ External(_SB.PCI0.LPCB, DeviceObj)
+
+ // registers needed for disabling EHC#1
+ Scope(_SB.PCI0.EH01)
+ {
+ OperationRegion(RMP1, PCI_Config, 0x54, 2)
+ Field(RMP1, WordAcc, NoLock, Preserve)
+ {
+ PSTE, 2 // bits 2:0 are power state
+ }
+ }
+ Scope(_SB.PCI0.LPCB)
+ {
+ OperationRegion(RMP3, PCI_Config, 0xF0, 4)
+ Field(RMP3, DWordAcc, NoLock, Preserve)
+ {
+ RCB3, 32, // Root Complex Base Address
+ }
+ // address is in bits 31:14
+ OperationRegion(FDM3, SystemMemory, (RCB3 & Not((1<<14)-1)) + 0x3418, 4)
+ Field(FDM3, DWordAcc, NoLock, Preserve)
+ {
+ ,15, // skip first 15 bits
+ FDE1,1, // should be bit 15 (0-based) (FD EHCI#1)
+ }
+ }
+ Scope(_SB.PCI0)
+ {
+ Device(RMD3)
+ {
+ Name(_HID, "RMD30000")
+ Method(_INI)
+ {
+ // disable EHCI#1
+ // put EHCI#1 in D3hot (sleep mode)
+ ^^EH01.PSTE = 3
+ // disable EHCI#1 PCI space
+ ^^LPCB.FDE1 = 1
+ }
+ }
+ }
+}
+//EOF
diff --git a/hotpatch/SSDT-Disable_EH02.dsl b/hotpatch/SSDT-Disable_EH02.dsl
new file mode 100644
index 0000000..4a04934
--- /dev/null
+++ b/hotpatch/SSDT-Disable_EH02.dsl
@@ -0,0 +1,49 @@
+// Disabling EHCI #1 (and EHCI #2)
+
+DefinitionBlock("", "SSDT", 2, "hack", "D-EH02", 0)
+{
+ External(_SB.PCI0, DeviceObj)
+ External(_SB.PCI0.EH02, DeviceObj)
+ External(_SB.PCI0.LPCB, DeviceObj)
+
+ // registers needed for disabling EHC#1
+ Scope(_SB.PCI0.EH02)
+ {
+ OperationRegion(RMP1, PCI_Config, 0x54, 2)
+ Field(RMP1, WordAcc, NoLock, Preserve)
+ {
+ PSTE, 2 // bits 2:0 are power state
+ }
+ }
+ Scope(_SB.PCI0.LPCB)
+ {
+ OperationRegion(RMP4, PCI_Config, 0xF0, 4)
+ Field(RMP4, DWordAcc, NoLock, Preserve)
+ {
+ RCB4, 32, // Root Complex Base Address
+ }
+ // address is in bits 31:14
+ OperationRegion(FDM4, SystemMemory, (RCB4 & Not((1<<14)-1)) + 0x3418, 4)
+ Field(FDM4, DWordAcc, NoLock, Preserve)
+ {
+ ,13, // skip first 13 bits
+ FDE2,1, // should be bit 13 (0-based) (FD EHCI#2)
+ }
+ }
+ Scope(_SB.PCI0)
+ {
+ Device(RMD4)
+ {
+ Name(_HID, "RMD40000")
+ Method(_INI)
+ {
+ // disable EHCI#2
+ // put EHCI#2 in D3hot (sleep mode)
+ ^^EH02.PSTE = 3
+ // disable EHCI#2 PCI space
+ ^^LPCB.FDE2 = 1
+ }
+ }
+ }
+}
+//EOF
diff --git a/hotpatch/SSDT-XHC.dsl b/hotpatch/SSDT-XHC.dsl
index 693a7f2..2df2862 100644
--- a/hotpatch/SSDT-XHC.dsl
+++ b/hotpatch/SSDT-XHC.dsl
@@ -21,7 +21,7 @@ DefinitionBlock("", "SSDT", 2, "hack", "XHC", 0)
"AAPL,max-port-current-in-sleep", Buffer() { 0x34, 0x08, 0, 0 },
}
// force USB2 on XHC if EHCI is disabled
- If (CondRefOf(\_SB.PCI0.RMD2))
+ If (CondRefOf(\_SB.PCI0.RMD2) || CondRefOf(\_SB.PCI0.RMD3) || CondRefOf(\_SB.PCI0.RMD4))
{
CreateDWordField(DerefOf(Local0[1]), 0, PR2F)
PR2F = 0x3fff