Jump to content

UHCI/EHCI built in


tapper00`
 Share

57 posts in this topic

Recommended Posts

First the issues, than the fixes.

 

My usb1 (UHCI) and usb2 (EHCI) ports were showing up in system profiler as "expansion slots". This was causing 2 main problems for me. First, I had to use the power button to wake the computer from sleep. Second, if I had a usb drive plugged in when the computer went to sleep, I would get a "device removal error" when the computer woke from sleep.

 

I combined two different dsdt fixes I found. One fixed UHCI but not EHCI, the other did just the opposite.

 

I combined the dsdt fix for UHCI found here: http://www.insanelymac.com/forum/index.php...68014&st=20

 

and the EHCI fix found here:

http://www.insanelymac.com/forum/index.php...p;#entry1240686

 

Now I can wake the computer from sleep by clicking my USB mouse and I dont have to eject USB drives before putting the computer to sleep. I also do not get the "controller will be unloaded across sleep" error when booting in verbose mode.

 

This works great on ep-35-ds3p, but should work for ich9 and ich10 gigabyte boards, since device id's were changed to match ich10.

 

Also, pay attention to the usb device with address 0x001D0003, for me it was US31, dont edit this device.

 

Device (USB0)
           {
               Name (_ADR, 0x001D0000)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x34, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x03, 
                   0x03
               })
           }

           Device (USB1)
           {
               Name (_ADR, 0x001D0001)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x35, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x04, 
                   0x03
               })
           }

           Device (USB2)
           {
               Name (_ADR, 0x001D0002)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x36, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0C, 
                   0x03
               })
           }

           Device (US31)
           {
               Name (_ADR, 0x001D0003)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0E, 
                   0x03
               })
           }

           Device (USB3)
           {
               Name (_ADR, 0x001A0000)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x37, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0E, 
                   0x03
               })
           }

           Device (USB4)
           {
               Name (_ADR, 0x001A0001)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x38, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x05, 
                   0x03
               })
           }

           Device (USB5)
           {
               Name (_ADR, 0x001A0002)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x39, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x20, 
                   0x03
               })
           }

           Device (USBE)
           {
               Name (_ADR, 0x001D0007)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0D, 
                   0x03
               })
               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x04)
                       {
                           "AAPL,clock-id", 
                           Buffer (One)
                           {
                               0x01
                           }, 

                           "device_type", 
                           Buffer (0x05)
                           {
                               "EHCI"
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }
           }

           Device (USE2)
           {
               Name (_ADR, 0x001A0007)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0D, 
                   0x03
               })
               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x04)
                       {
                           "AAPL,clock-id", 
                           Buffer (One)
                           {
                               0x02
                           }, 

                           "device_type", 
                           Buffer (0x05)
                           {
                               "EHCI"
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }
           }

 

 

UPDATE: Because of the the number requests, here is my dsdt with the fix added.

DSDT.aml.zip

Link to comment
Share on other sites

There are a few possible problems. Could be bios setting or DSDT. From what I have seen, EHCI/UCHI USB ports work regardless except across sleep. Are you using DSDT patch?

 

I dont have the same board but... If you want to post your DSDT, I would be happy to take a look at it.

Link to comment
Share on other sites

There are a few possible problems. Could be bios setting or DSDT. From what I have seen, EHCI/UCHI USB ports work regardless except across sleep. Are you using DSDT patch?

 

I dont have the same board but... If you want to post your DSDT, I would be happy to take a look at it.

 

 

I used patched DSDT (i think it was called ACPI Patcher that run in Windows).

I will attach two files here, DSDT.aml is the one that i am currently use and dsdt.dsl is the one that generated by getDSDT.sh from DSDT_Patcher1.0.1e.

 

Just remove the .zip extensions once downloaded.

 

 

Thanks,

 

 

Tommy

DSDT.aml.zip

dsdt.dsl.zip

Link to comment
Share on other sites

This fix works on ICH9 or ICH10, the P5W DH Deluxe in your sig is an ICH7. But There is a few things you can try.

 

I did a little research though, and most people with your board had to delete the AppleHPET.kext to get those ports to work. Worth a try.

 

Also, Chameleon 2 has boot flags you can add to the com.apple.Boot.plist that may help. Google chameleon and EHCI Acquire. might work.

 

What bios version are you using? Bios 2704 had an option for EHCI pass off, newer bios versions don't have that option (I believe) don't know if that would help.

 

Again, I don't have that board to try any of this but, there are quite a few threads at insanely mac that work through most of the problems.

Link to comment
Share on other sites

First the issues, than the fixes.

 

My usb1 (UHCI) and usb2 (EHCI) ports were showing up in system profiler as "expansion slots". This was causing 2 main problems for me. First, I had to use the power button to wake the computer from sleep. Second, if I had a usb drive plugged in when the computer went to sleep, I would get a "device removal error" when the computer woke from sleep.

 

I combined two different dsdt fixes I found. One fixed UHCI but not EHCI, the other did just the opposite.

 

I combined the dsdt fix for UHCI found here: http://www.insanelymac.com/forum/index.php...68014&st=20

 

and the EHCI fix found here:

http://www.insanelymac.com/forum/index.php...p;#entry1240686

 

Now I can wake the computer from sleep by clicking my USB mouse and I dont have to eject USB drives before putting the computer to sleep. I also do not get the "controller will be unloaded across sleep" error when booting in verbose mode.

 

This works great on ep-35-ds3p, but should work for ich9 and ich10 gigabyte boards, since device id's were changed to match ich10.

 

Also, pay attention to the usb device with address 0x001D0003, for me it was US31, dont edit this device.

 

Device (USB0)
           {
               Name (_ADR, 0x001D0000)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x34, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x03, 
                   0x03
               })
           }

           Device (USB1)
           {
               Name (_ADR, 0x001D0001)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x35, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x04, 
                   0x03
               })
           }

           Device (USB2)
           {
               Name (_ADR, 0x001D0002)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x36, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0C, 
                   0x03
               })
           }

           Device (US31)
           {
               Name (_ADR, 0x001D0003)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0E, 
                   0x03
               })
           }

           Device (USB3)
           {
               Name (_ADR, 0x001A0000)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x37, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0E, 
                   0x03
               })
           }

           Device (USB4)
           {
               Name (_ADR, 0x001A0001)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x38, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x05, 
                   0x03
               })
           }

           Device (USB5)
           {
               Name (_ADR, 0x001A0002)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x02)
                       {
                           "device-id", 
                           Buffer (0x04)
                           {
                               0x39, 0x3A, 0x00, 0x00
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

               Name (_PRW, Package (0x02)
               {
                   0x20, 
                   0x03
               })
           }

           Device (USBE)
           {
               Name (_ADR, 0x001D0007)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0D, 
                   0x03
               })
               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x04)
                       {
                           "AAPL,clock-id", 
                           Buffer (One)
                           {
                               0x01
                           }, 

                           "device_type", 
                           Buffer (0x05)
                           {
                               "EHCI"
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }
           }

           Device (USE2)
           {
               Name (_ADR, 0x001A0007)
               Method (_S3D, 0, NotSerialized)
               {
                   If (LEqual (OSFL, 0x02))
                   {
                       Return (0x02)
                   }

                   Return (0x03)
               }

               Name (_PRW, Package (0x02)
               {
                   0x0D, 
                   0x03
               })
               Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x04)
                       {
                           "AAPL,clock-id", 
                           Buffer (One)
                           {
                               0x02
                           }, 

                           "device_type", 
                           Buffer (0x05)
                           {
                               "EHCI"
                           }
                       }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }
           }

 

 

Mate this fix worked like a charm on my GA-EP 35 DS3L.

 

Cheers

Link to comment
Share on other sites

This fix works on ICH9 or ICH10, the P5W DH Deluxe in your sig is an ICH7. But There is a few things you can try.

 

I did a little research though, and most people with your board had to delete the AppleHPET.kext to get those ports to work. Worth a try.

 

Also, Chameleon 2 has boot flags you can add to the com.apple.Boot.plist that may help. Google chameleon and EHCI Acquire. might work.

 

What bios version are you using? Bios 2704 had an option for EHCI pass off, newer bios versions don't have that option (I believe) don't know if that would help.

 

Again, I don't have that board to try any of this but, there are quite a few threads at insanely mac that work through most of the problems.

 

 

My BIOS is 2801, it does have EHCI pass off feature and enabled.

I already have EHCIAcquire enabled in boot.plist.

 

I will try removing AppleHPET.kext see if that make any different.

 

 

Tommy

Link to comment
Share on other sites

Mate this fix worked like a charm on my GA-EP 35 DS3L.

 

Cheers

 

Glad I could help. Credit goes to the original posters.

 

All I did was combine two different fixes and put them somewhere so people didn't have to read through a months worth of posts to find this.

Link to comment
Share on other sites

On a GA P35-DS4 v14a of BIOS

I'm going to check my BIOS settings, but this fix while it does properly reset the USB buses as built-in prevents my setup from going to sleep. It could before. Not sure I want to start disabling HPET as another user suggested. There was only a small change for my setup, USB3 and US31 had the reverse addresses. I'm going to try without changing the EHCI devices and see if that works for me. Would be nice to power up from keyboard.

Link to comment
Share on other sites

OK, perplexed. Maybe I was dyslexic or actually updating my BIOS to v14 from 14a made the difference but I now have wake from usb working (p35-DS4 rev 2.0). I did disable USB legacy storage after the BIOS update, not sure if that could have played a role in it. Great stuff. Now I just have to fix c-state tables and if I care get rid of sound assertions and this hack will be all good.

Link to comment
Share on other sites

My BIOS is 2801, it does have EHCI pass off feature and enabled.

I already have EHCIAcquire enabled in boot.plist.

 

I will try removing AppleHPET.kext see if that make any different.

 

 

Tommy

 

 

Tommy, I've got 8 USB ports and Firewire to work by deleting AppleHPET.kext and AppleIntelCPUPowerManagement.kext.

In my EXTRA forlder I only have 4 kexts: AHCIPortInjector, fakesmc, IOAHCIBlockStorageInjector, VoodooHDA.

 

Maybe somebody (like Kabyl) can make custom disabler kext to disable two deleted kexts.

 

Everything works but restart. (shutdown and sleep both work).

 

Hope this helps.

Link to comment
Share on other sites

OK, perplexed. Maybe I was dyslexic or actually updating my BIOS to v14 from 14a made the difference but I now have wake from usb working (p35-DS4 rev 2.0). I did disable USB legacy storage after the BIOS update, not sure if that could have played a role in it. Great stuff. Now I just have to fix c-state tables and if I care get rid of sound assertions and this hack will be all good.

 

Can you share your dsdt.aml? I cannot get sleep to work with the USB fixes. Thanks!

Link to comment
Share on other sites

Can you share your dsdt.aml? I cannot get sleep to work with the USB fixes. Thanks!

Should have mentioned I'm using this fix on 10.5.8 so unsure as how this relates to SL. In the end I copied Tapper00's usb fixes directly, they worked as is on the DS4.

Link to comment
Share on other sites

@Obecny - Glad to here that. I have a friend that wants to set up MacOSX on that same board.

 

@JoeBlack2k - Good to know that it works on the GX48-DS3 (in case I ever upgrade).

 

 

Also, I am thinking of starting a dsdt speed step thread for gigabyte boards..... unless anyone knows of a good one already.

 

@hackcat - Your looking to fix C-states? Do you have P-states working properly?

 

@Di524up - Your sig notes speed step, is with dsdt or another fix.

 

I have not modified my dsdt for speed step...yet. But CPU-I shows it is working somewhat. The multiplier and frequency are throttling up and down, but the voltage remains at the highest p-state (kinda defeats the purpose).

Link to comment
Share on other sites

Hi,

this week I experimented a lot around the UHCI and EHCI fix. You also can combine the EHCI fix with the ID injection. Like here:

 

			Device (USBE)
		 {
			 Name (_ADR, 0x001D0007)
			 Method (_S3D, 0, NotSerialized)
			 {
				 If (LEqual (OSFL, 0x02))
				 {
					 Return (0x02)
				 }

				 Return (0x03)
			 }

			 Name (_PRW, Package (0x02)
			 {
				 0x0D,
				 0x03
			 })

			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x06)
					 {
						 "device-id",
						 Buffer (0x04)
						 {
							 0x3A, 0x3A, 0x00, 0x00
						 },
							  "AAPL,clock-id",
							  Buffer (0x01)
							  {
								  0x01
							  },
							  "device_type",
							  Buffer (0x05)
							  {
								 "EHCI"
							  }

					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }

		 }


		 Device (USE2)
		 {
			 Name (_ADR, 0x001A0007)
			 Method (_S3D, 0, NotSerialized)
			 {
				 If (LEqual (OSFL, 0x02))
				 {
					 Return (0x02)
				 }

				 Return (0x03)
			 }

			 Name (_PRW, Package (0x02)
			 {
				 0x0D,
				 0x03
			 })

			 Method (_DSM, 4, NotSerialized)
			 {
				 Store (Package (0x06)
					 {
						 "device-id",
						 Buffer (0x04)
						 {
							 0x3C, 0x3A, 0x00, 0x00
						 },
							  "AAPL,clock-id",
							  Buffer (0x01)
							  {
								  0x02
							  },
							  "device_type",
							  Buffer (0x05)
							  {
								 "EHCI"
							  }

					 }, Local0)
				 DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				 Return (Local0)
			 }

		 }

 

To enable wake up by UHCI. Change

				Name (_PRW, Package (0x02)
			  {
				  0x0D,
				  One
			  })

 

to

 

				Name (_PRW, Package (0x02)
			  {
				  0x0D,
				  0x03
			  })

 

in all USB devices. So always change One into 0x03 this enables wake up from USB 1 devices.

 

Wake up by EHCI/USB2 devices like the Apple alu keyboard isn't possible until we have found a fix.

Link to comment
Share on other sites

In the original post, for UHCI, all the prw packages have already been changed from one to 0x03.

 

As far as the EHCI device id's: (0x3A,0x3A and 0x3C,0x3A) I tried this initially but on my system I would get a kernel panic after extended sleep times (overnight). If I remember correctly it also did not fix the "device removal error" after waking with usb device plugged in.

 

But I'm glad its working for your system.

Link to comment
Share on other sites

 Share

×
×
  • Create New...