blob: 5a1f20430336c8f24c8f40df78fec0fe2240699d [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauercc46e732009-03-13 00:44:09 +00002
3// Intel LPC Bus Device - 0:1f.0
4
5Device (LPCB)
6{
7 Name(_ADR, 0x001f0000)
Stefan Reinauer109ab312009-08-12 16:08:05 +00008
Stefan Reinauercc46e732009-03-13 00:44:09 +00009 OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
10 Field (LPC0, AnyAcc, NoLock, Preserve)
11 {
12 Offset (0x40),
13 PMBS, 16, // PMBASE
14 Offset (0x60), // Interrupt Routing Registers
15 PRTA, 8,
16 PRTB, 8,
17 PRTC, 8,
18 PRTD, 8,
19 Offset (0x68),
20 PRTE, 8,
21 PRTF, 8,
22 PRTG, 8,
23 PRTH, 8,
24
25 Offset (0x80), // IO Decode Ranges
26 IOD0, 8,
27 IOD1, 8,
28
29 Offset (0xf0), // RCBA
30 RCEN, 1,
31 , 13,
32 RCBA, 18,
33 }
34
Angel Ponse12de372020-07-07 01:33:00 +020035 #include <southbridge/intel/common/acpi/irqlinks.asl>
Stefan Reinauer109ab312009-08-12 16:08:05 +000036
Stefan Reinaueraca6ec62009-10-26 17:12:21 +000037 #include "acpi/ec.asl"
Stefan Reinauercc46e732009-03-13 00:44:09 +000038
39 Device (DMAC) // DMA Controller
40 {
41 Name(_HID, EISAID("PNP0200"))
42 Name(_CRS, ResourceTemplate()
43 {
44 IO (Decode16, 0x00, 0x00, 0x01, 0x20)
45 IO (Decode16, 0x81, 0x81, 0x01, 0x11)
46 IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
47 IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
48 DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
49 })
50 }
51
Stefan Reinauer573f7d42009-07-21 21:50:34 +000052 Device (FWH) // Firmware Hub
Stefan Reinauercc46e732009-03-13 00:44:09 +000053 {
54 Name (_HID, EISAID("INT0800"))
55 Name (_CRS, ResourceTemplate()
56 {
57 Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
58 })
59 }
60
61 Device (HPET)
62 {
63 Name (_HID, EISAID("PNP0103"))
Stefan Reinauer573f7d42009-07-21 21:50:34 +000064 Name (_CID, 0x010CD041)
Stefan Reinauercc46e732009-03-13 00:44:09 +000065
66 Name(BUF0, ResourceTemplate()
67 {
Elyes HAOUAS1644e482019-10-30 11:28:42 +010068 Memory32Fixed(ReadOnly, CONFIG_HPET_ADDRESS, 0x400, FED0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000069 })
70
71 Method (_STA, 0) // Device Status
72 {
73 If (HPTE) {
74 // Note: Ancient versions of Windows don't want
75 // to see the HPET in order to work right
Stefan Reinauer573f7d42009-07-21 21:50:34 +000076 If (LGreaterEqual(OSYS, 2001)) {
77 Return (0xf) // Enable and show device
78 } Else {
79 Return (0xb) // Enable and don't show device
80 }
Stefan Reinauercc46e732009-03-13 00:44:09 +000081 }
82
83 Return (0x0) // Not enabled, don't show.
84 }
85
Stefan Reinauer573f7d42009-07-21 21:50:34 +000086 Method (_CRS, 0, Serialized) // Current resources
Stefan Reinauercc46e732009-03-13 00:44:09 +000087 {
Stefan Reinauer573f7d42009-07-21 21:50:34 +000088 If (HPTE) {
89 CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
90 If (Lequal(HPAS, 1)) {
Elyes HAOUAS1644e482019-10-30 11:28:42 +010091 Add(CONFIG_HPET_ADDRESS, 0x1000, HPT0)
Stefan Reinauer573f7d42009-07-21 21:50:34 +000092 }
93
94 If (Lequal(HPAS, 2)) {
Elyes HAOUAS1644e482019-10-30 11:28:42 +010095 Add(CONFIG_HPET_ADDRESS, 0x2000, HPT0)
Stefan Reinauer573f7d42009-07-21 21:50:34 +000096 }
97
98 If (Lequal(HPAS, 3)) {
Elyes HAOUAS1644e482019-10-30 11:28:42 +010099 Add(CONFIG_HPET_ADDRESS, 0x3000, HPT0)
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000100 }
101 }
Stefan Reinauercc46e732009-03-13 00:44:09 +0000102
103 Return (BUF0)
104 }
105 }
106
107 Device(PIC) // 8259 Interrupt Controller
108 {
109 Name(_HID,EISAID("PNP0000"))
110 Name(_CRS, ResourceTemplate()
111 {
112 IO (Decode16, 0x20, 0x20, 0x01, 0x02)
113 IO (Decode16, 0x24, 0x24, 0x01, 0x02)
114 IO (Decode16, 0x28, 0x28, 0x01, 0x02)
115 IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
116 IO (Decode16, 0x30, 0x30, 0x01, 0x02)
117 IO (Decode16, 0x34, 0x34, 0x01, 0x02)
118 IO (Decode16, 0x38, 0x38, 0x01, 0x02)
119 IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
120 IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
121 IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
122 IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
123 IO (Decode16, 0xac, 0xac, 0x01, 0x02)
124 IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
125 IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
126 IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
127 IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000128 IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
Stefan Reinauercc46e732009-03-13 00:44:09 +0000129 IRQNoFlags () { 2 }
130 })
131 }
132
133 Device(MATH) // FPU
134 {
135 Name (_HID, EISAID("PNP0C04"))
136 Name (_CRS, ResourceTemplate()
137 {
138 IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
139 IRQNoFlags() { 13 }
140 })
141 }
142
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000143 Device(LDRC) // LPC device: Resource consumption
Stefan Reinauercc46e732009-03-13 00:44:09 +0000144 {
145 Name (_HID, EISAID("PNP0C02"))
146 Name (_UID, 2)
147 Name (_CRS, ResourceTemplate()
148 {
149 IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO
150 IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000151 IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status
152 IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved
153 IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved
154 IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved
155 IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post
156 IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved
Stefan Reinauercc46e732009-03-13 00:44:09 +0000157 IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI
Stefan Reinauercc46e732009-03-13 00:44:09 +0000158 IO (Decode16, 0x800, 0x800, 0x1, 0x10) // ACPI I/O trap
Angel Ponsba045652020-07-07 01:22:57 +0200159 IO (Decode16, DEFAULT_PMBASE, DEFAULT_PMBASE, 0x1, 0x80) // ICH ACPI
160 IO (Decode16, DEFAULT_GPIOBASE, DEFAULT_GPIOBASE, 0x1, 0x40) // ICH GPIO
Stefan Reinauercc46e732009-03-13 00:44:09 +0000161 })
162 }
163
164 Device (RTC) // Real Time Clock
165 {
166 Name (_HID, EISAID("PNP0B00"))
167 Name (_CRS, ResourceTemplate()
168 {
169 IO (Decode16, 0x70, 0x70, 1, 8)
Stefan Reinaueraca6ec62009-10-26 17:12:21 +0000170// Disable as Windows doesn't like it, and systems don't seem to use it.
171// IRQNoFlags() { 8 }
Stefan Reinauercc46e732009-03-13 00:44:09 +0000172 })
173 }
174
175 Device (TIMR) // Intel 8254 timer
176 {
177 Name(_HID, EISAID("PNP0100"))
178 Name(_CRS, ResourceTemplate()
179 {
180 IO (Decode16, 0x40, 0x40, 0x01, 0x04)
181 IO (Decode16, 0x50, 0x50, 0x10, 0x04)
182 IRQNoFlags() {0}
183 })
184 }
185
Stefan Reinaueraca6ec62009-10-26 17:12:21 +0000186 #include "acpi/superio.asl"
187
Stefan Reinauercc46e732009-03-13 00:44:09 +0000188 Device (PS2K) // Keyboard
189 {
190 Name(_HID, EISAID("PNP0303"))
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000191 Name(_CID, EISAID("PNP030B"))
192
Stefan Reinauercc46e732009-03-13 00:44:09 +0000193 Name(_CRS, ResourceTemplate()
194 {
195 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
196 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
197 IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1
198 })
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000199
200 Method (_STA, 0)
201 {
202 Return (0xf)
203 }
Stefan Reinauercc46e732009-03-13 00:44:09 +0000204 }
205
206 Device (PS2M) // Mouse
207 {
208 Name(_HID, EISAID("PNP0F13"))
209 Name(_CRS, ResourceTemplate()
210 {
211 IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12
212 })
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000213
214 Method(_STA, 0)
215 {
216 Return (0xf)
217 }
218 }
219
Stefan Reinaueraca6ec62009-10-26 17:12:21 +0000220#ifdef ENABLE_FDC
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000221 Device (FDC0) // Floppy controller
222 {
223 Name (_HID, EisaId ("PNP0700"))
224 Method (_STA, 0, NotSerialized)
225 {
226 Return (0x0f) // FIXME
227 }
228
229 Name(_CRS, ResourceTemplate()
230 {
231 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
232 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
233 IRQNoFlags () {6}
234 DMA (Compatibility, NotBusMaster, Transfer8) {2}
235 })
236
237 Name(_PRS, ResourceTemplate()
238 {
239 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
240 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
241 IRQNoFlags () {6}
242 DMA (Compatibility, NotBusMaster, Transfer8) {2}
243 })
244
Stefan Reinauercc46e732009-03-13 00:44:09 +0000245 }
Stefan Reinaueraca6ec62009-10-26 17:12:21 +0000246#endif
Stefan Reinauercc46e732009-03-13 00:44:09 +0000247}