Remove address from GPLv2 headers
[coreboot.git] / src / soc / intel / broadwell / acpi / lpc.asl
blob02320aae2a07c19cd691ff11bf98fc60ce3bb16c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  * Copyright (C) 2014 Google Inc.
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; version 2 of the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc.
19  */
21 // Intel LPC Bus Device  - 0:1f.0
23 Device (LPCB)
25         Name (_ADR, 0x001f0000)
27         OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
28         Field (LPC0, AnyAcc, NoLock, Preserve)
29         {
30                 Offset (0x02),
31                 PDID,   16,     // Device ID
32                 Offset (0x40),
33                 PMBS,   16,     // PMBASE
34                 Offset (0x48),
35                 GPBS,   16,     // GPIOBASE
36                 Offset (0x60),  // Interrupt Routing Registers
37                 PRTA,   8,
38                 PRTB,   8,
39                 PRTC,   8,
40                 PRTD,   8,
41                 Offset (0x68),
42                 PRTE,   8,
43                 PRTF,   8,
44                 PRTG,   8,
45                 PRTH,   8,
47                 Offset (0x80),  // IO Decode Ranges
48                 IOD0,   8,
49                 IOD1,   8,
50         }
52         Device (DMAC)   // DMA Controller
53         {
54                 Name (_HID, EISAID("PNP0200"))
55                 Name (_CRS, ResourceTemplate()
56                 {
57                         IO (Decode16, 0x00, 0x00, 0x01, 0x20)
58                         IO (Decode16, 0x81, 0x81, 0x01, 0x11)
59                         IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
60                         IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
61                         DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
62                 })
63         }
65         Device (FWH)    // Firmware Hub
66         {
67                 Name (_HID, EISAID("INT0800"))
68                 Name (_CRS, ResourceTemplate()
69                 {
70                         Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
71                 })
72         }
74         Device (HPET)
75         {
76                 Name (_HID, EISAID("PNP0103"))
77                 Name (_CID, 0x010CD041)
79                 Name (BUF0, ResourceTemplate()
80                 {
81                         Memory32Fixed(ReadOnly, 0xfed00000, 0x400, FED0)
82                 })
84                 Method (_STA, 0)        // Device Status
85                 {
86                         If (HPTE) {
87                                 // Note: Ancient versions of Windows don't want
88                                 // to see the HPET in order to work right
89                                 If (LGreaterEqual(OSYS, 2001)) {
90                                         Return (0xf)    // Enable and show device
91                                 } Else {
92                                         Return (0xb)    // Enable and don't show device
93                                 }
94                         }
96                         Return (0x0)    // Not enabled, don't show.
97                 }
99                 Method (_CRS, 0, Serialized) // Current resources
100                 {
101                         If (HPTE) {
102                                 CreateDWordField (BUF0,
103                                         \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
105                                 If (Lequal(HPAS, 1)) {
106                                         Store(0xfed01000, HPT0)
107                                 }
109                                 If (Lequal(HPAS, 2)) {
110                                         Store(0xfed02000, HPT0)
111                                 }
113                                 If (Lequal(HPAS, 3)) {
114                                         Store(0xfed03000, HPT0)
115                                 }
116                         }
118                         Return (BUF0)
119                 }
120         }
122         Device(PIC)     // 8259 Interrupt Controller
123         {
124                 Name (_HID,EISAID("PNP0000"))
125                 Name (_CRS, ResourceTemplate()
126                 {
127                         IO (Decode16, 0x20, 0x20, 0x01, 0x02)
128                         IO (Decode16, 0x24, 0x24, 0x01, 0x02)
129                         IO (Decode16, 0x28, 0x28, 0x01, 0x02)
130                         IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
131                         IO (Decode16, 0x30, 0x30, 0x01, 0x02)
132                         IO (Decode16, 0x34, 0x34, 0x01, 0x02)
133                         IO (Decode16, 0x38, 0x38, 0x01, 0x02)
134                         IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
135                         IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
136                         IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
137                         IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
138                         IO (Decode16, 0xac, 0xac, 0x01, 0x02)
139                         IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
140                         IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
141                         IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
142                         IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
143                         IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
144                         IRQNoFlags () { 2 }
145                 })
146         }
148         Device(MATH)    // FPU
149         {
150                 Name (_HID, EISAID("PNP0C04"))
151                 Name (_CRS, ResourceTemplate()
152                 {
153                         IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
154                         IRQNoFlags() { 13 }
155                 })
156         }
158         Device(LDRC)    // LPC device: Resource consumption
159         {
160                 Name (_HID, EISAID("PNP0C02"))
161                 Name (_UID, 2)
163                 Name (RBUF, ResourceTemplate()
164                 {
165                         IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO
166                         IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO
167                         IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status
168                         IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved
169                         IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved
170                         IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved
171                         IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post
172                         IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved
173                         IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI
174                         IO (Decode16, ACPI_BASE_ADDRESS, ACPI_BASE_ADDRESS,
175                             0x1, 0xff)
176                 })
178                 Method (_CRS, 0, NotSerialized)
179                 {
180                         Return (RBUF)
181                 }
182         }
184         Device (RTC)    // Real Time Clock
185         {
186                 Name (_HID, EISAID("PNP0B00"))
187                 Name (_CRS, ResourceTemplate()
188                 {
189                         IO (Decode16, 0x70, 0x70, 1, 8)
190                         //IRQNoFlags() { 8 }
191                 })
192         }
194         Device (TIMR)   // Intel 8254 timer
195         {
196                 Name (_HID, EISAID("PNP0100"))
197                 Name (_CRS, ResourceTemplate() {
198                         IO (Decode16, 0x40, 0x40, 0x01, 0x04)
199                         IO (Decode16, 0x50, 0x50, 0x10, 0x04)
200                         IRQNoFlags() {0}
201                 })
202         }
204         #include "gpio.asl"
205         #include "irqlinks.asl"
206         #include <acpi/ec.asl>
207         #include <acpi/superio.asl>