Debian Codegraph @

src/soc/intel/broadwell/pch/acpi/lpc.asl

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