lib/smbios: Improve Type9
[coreboot2.git] / src / southbridge / intel / i82801jx / acpi / lpc.asl
blob5c68068d4a1cff65e3acdf6a601c7d15efa9cdbd
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/hpet.h>
5 // Intel LPC Bus Device  - 0:1f.0
7 Device (LPCB)
9         Name(_ADR, 0x001f0000)
11         OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
12         Field (LPC0, AnyAcc, NoLock, Preserve)
13         {
14                 Offset (0x40),
15                 PMBS,   16,     // PMBASE
16                 Offset (0x60),  // Interrupt Routing Registers
17                 PRTA,   8,
18                 PRTB,   8,
19                 PRTC,   8,
20                 PRTD,   8,
21                 Offset (0x68),
22                 PRTE,   8,
23                 PRTF,   8,
24                 PRTG,   8,
25                 PRTH,   8,
27                 Offset (0x80),  // IO Decode Ranges
28                 IOD0,   8,
29                 IOD1,   8,
30         }
32         #include <southbridge/intel/common/acpi/irqlinks.asl>
34         #include "acpi/ec.asl"
36         Device (DMAC)           // DMA Controller
37         {
38                 Name(_HID, EISAID("PNP0200"))
39                 Name(_CRS, ResourceTemplate()
40                 {
41                         IO (Decode16, 0x00, 0x00, 0x01, 0x20)
42                         IO (Decode16, 0x81, 0x81, 0x01, 0x11)
43                         IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
44                         IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
45                         DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
46                 })
47         }
49         Device (FWH)            // Firmware Hub
50         {
51                 Name (_HID, EISAID("INT0800"))
52                 Name (_CRS, ResourceTemplate()
53                 {
54                         Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
55                 })
56         }
58         Device (HPET)
59         {
60                 Name (_HID, EISAID("PNP0103"))
61                 Name (_CID, 0x010CD041)
63                 Name(BUF0, ResourceTemplate()
64                 {
65                         Memory32Fixed(ReadOnly, HPET_BASE_ADDRESS, 0x400, FED0)
66                 })
68                 Method (_STA, 0)        // Device Status
69                 {
70                         Return (\HPTS(HPTE))
71                 }
73                 Method (_CRS, 0, Serialized) // Current resources
74                 {
75                         If (HPTE) {
76                                 CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
77                                 If (HPAS == 1) {
78                                         HPT0 = HPET_BASE_ADDRESS + 0x1000
79                                 }
81                                 If (HPAS == 2) {
82                                         HPT0 = HPET_BASE_ADDRESS + 0x2000
83                                 }
85                                 If (HPAS == 3) {
86                                         HPT0 = HPET_BASE_ADDRESS + 0x3000
87                                 }
88                         }
90                         Return (BUF0)
91                 }
92         }
94         Device(PIC)     // 8259 Interrupt Controller
95         {
96                 Name(_HID,EISAID("PNP0000"))
97                 Name(_CRS, ResourceTemplate()
98                 {
99                         IO (Decode16, 0x20, 0x20, 0x01, 0x02)
100                         IO (Decode16, 0x24, 0x24, 0x01, 0x02)
101                         IO (Decode16, 0x28, 0x28, 0x01, 0x02)
102                         IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
103                         IO (Decode16, 0x30, 0x30, 0x01, 0x02)
104                         IO (Decode16, 0x34, 0x34, 0x01, 0x02)
105                         IO (Decode16, 0x38, 0x38, 0x01, 0x02)
106                         IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
107                         IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
108                         IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
109                         IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
110                         IO (Decode16, 0xac, 0xac, 0x01, 0x02)
111                         IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
112                         IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
113                         IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
114                         IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
115                         IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
116                         IRQNoFlags () { 2 }
117                 })
118         }
120         Device(MATH)    // FPU
121         {
122                 Name (_HID, EISAID("PNP0C04"))
123                 Name (_CRS, ResourceTemplate()
124                 {
125                         IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
126                         IRQNoFlags() { 13 }
127                 })
128         }
130         Device(LDRC)    // LPC device: Resource consumption
131         {
132                 Name (_HID, EISAID("PNP0C02"))
133                 Name (_UID, 2)
134                 Name (_CRS, ResourceTemplate()
135                 {
136                         IO (Decode16, 0x2e, 0x2e, 0x1, 0x02)            // First SuperIO
137                         IO (Decode16, 0x4e, 0x4e, 0x1, 0x02)            // Second SuperIO
138                         IO (Decode16, 0x61, 0x61, 0x1, 0x01)            // NMI Status
139                         IO (Decode16, 0x63, 0x63, 0x1, 0x01)            // CPU Reserved
140                         IO (Decode16, 0x65, 0x65, 0x1, 0x01)            // CPU Reserved
141                         IO (Decode16, 0x67, 0x67, 0x1, 0x01)            // CPU Reserved
142                         IO (Decode16, 0x80, 0x80, 0x1, 0x01)            // Port 80 Post
143                         IO (Decode16, 0x92, 0x92, 0x1, 0x01)            // CPU Reserved
144                         IO (Decode16, 0xb2, 0xb2, 0x1, 0x02)            // SWSMI
145                         IO (Decode16, DEFAULT_PMBASE, DEFAULT_PMBASE, 0x1, 0x80)        // ICH ACPI
146                         IO (Decode16, DEFAULT_GPIOBASE, DEFAULT_GPIOBASE, 0x1, 0x40)    // ICH GPIO
147                 })
148         }
150         Device (RTC)    // Real Time Clock
151         {
152                 Name (_HID, EISAID("PNP0B00"))
153                 Name (_CRS, ResourceTemplate()
154                 {
155                         IO (Decode16, 0x70, 0x70, 1, 8)
156                 })
157         }
159         Device (TIMR)   // Intel 8254 timer
160         {
161                 Name(_HID, EISAID("PNP0100"))
162                 Name(_CRS, ResourceTemplate()
163                 {
164                         IO (Decode16, 0x40, 0x40, 0x01, 0x04)
165                         IO (Decode16, 0x50, 0x50, 0x10, 0x04)
166                         IRQNoFlags() {0}
167                 })
168         }
170         #include "acpi/superio.asl"
172         Device (PS2K)           // Keyboard
173         {
174                 Name(_HID, EISAID("PNP0303"))
175                 Name(_CID, EISAID("PNP030B"))
177                 Name(_CRS, ResourceTemplate()
178                 {
179                         IO (Decode16, 0x60, 0x60, 0x01, 0x01)
180                         IO (Decode16, 0x64, 0x64, 0x01, 0x01)
181                         IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1
182                 })
184                 Method (_STA, 0)
185                 {
186                         Return (0xf)
187                 }
188         }
190         Device (PS2M)           // Mouse
191         {
192                 Name(_HID, EISAID("PNP0F13"))
193                 Name(_CRS, ResourceTemplate()
194                 {
195                         IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12
196                 })
198                 Method(_STA, 0)
199                 {
200                         Return (0xf)
201                 }
202         }