Now I repeat the same observation with Dell 1525 Snow 10.6.2.
Previously I have no (EC) device in DSDT.
- battery indicator works with AppleACPIBatteryManager
- brightness changes by keys Fn+Up/Fn+Down, but not with Fn+Scroll/Fn+Pause that show me sun on the screen.
Now I add EC device according to MacBook4,1 DSDT
CODE
Device (EC)
{
Name (_HID, EisaId ("PNP0C09"))
Name (_GPE, 0x17)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x00, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x00, // Alignment
0x01, // Length
)
})
OperationRegion (ECO1, SystemIO, 0x62, One)
Field (ECO1, ByteAcc, Lock, Preserve)
{
PX62, 8
}
OperationRegion (ECO2, SystemIO, 0x66, One)
Field (ECO2, ByteAcc, Lock, Preserve)
{
PX66, 8
}
Name(REGC,Ones)
Method(_REG,2) {
If(Lequal(Arg0, 3)) {
Store(Arg1, REGC)
}
}
Method(ECAV,0) {
If(Lequal(REGC,Ones)) {
If(LgreaterEqual(_REV,2)) {
Return(One)
}
Else {
Return(Zero)
}
}
Return(REGC)
}
Name (_PRW, Package (0x02)
{
0x18,
0x03
})
Name (ECOK, 0x00)
OperationRegion (ECOR, EmbeddedControl, 0x00, 0xFF)
Field (ECOR, ByteAcc, Lock, Preserve)
{
ECVS, 8,
LSTE, 1,
RPWR, 1,
CDIN, 1,
Offset (0x02),
LWAK, 1,
ACWK, 1,
CDWK, 1,
Offset (0x03),
Offset (0x10),
ECSS, 8,
PLIM, 8,
Offset (0x20),
SPTR, 8,
SSTS, 8,
SADR, 8,
SCMD, 8,
SBFR, 256,
SCNT, 8,
SAAD, 8,
SAD0, 8,
SAD1, 8,
SMUX, 8
}
Field (ECOR, ByteAcc, Lock, Preserve)
{
Offset (0x24),
SBDW, 16,
Offset (0x46),
SADW, 16
}
Device (SMB0)
{
Name (_HID, "ACPI0001")
Name (_EC, 0x2010)
Mutex (SMTX, 0x00)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Device (SBS0)
{
Name (_HID, "ACPI0002")
Name (_SBS, 0x01)
}
Method (SBPC, 1, NotSerialized)
{
Store (Arg0, Local0)
While (Local0)
{
If (LEqual (SPTR, 0x00))
{
Return (And (SSTS, 0x1F))
}
Sleep (0x01)
Decrement (Local0)
}
Return (0x18)
}
Method (SBRW, 3, NotSerialized)
{
Store (One, Local0)
If (LNot (Acquire (\_SB.PCI0.LPCB.EC.SMB0.SMTX, 0xFFFF)))
{
If (LEqual (SPTR, 0x00))
{
Store (ShiftLeft (Arg0, 0x01), SADR)
Store (Arg1, SCMD)
Store (0x09, SPTR)
Store (SBPC (0x03E8), Local0)
If (LNot (Local0))
{
Store (SBDW, Arg2)
}
}
Release (\_SB.PCI0.LPCB.EC.SMB0.SMTX)
}
Return (Local0)
}
Method (SBRB, 3, NotSerialized)
{
Store (One, Local0)
Store (Buffer (0x01)
{
0x00
}, Local1)
If (LNot (Acquire (\_SB.PCI0.LPCB.EC.SMB0.SMTX, 0xFFFF)))
{
If (LEqual (SPTR, 0x00))
{
Store (ShiftLeft (Arg0, 0x01), SADR)
Store (Arg1, SCMD)
Store (0x0B, SPTR)
Store (SBPC (0x03E8), Local0)
If (LNot (Local0))
{
Store (SBFR, Arg2)
}
}
Release (\_SB.PCI0.LPCB.EC.SMB0.SMTX)
}
Return (Local0)
}
}
Method (_Q10, 0, NotSerialized)
{
Notify (\_SB.PCI0.LPCB.EC.SMB0, 0x80)
}
// I don't know what methods must be for brightness control
Method (_Q1C, 0, NotSerialized)
{
Store (0x1C, P80H)
Notify (\_SB.PCI0.GFX0.LCD, 0x86)
}
Method (_Q1D, 0, NotSerialized)
{
Store (0x1D, P80H)
Notify (\_SB.PCI0.GFX0.LCD, 0x87)
}
}
Previously these region was occupied by Keyboard device
CODE
Device (KBC)
{
Name (_HID, EisaId ("PNP0303"))
//Name (_CID, "ps2controller")
Name (_UID, 0x0D)
Name (CRS, ResourceTemplate ()
{
IO (Decode16,
0x0060, // Range Minimum
0x0060, // Range Maximum
0x10, // Alignment
0x01, // Length
)
IO (Decode16,
0x0064, // Range Minimum
0x0064, // Range Maximum
0x04, // Alignment
0x01, // Length
)
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x02, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x06, // Alignment
0x01, // Length
)
IRQNoFlags ()
{1}
})
{
Name (_HID, EisaId ("PNP0303"))
//Name (_CID, "ps2controller")
Name (_UID, 0x0D)
Name (CRS, ResourceTemplate ()
{
IO (Decode16,
0x0060, // Range Minimum
0x0060, // Range Maximum
0x10, // Alignment
0x01, // Length
)
IO (Decode16,
0x0064, // Range Minimum
0x0064, // Range Maximum
0x04, // Alignment
0x01, // Length
)
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x02, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x06, // Alignment
0x01, // Length
)
IRQNoFlags ()
{1}
})
Now these events go to EC. (There is no IRQ?)
In this case
- I have no brightness control at all
- battery indicator doesn't change
While all kexts is loaded fine
CODE
| +-o EC <class IOACPIPlatformDevice, id 0x100000126, registered, matched, active, busy 0 (49 ms), retain 12>
| | | {
| | | "IODeviceMemory" = (({"address"=0x62,"length"=0x1}),({"address"=0x66,"length"=0x1}))
| | | "acpi-wake-gpe" = 0x18
| | | "acpi-wake-system-state" = 0x3
| | | "IOInterruptControllers" = ("ACPIEventController")
| | | "_STA" = 0xf
| | | "IOInterruptSpecifiers" = (<1c00000000000000>)
| | | "name" = <504e503043303900>
| | | }
| | |
| | +-o AppleACPIEC <class AppleACPIEC, id 0x1000001de, !registered, !matched, active, busy 0, retain 4>
| | {
| | "IOProbeScore" = 0x0
| | "CFBundleIdentifier" = "com.apple.driver.AppleACPIEC"
| | "IOProviderClass" = "IOACPIPlatformDevice"
| | "IOClass" = "AppleACPIEC"
| | "IOMatchCategory" = "IODefaultMatchCategory"
| | "IONameMatch" = ("PNP0C09","boot-ec")
| | "IONameMatched" = "PNP0C09"
| | }
| |
| +-o SMB0 <class IOACPIPlatformDevice, id 0x100000127, registered, matched, active, busy 0 (172 ms), retain 9>
| | | {
| | | "name" = <414350493030303100>
| | | "_STA" = 0xf
| | | }
| | |
| | +-o AppleECSMBusController <class AppleECSMBusController, id 0x1000001df, registered, matched, active, busy 0 (7 ms), retain 5>
| | | {
| | | "_SBS" = 0x1
| | | "IOSMBusSmartBatteryManager" = Yes
| | | }
| | |
| | +-o AppleSmartBatteryManager <class AppleSmartBatteryManager, id 0x1000001e4, registered, matched, active, busy 0 (1 ms), retain 6>
| | | {
| | | "IOPropertyMatch" = {"IOSMBusSmartBatteryManager"=Yes}
| | | "IOProbeScore" = 0x0
| | | "IOProviderClass" = "IOSMBusController"
| | | "IOClass" = "AppleSmartBatteryManager"
| | | "CFBundleIdentifier" = "com.apple.driver.AppleSmartBatteryManager"
| | | "IOMatchCategory" = "IODefaultMatchCategory"
| | | "IOUserClientClass" = "AppleSmartBatteryManagerUserClient"
| | | "IOPowerManagement" = {"CurrentPowerState"=0x1}
| | | }
| | |
| | +-o AppleSmartBattery <class AppleSmartBattery, id 0x1000001e6, registered, matched, active, busy 0 (1 ms), retain 6>
| | {
| | "CurrentCapacity" = 0x0
| | "Amperage" = 0x0
| | "PostDischargeWaitSeconds" = 0x78
| | "LatestErrorType" = "Read Retry Attempts Exceeded"
| | "TimeRemaining" = 0x0
| | "BatteryInstalled" = No
| | "BatteryInvalidWakeSeconds" = 0x1e
| | "IOGeneralInterest" = "IOCommand is not serializable"
| | "Voltage" = 0x0
| | "Location" = 0x0
| | "CycleCount" = 0x0
| | "PostChargeWaitSeconds" = 0x78
| | "ExternalChargeCapable" = No
| | "AdapterInfo" = 0x0
| | "LegacyBatteryInfo" = {"Amperage"=0x0,"Flags"=0x1,"Capacity"=0x0,"Current"=0x0,"Voltage"=0x0,"Cycle Count"=0x0}
| | "MaxCapacity" = 0x0
| | "IsCharging" = No
| | "ExternalConnected" = Yes
| | "FullyCharged" = No
| | }
| | | {
| | | "IODeviceMemory" = (({"address"=0x62,"length"=0x1}),({"address"=0x66,"length"=0x1}))
| | | "acpi-wake-gpe" = 0x18
| | | "acpi-wake-system-state" = 0x3
| | | "IOInterruptControllers" = ("ACPIEventController")
| | | "_STA" = 0xf
| | | "IOInterruptSpecifiers" = (<1c00000000000000>)
| | | "name" = <504e503043303900>
| | | }
| | |
| | +-o AppleACPIEC <class AppleACPIEC, id 0x1000001de, !registered, !matched, active, busy 0, retain 4>
| | {
| | "IOProbeScore" = 0x0
| | "CFBundleIdentifier" = "com.apple.driver.AppleACPIEC"
| | "IOProviderClass" = "IOACPIPlatformDevice"
| | "IOClass" = "AppleACPIEC"
| | "IOMatchCategory" = "IODefaultMatchCategory"
| | "IONameMatch" = ("PNP0C09","boot-ec")
| | "IONameMatched" = "PNP0C09"
| | }
| |
| +-o SMB0 <class IOACPIPlatformDevice, id 0x100000127, registered, matched, active, busy 0 (172 ms), retain 9>
| | | {
| | | "name" = <414350493030303100>
| | | "_STA" = 0xf
| | | }
| | |
| | +-o AppleECSMBusController <class AppleECSMBusController, id 0x1000001df, registered, matched, active, busy 0 (7 ms), retain 5>
| | | {
| | | "_SBS" = 0x1
| | | "IOSMBusSmartBatteryManager" = Yes
| | | }
| | |
| | +-o AppleSmartBatteryManager <class AppleSmartBatteryManager, id 0x1000001e4, registered, matched, active, busy 0 (1 ms), retain 6>
| | | {
| | | "IOPropertyMatch" = {"IOSMBusSmartBatteryManager"=Yes}
| | | "IOProbeScore" = 0x0
| | | "IOProviderClass" = "IOSMBusController"
| | | "IOClass" = "AppleSmartBatteryManager"
| | | "CFBundleIdentifier" = "com.apple.driver.AppleSmartBatteryManager"
| | | "IOMatchCategory" = "IODefaultMatchCategory"
| | | "IOUserClientClass" = "AppleSmartBatteryManagerUserClient"
| | | "IOPowerManagement" = {"CurrentPowerState"=0x1}
| | | }
| | |
| | +-o AppleSmartBattery <class AppleSmartBattery, id 0x1000001e6, registered, matched, active, busy 0 (1 ms), retain 6>
| | {
| | "CurrentCapacity" = 0x0
| | "Amperage" = 0x0
| | "PostDischargeWaitSeconds" = 0x78
| | "LatestErrorType" = "Read Retry Attempts Exceeded"
| | "TimeRemaining" = 0x0
| | "BatteryInstalled" = No
| | "BatteryInvalidWakeSeconds" = 0x1e
| | "IOGeneralInterest" = "IOCommand is not serializable"
| | "Voltage" = 0x0
| | "Location" = 0x0
| | "CycleCount" = 0x0
| | "PostChargeWaitSeconds" = 0x78
| | "ExternalChargeCapable" = No
| | "AdapterInfo" = 0x0
| | "LegacyBatteryInfo" = {"Amperage"=0x0,"Flags"=0x1,"Capacity"=0x0,"Current"=0x0,"Voltage"=0x0,"Cycle Count"=0x0}
| | "MaxCapacity" = 0x0
| | "IsCharging" = No
| | "ExternalConnected" = Yes
| | "FullyCharged" = No
| | }
Any one has working the things with AppleACPIEC presents? Publish, please, your DSDT.
If you have EC and have no brightness control try to exclude it as me before and assign 62, 66 to KBC device.
Fn Keys problem resolved!
http://www.projectosx.com/forum/index.php?showtopic=1452

