1 /* SPDX-License-Identifier: GPL-2.0-only */
7 Name (_HID, EISAID("PNP0A05"))
10 OperationRegion(SIOR, SystemIO, 0x2e, 0x02)
11 Field (SIOR, ByteAcc, Nolock, Preserve)
21 Acquire (SIOM, 0xffff)
35 Acquire (SIOM, 0xffff)
47 Name(_HID, EISAID("PNP0501"))
49 Name(_PRW, Package() { 0x08, 0x03 })
54 // Device disabled by coreboot?
59 // Is the hardware enabled?
60 Local0 = READ (0, 0x24, 0xff)
65 Local0 = READ (0, 0x02, 0x08)
79 Local0 = READ (0, 0x28, 0x0f)
82 Local0 = READ (0, 0x02, 0xff)
88 /* Possible Resource Settings */
89 Name(_PRS, ResourceTemplate() {
90 StartDependentFn(0, 1) {
91 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8)
96 /* Current Resource Settings */
99 Name(NONE, ResourceTemplate() {
100 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
104 Name(RSRC, ResourceTemplate() {
105 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8, _IOA)
106 IRQNoFlags(_IRA) { 4 }
109 Local0 = _STA() & 0x02
114 CreateWordField(RSRC,
115 \_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MIN, IOMN)
116 CreateWordField(RSRC,
117 \_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MAX, IOMX)
118 CreateWordField(RSRC,
119 \_SB.PCI0.LPCB.SIO1.COMA._CRS._IRA._INT, IRQ)
122 Local0 = READ (0, 0x24, 0xfe)
128 Local0 = READ (0, 0x28, 0xf0)
134 /* Set Resource Settings */
137 CreateByteField(Arg0, 0x02, IOLO)
138 CreateByteField(Arg0, 0x03, IOHI)
139 CreateByteField(Arg0, 0x09, IRQL)
142 FindSetRightBit(IRQL, Local0)
146 Local1 = READ (0, 0x28, 0x0f)
148 WRIT(0, 0x28, Local0)
157 WRIT(0, 0x24, Local0)
159 Local0 = READ (0, 0x02, 0xff)
161 WRIT(0, 0x02, Local0)
163 Local0 = READ (0, 0x07, 0xff)
166 WRIT(0, 0x07, Local0)
170 /* D0 state - Line drivers are on */
173 Local0 = READ (0, 0x02, 0xff)
175 WRIT(0, 0x02, Local0)
177 Local0 = READ (0, 0x07, 0xff)
180 WRIT(0, 0x07, Local0)
183 /* D3 State - Line drivers are off */
186 Local0 = READ (0, 0x02, 0xff)
189 WRIT(0, 0x02, Local0)
195 Name(_HID, EISAID("PNP0501"))
197 Name(_PRW, Package() { 0x08, 0x03 })
202 // Device disabled by coreboot?
208 Local0 = READ (0, 0x0c, 0x38)
213 // Is the hardware enabled?
214 Local0 = READ (0, 0x25, 0xff)
219 Local0 = READ (0, 0x02, 0x80)
233 Local0 = READ (0, 0x28, 0xf0)
234 WRIT(0, 0x28, Local0)
236 Local0 = READ (0, 0x02, 0xff)
239 WRIT(0, 0x02, Local0)
242 /* Possible Resource Settings */
243 Name(_PRS, ResourceTemplate() {
244 StartDependentFn(0, 1) {
245 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8)
250 /* Current Resource Settings */
253 Name(NONE, ResourceTemplate() {
254 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
258 Name(RSRC, ResourceTemplate() {
259 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8, _IOB)
260 IRQNoFlags(_IRB) { 3 }
263 Local0 = _STA() & 0x02
268 CreateWordField(RSRC,
269 \_SB.PCI0.LPCB.SIO1.COMB._CRS._IOB._MIN, IOMN)
270 CreateWordField(RSRC,
271 \_SB.PCI0.LPCB.SIO1.COMB._CRS._IOB._MAX, IOMX)
272 CreateWordField(RSRC,
273 \_SB.PCI0.LPCB.SIO1.COMB._CRS._IRB._INT, IRQ)
276 Local0 = READ (0, 0x25, 0xfe)
282 Local0 = READ (0, 0x28, 0x0f)
287 /* Set Resource Settings */
290 CreateByteField(Arg0, 0x02, IOLO)
291 CreateByteField(Arg0, 0x03, IOHI)
292 CreateByteField(Arg0, 0x09, IRQL)
295 FindSetRightBit(IRQL, Local0)
298 Local1 = READ (0, 0x28, 0xf0)
300 WRIT(0, 0x28, Local0)
309 WRIT(0, 0x25, Local0)
311 Local0 = READ (0, 0x0c, 0xff)
314 WRIT(0, 0x0c, Local0)
316 Local0 = READ (0, 0x02, 0xff)
318 WRIT(0, 0x02, Local0)
320 Local0 = READ (0, 0x07, 0xff)
323 WRIT(0, 0x07, Local0)
326 /* D0 state - Line drivers are on */
329 Local0 = READ (0, 0x02, 0xff)
331 WRIT(0, 0x02, Local0)
333 Local0 = READ (0, 0x07, 0xff)
336 WRIT(0, 0x07, Local0)
339 /* D3 State - Line drivers are off */
342 Local0 = READ (0, 0x02, 0xff)
345 WRIT(0, 0x02, Local0)