tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / ec / google / chromeec / acpi / superio.asl
blob04b112f7f723066a3d9785b9bc7d3b2500241135
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2012 The ChromiumOS Authors.  All rights reserved.
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  */
17  * Chrome OS Embedded Controller interface
18  *
19  * Constants that should be defined:
20  *
21  * SIO_EC_MEMMAP_ENABLE     : Enable EC LPC memory map resources
22  * EC_LPC_ADDR_MEMMAP       : Base address of memory map range
23  * EC_MEMMAP_SIZE           : Size of memory map range
24  *
25  * SIO_EC_HOST_ENABLE       : Enable EC host command interface resources
26  * EC_LPC_ADDR_HOST_DATA    : EC host command interface data port
27  * EC_LPC_ADDR_HOST_CMD     : EC host command interface command port
28  * EC_HOST_CMD_REGION0      : EC host command buffer
29  * EC_HOST_CMD_REGION1      : EC host command buffer
30  * EC_HOST_CMD_REGION_SIZE  : EC host command buffer size
31  */
33 // Scope is \_SB.PCI0.LPCB
35 Device (SIO) {
36         Name (_UID, 0)
37         Name (_ADR, 0)
39 #ifdef SIO_EC_MEMMAP_ENABLE
40         Device (ECMM) {
41                 Name (_HID, EISAID ("PNP0C02"))
42                 Name (_UID, 1)
43                 Name (_ADR, 0)
45                 Method (_STA, 0, NotSerialized) {
46                         Return (0x0F)
47                 }
49                 Name (_CRS, ResourceTemplate ()
50                 {
51                         IO (Decode16, EC_LPC_ADDR_MEMMAP, EC_LPC_ADDR_MEMMAP,
52                             0x08, EC_MEMMAP_SIZE)
53                 })
55                 Name (_PRS, ResourceTemplate ()
56                 {
57                         IO (Decode16, EC_LPC_ADDR_MEMMAP, EC_LPC_ADDR_MEMMAP,
58                             0x08, EC_MEMMAP_SIZE)
59                 })
60         }
61 #endif
63 #ifdef SIO_EC_HOST_ENABLE
64         Device (ECUI) {
65                 Name (_HID, EISAID ("PNP0C02"))
66                 Name (_UID, 3)
67                 Name (_ADR, 0)
69                 Method (_STA, 0, NotSerialized) {
70                         Return (0x0F)
71                 }
73                 Name (_CRS, ResourceTemplate ()
74                 {
75                         IO (Decode16,
76                             EC_LPC_ADDR_HOST_DATA, EC_LPC_ADDR_HOST_DATA,
77                             0x01, 0x01)
78                         IO (Decode16,
79                             EC_LPC_ADDR_HOST_CMD, EC_LPC_ADDR_HOST_CMD,
80                             0x01, 0x01)
81                         IO (Decode16,
82                             EC_HOST_CMD_REGION0, EC_HOST_CMD_REGION0, 0x08,
83                             EC_HOST_CMD_REGION_SIZE)
84                         IO (Decode16,
85                             EC_HOST_CMD_REGION1, EC_HOST_CMD_REGION0, 0x08,
86                             EC_HOST_CMD_REGION_SIZE)
87                 })
89                 Name (_PRS, ResourceTemplate ()
90                 {
91                         StartDependentFn (0, 0) {
92                                 IO (Decode16, EC_LPC_ADDR_HOST_DATA,
93                                     EC_LPC_ADDR_HOST_DATA, 0x01, 0x01)
94                                 IO (Decode16, EC_LPC_ADDR_HOST_CMD,
95                                     EC_LPC_ADDR_HOST_CMD, 0x01, 0x01)
96                                 IO (Decode16,
97                                     EC_HOST_CMD_REGION0, EC_HOST_CMD_REGION0,
98                                     0x08, EC_HOST_CMD_REGION_SIZE)
99                                 IO (Decode16,
100                                     EC_HOST_CMD_REGION1, EC_HOST_CMD_REGION1,
101                                     0x08, EC_HOST_CMD_REGION_SIZE)
102                         }
103                         EndDependentFn ()
104                 })
105         }
106 #endif
108 #ifdef SIO_EC_ENABLE_COM1
109         Device (COM1) {
110                 Name (_HID, EISAID ("PNP0501"))
111                 Name (_UID, 1)
112                 Name (_ADR, 0)
114                 Method (_STA, 0, NotSerialized) {
115                         Return (0x0F)
116                 }
118                 Name (_CRS, ResourceTemplate ()
119                 {
120                         IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08)
121                         IRQNoFlags () {4}
122                 })
124                 Name (_PRS, ResourceTemplate ()
125                 {
126                         StartDependentFn (0, 0) {
127                                 IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08)
128                                 IRQNoFlags () {4}
129                         }
130                         EndDependentFn ()
131                 })
132         }
133 #endif
135 #ifdef SIO_EC_ENABLE_PS2K
136         Device (PS2K)           // Keyboard
137         {
138                 Name (_UID, 0)
139                 Name (_ADR, 0)
140                 Name (_HID, EISAID("PNP0303"))
141                 Name (_CID, EISAID("PNP030B"))
143                 Method (_STA, 0, NotSerialized) {
144                         Return (0x0F)
145                 }
147                 Name (_CRS, ResourceTemplate()
148                 {
149                         IO (Decode16, 0x60, 0x60, 0x01, 0x01)
150                         IO (Decode16, 0x64, 0x64, 0x01, 0x01)
151 #ifdef SIO_EC_PS2K_IRQ
152                         SIO_EC_PS2K_IRQ
153 #else
154                         IRQ (Edge, ActiveHigh, ExclusiveAndWake) {1}
155 #endif
156                 })
158                 Name (_PRS, ResourceTemplate()
159                 {
160                         StartDependentFn (0, 0) {
161                                 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
162                                 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
163 #ifdef SIO_EC_PS2K_IRQ
164                                 SIO_EC_PS2K_IRQ
165 #else
166                                 IRQ (Edge, ActiveHigh, ExclusiveAndWake) {1}
167 #endif
168                         }
169                         EndDependentFn ()
170                 })
171         }
172 #endif