blob: 72e28eb3623e3146d8ce01429636ab934509ef7c [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,
Stefan Reinauercc46e732009-03-13 00:44:09 +000028 }
29
Angel Ponse12de372020-07-07 01:33:00 +020030 #include <southbridge/intel/common/acpi/irqlinks.asl>
Stefan Reinauer109ab312009-08-12 16:08:05 +000031
Stefan Reinaueraca6ec62009-10-26 17:12:21 +000032 #include "acpi/ec.asl"
Stefan Reinauercc46e732009-03-13 00:44:09 +000033
34 Device (DMAC) // DMA Controller
35 {
36 Name(_HID, EISAID("PNP0200"))
37 Name(_CRS, ResourceTemplate()
38 {
39 IO (Decode16, 0x00, 0x00, 0x01, 0x20)
40 IO (Decode16, 0x81, 0x81, 0x01, 0x11)
41 IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
42 IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
43 DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
44 })
45 }
46
Stefan Reinauer573f7d42009-07-21 21:50:34 +000047 Device (FWH) // Firmware Hub
Stefan Reinauercc46e732009-03-13 00:44:09 +000048 {
49 Name (_HID, EISAID("INT0800"))
50 Name (_CRS, ResourceTemplate()
51 {
52 Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
53 })
54 }
55
56 Device (HPET)
57 {
58 Name (_HID, EISAID("PNP0103"))
Stefan Reinauer573f7d42009-07-21 21:50:34 +000059 Name (_CID, 0x010CD041)
Stefan Reinauercc46e732009-03-13 00:44:09 +000060
61 Name(BUF0, ResourceTemplate()
62 {
Elyes HAOUAS1644e482019-10-30 11:28:42 +010063 Memory32Fixed(ReadOnly, CONFIG_HPET_ADDRESS, 0x400, FED0)
Stefan Reinauercc46e732009-03-13 00:44:09 +000064 })
65
66 Method (_STA, 0) // Device Status
67 {
Kyösti Mälkkie1738142020-12-29 09:04:30 +020068 Return (\HPTS(HPTE))
Stefan Reinauercc46e732009-03-13 00:44:09 +000069 }
70
Stefan Reinauer573f7d42009-07-21 21:50:34 +000071 Method (_CRS, 0, Serialized) // Current resources
Stefan Reinauercc46e732009-03-13 00:44:09 +000072 {
Stefan Reinauer573f7d42009-07-21 21:50:34 +000073 If (HPTE) {
74 CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
Elyes HAOUAS08b5ef42020-09-10 21:06:40 +020075 If (HPAS == 1) {
76 HPT0 = CONFIG_HPET_ADDRESS + 0x1000
Stefan Reinauer573f7d42009-07-21 21:50:34 +000077 }
78
Elyes HAOUAS08b5ef42020-09-10 21:06:40 +020079 If (HPAS == 2) {
80 HPT0 = CONFIG_HPET_ADDRESS + 0x2000
Stefan Reinauer573f7d42009-07-21 21:50:34 +000081 }
82
Elyes HAOUAS08b5ef42020-09-10 21:06:40 +020083 If (HPAS == 3) {
84 HPT0 = CONFIG_HPET_ADDRESS + 0x3000
Stefan Reinauer573f7d42009-07-21 21:50:34 +000085 }
86 }
Stefan Reinauercc46e732009-03-13 00:44:09 +000087
88 Return (BUF0)
89 }
90 }
91
92 Device(PIC) // 8259 Interrupt Controller
93 {
94 Name(_HID,EISAID("PNP0000"))
95 Name(_CRS, ResourceTemplate()
96 {
97 IO (Decode16, 0x20, 0x20, 0x01, 0x02)
98 IO (Decode16, 0x24, 0x24, 0x01, 0x02)
99 IO (Decode16, 0x28, 0x28, 0x01, 0x02)
100 IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
101 IO (Decode16, 0x30, 0x30, 0x01, 0x02)
102 IO (Decode16, 0x34, 0x34, 0x01, 0x02)
103 IO (Decode16, 0x38, 0x38, 0x01, 0x02)
104 IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
105 IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
106 IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
107 IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
108 IO (Decode16, 0xac, 0xac, 0x01, 0x02)
109 IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
110 IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
111 IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
112 IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000113 IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
Stefan Reinauercc46e732009-03-13 00:44:09 +0000114 IRQNoFlags () { 2 }
115 })
116 }
117
118 Device(MATH) // FPU
119 {
120 Name (_HID, EISAID("PNP0C04"))
121 Name (_CRS, ResourceTemplate()
122 {
123 IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
124 IRQNoFlags() { 13 }
125 })
126 }
127
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000128 Device(LDRC) // LPC device: Resource consumption
Stefan Reinauercc46e732009-03-13 00:44:09 +0000129 {
130 Name (_HID, EISAID("PNP0C02"))
131 Name (_UID, 2)
132 Name (_CRS, ResourceTemplate()
133 {
134 IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO
135 IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000136 IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status
137 IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved
138 IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved
139 IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved
140 IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post
141 IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved
Stefan Reinauercc46e732009-03-13 00:44:09 +0000142 IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI
Stefan Reinauercc46e732009-03-13 00:44:09 +0000143 IO (Decode16, 0x800, 0x800, 0x1, 0x10) // ACPI I/O trap
Angel Ponsba045652020-07-07 01:22:57 +0200144 IO (Decode16, DEFAULT_PMBASE, DEFAULT_PMBASE, 0x1, 0x80) // ICH ACPI
145 IO (Decode16, DEFAULT_GPIOBASE, DEFAULT_GPIOBASE, 0x1, 0x40) // ICH GPIO
Stefan Reinauercc46e732009-03-13 00:44:09 +0000146 })
147 }
148
149 Device (RTC) // Real Time Clock
150 {
151 Name (_HID, EISAID("PNP0B00"))
152 Name (_CRS, ResourceTemplate()
153 {
154 IO (Decode16, 0x70, 0x70, 1, 8)
Stefan Reinauercc46e732009-03-13 00:44:09 +0000155 })
156 }
157
158 Device (TIMR) // Intel 8254 timer
159 {
160 Name(_HID, EISAID("PNP0100"))
161 Name(_CRS, ResourceTemplate()
162 {
163 IO (Decode16, 0x40, 0x40, 0x01, 0x04)
164 IO (Decode16, 0x50, 0x50, 0x10, 0x04)
165 IRQNoFlags() {0}
166 })
167 }
168
Stefan Reinaueraca6ec62009-10-26 17:12:21 +0000169 #include "acpi/superio.asl"
170
Stefan Reinauercc46e732009-03-13 00:44:09 +0000171 Device (PS2K) // Keyboard
172 {
173 Name(_HID, EISAID("PNP0303"))
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000174 Name(_CID, EISAID("PNP030B"))
175
Stefan Reinauercc46e732009-03-13 00:44:09 +0000176 Name(_CRS, ResourceTemplate()
177 {
178 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
179 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
180 IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1
181 })
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000182
183 Method (_STA, 0)
184 {
185 Return (0xf)
186 }
Stefan Reinauercc46e732009-03-13 00:44:09 +0000187 }
188
189 Device (PS2M) // Mouse
190 {
191 Name(_HID, EISAID("PNP0F13"))
192 Name(_CRS, ResourceTemplate()
193 {
194 IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12
195 })
Stefan Reinauer573f7d42009-07-21 21:50:34 +0000196
197 Method(_STA, 0)
198 {
199 Return (0xf)
200 }
201 }
Stefan Reinauercc46e732009-03-13 00:44:09 +0000202}