2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 * The mainboard must define a PNOT method to handle power
22 * state notifications and Notify CPU device objects to
23 * re-evaluate their _PPC and _CST tables.
28 Name (_HID, EISAID ("PNP0C09"))
30 Name (_GPE, EC_GPE) // GPE for Runtime SCI
32 OperationRegion (ERAM, EmbeddedControl, 0x00, 0xff)
33 Field (ERAM, ByteAcc, Lock, Preserve)
36 BTEX, 1, // Battery Exists
41 LIDS, 1, // Lid Switch State
43 BTST, 8, // Battery State
45 BTRA, 16, // Battery Remaining Capacity
46 BTPR, 16, // Battery Present Rate
47 BTVO, 16, // Battery Present Voltage
49 BTDA, 16, // Battery Design Capacity
50 BTDF, 16, // Battery Last Full Charge Capacity
51 BTDV, 16, // Battery Design Voltage
52 BTDL, 16, // Battery Design Low
54 CPUT, 8, // CPU Temperature
56 FSL0, 1, // Fan Speed Level 0
57 FSL1, 1, // Fan Speed Level 1
58 FSL2, 1, // Fan Speed Level 2
59 FSL3, 1, // Fan Speed Level 3
60 FSL4, 1, // Fan Speed Level 4
62 FCOS, 1, // Fan Speed OS Control
65 Method (_CRS, 0, NotSerialized)
67 Name (ECMD, ResourceTemplate()
69 IO (Decode16, 0x62, 0x62, 0, 1)
70 IO (Decode16, 0x66, 0x66, 0, 1)
75 Method (_REG, 2, NotSerialized)
77 // Initialize AC power state
80 // Initialize LID switch state
83 // Enable OS control of fan speed
86 // Force a read of CPU temperature
90 PowerResource (FNP0, 0, 0)
92 Method (_STA) { Return (FSL0) }
97 Notify (\_TZ.THRM, 0x81)
104 Notify (\_TZ.THRM, 0x81)
109 PowerResource (FNP1, 0, 0)
111 Method (_STA) { Return (FSL1) }
116 Notify (\_TZ.THRM, 0x81)
123 Notify (\_TZ.THRM, 0x81)
128 PowerResource (FNP2, 0, 0)
130 Method (_STA) { Return (FSL2) }
135 Notify (\_TZ.THRM, 0x81)
142 Notify (\_TZ.THRM, 0x81)
147 PowerResource (FNP3, 0, 0)
149 Method (_STA) { Return (FSL3) }
154 Notify (\_TZ.THRM, 0x81)
161 Notify (\_TZ.THRM, 0x81)
166 PowerResource (FNP4, 0, 0)
168 Method (_STA) { Return (FSL4) }
173 Notify (\_TZ.THRM, 0x81)
180 Notify (\_TZ.THRM, 0x81)
187 Name (_HID, EISAID ("PNP0C0B"))
189 Name (_PR0, Package () { FNP0 })
194 Name (_HID, EISAID ("PNP0C0B"))
196 Name (_PR0, Package () { FNP1 })
201 Name (_HID, EISAID ("PNP0C0B"))
203 Name (_PR0, Package () { FNP2 })
208 Name (_HID, EISAID ("PNP0C0B"))
210 Name (_PR0, Package () { FNP3 })
215 Name (_HID, EISAID ("PNP0C0B"))
217 Name (_PR0, Package () { FNP4 })
220 // AC Power Connected
221 Method (_Q51, 0, NotSerialized)
229 Method (_Q52, 0, NotSerialized)
236 // Battery State Change
237 Method (_Q53, 0, NotSerialized)
243 // Battery State Change
244 Method (_Q54, 0, NotSerialized)
250 // Power State Change
251 Method (_Q55, 0, NotSerialized)
257 Method (_Q5E, 0, NotSerialized)
260 Notify (\_SB.LID0, 0x80)
264 Method (_Q5F, 0, NotSerialized)
267 Notify (\_SB.LID0, 0x80)
271 #include "battery.asl"