Add support for A-Open DXPL Plus-U motherboard
[coreboot.git] / src / mainboard / aopen / dxplplusu / acpi / power.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 Kyösti Mälkki <kyosti.malkki@gmail.com>
5  *
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.
9  *
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.
14  *
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
18  */
19
20
21 /* Board powers on with button or PME# from on-board GbE wake-on-lan.
22  * Board shuts down to S5/G2. Any other power management is untested.
23  */
24
25 Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
26 Name (\_S1, Package () { 0x01, 0x01, 0x00, 0x00 })
27 Name (\_S3, Package () { 0x05, 0x05, 0x00, 0x00 })
28 Name (\_S4, Package () { 0x06, 0x06, 0x00, 0x00 })
29 Name (\_S5, Package () { 0x07, 0x07, 0x00, 0x00 })
30
31 Scope (\_GPE)
32 {
33         Method (_L03, 0, NotSerialized)
34         {
35                 Notify (\_SB.PCI0.USB0, 0x02)
36         }
37         Method (_L04, 0, NotSerialized)
38         {
39                 Notify (\_SB.PCI0.USB1, 0x02)
40         }
41
42         /* WOL header */
43         Method (_L08, 0, NotSerialized)
44         {
45                 Notify (\_SB.PCI0.PCI5, 0x02)
46                 Notify (\_SB.SLBT, 0x02)
47         }
48
49         /* PME# */
50         Method (_L0B, 0, NotSerialized)
51         {
52 #if 1
53                 Notify (\_SB.LID0, 0x02)
54 #else
55                 Notify (\_SB.PCI0.HLIB.P64B.ETH0, 0x02)
56                 Notify (\_SB.PCI0.HLIB.P64B, 0x02)
57                 Notify (\_SB.PCI0.HLIB.P64A, 0x02)
58 #endif
59         }
60
61         Method (_L0C, 0, NotSerialized)
62         {
63                 Notify (\_SB.PCI0.USB2, 0x02)
64         }
65
66         /* PME_B0_STS# */
67         Method (_L0D, 0, NotSerialized)
68         {
69                 Notify (\_SB.PCI0.USB3, 0x02)
70         }
71 }
72
73 /* Clear power buttons */
74 Method (\_INI, 0, NotSerialized)
75 {
76         Or (\_SB.PCI0.ICH0.PS1H, 0x09, \_SB.PCI0.ICH0.PS1H)
77         Or (\_SB.PCI0.ICH0.PE1H, 0x01, \_SB.PCI0.ICH0.PE1H)
78 }
79
80 /* Prepare To Sleep */
81 Method (\_PTS, 1, NotSerialized)
82 {
83         Or (\_SB.PCI0.ICH0.GS0H, 0x19, \_SB.PCI0.ICH0.GS0H)
84         Or (\_SB.PCI0.ICH0.GS0L, 0x11, \_SB.PCI0.ICH0.GS0L)
85 }
86
87 /* System Wake */
88 Method (\_WAK, 1, NotSerialized)
89 {
90         Or (\_SB.PCI0.ICH0.GS0H, 0x19, \_SB.PCI0.ICH0.GS0H)
91         Or (\_SB.PCI0.ICH0.GS0L, 0x11, \_SB.PCI0.ICH0.GS0L)
92
93         Return ( Package() { 0x0, 0x0 } )
94 }
95