1 /* SPDX-License-Identifier: GPL-2.0-only */
3 // Scope is \_SB.PCI0.LPCB
7 OperationRegion (SIOA, SystemIO, 0x2E, 0x02)
8 Field (SIOA, ByteAcc, NoLock, Preserve)
14 IndexField (SI2E, SI2F, ByteAcc, NoLock, Preserve)
17 SCNT, 8, /* Configure Control */
19 SLDN, 8, /* Logical Device Number */
21 SACT, 8, /* Activate */
23 IO0H, 8, /* Base Address 0 MSB */
24 IO0L, 8, /* Base Address 0 LSB */
26 IO1H, 8, /* Base Address 1 MSB */
27 IO1L, 8, /* Base Address 1 LSB */
29 IQ00, 8, /* Interrupt Select */
32 Name (SFDC, 0) /* Floppy Disk Controller */
33 Name (SSP1, 1) /* Serial Port 1 */
34 Name (SENV, 4) /* Environment Controller */
35 Name (SKBC, 5) /* Keyboard */
36 Name (SKBM, 6) /* Mouse */
37 Name (SGPI, 7) /* GPIO */
38 Name (SINF, 10) /* Consumer IR */
40 Method (ENTR, 0, NotSerialized)
48 Method (EXIT, 0, NotSerialized)
53 /* Parse activate register for an LDN */
54 Method (ISEN, 1, NotSerialized)
61 /* Check if it exists */
67 /* Check if activated */
78 /* Enable an LDN via the activate register */
79 Method (SENA, 1, NotSerialized)
87 /* Disable an LDN via the activate register */
88 Method (SDIS, 1, NotSerialized)
96 #ifdef SIO_ENABLE_ENVC
98 Name (_HID, EISAID ("PNP0C02"))
101 Method (_STA, 0, NotSerialized) {
105 Name (_CRS, ResourceTemplate ()
107 IO (Decode16, SIO_ENVC_IO0, SIO_ENVC_IO0, 0x08, 0x08)
108 IO (Decode16, SIO_ENVC_IO1, SIO_ENVC_IO1, 0x04, 0x04)
111 Name (_PRS, ResourceTemplate ()
113 IO (Decode16, SIO_ENVC_IO0, SIO_ENVC_IO0, 0x08, 0x08)
114 IO (Decode16, SIO_ENVC_IO1, SIO_ENVC_IO1, 0x04, 0x04)
117 OperationRegion (ECAP, SystemIO, SIO_ENVC_IO0, 0x07)
118 Field (ECAP, ByteAcc, NoLock, Preserve)
121 ECAI, 8, // Address Index Register
122 ECAD, 8, // Address Data Register
125 // Registers for thermal zone implementations
126 IndexField (ECAI, ECAD, ByteAcc, NoLock, Preserve)
129 TIN1, 8, // TMPIN1 Reading
130 TIN2, 8, // TMPIN2 Reading
131 TIN3, 8, // TMPIN3 Reading
133 F2PS, 8, // FAN2 PWM Setting
135 F3PS, 8, // FAN3 PWM Setting
140 #ifdef SIO_ENABLE_GPIO
142 Name (_HID, EISAID ("PNP0C02"))
145 Method (_STA, 0, NotSerialized) {
149 Name (_CRS, ResourceTemplate ()
151 IO (Decode16, SIO_GPIO_IO0, SIO_GPIO_IO0, 0x01, 0x01)
152 IO (Decode16, SIO_GPIO_IO1, SIO_GPIO_IO1, 0x08, 0x08)
155 Name (_PRS, ResourceTemplate ()
157 IO (Decode16, SIO_GPIO_IO0, SIO_GPIO_IO0, 0x01, 0x01)
158 IO (Decode16, SIO_GPIO_IO1, SIO_GPIO_IO1, 0x08, 0x08)
163 #ifdef SIO_ENABLE_COM1
165 Name (_HID, EISAID ("PNP0501"))
168 Method (_STA, 0, NotSerialized) {
172 Name (_CRS, ResourceTemplate ()
174 IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
178 Name (_PRS, ResourceTemplate ()
180 IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
186 #ifdef SIO_ENABLE_PS2K
187 Device (PS2K) // Keyboard
189 Name (_HID, EISAID("PNP0303"))
190 Name (_CID, EISAID("PNP030B"))
192 Method (_STA, 0, NotSerialized) {
196 Name (_CRS, ResourceTemplate()
198 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
199 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
203 Name (_PRS, ResourceTemplate()
205 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
206 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
212 #ifdef SIO_ENABLE_PS2M
213 Device (PS2M) // Mouse
215 Name (_HID, EISAID("PNP0F13"))
217 Method (_STA, 0, NotSerialized) {
221 Name (_CRS, ResourceTemplate()
226 Name (_PRS, ResourceTemplate()
233 #ifdef SIO_ENABLE_FDC0
234 Device (FDC0) // Floppy controller
236 Name (_HID, EISAID ("PNP0700"))
238 Method (_STA, 0, NotSerialized) {
242 Name (_CRS, ResourceTemplate()
244 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
245 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
247 DMA (Compatibility, NotBusMaster, Transfer8) {2}
250 Name (_PRS, ResourceTemplate()
252 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
253 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
255 DMA (Compatibility, NotBusMaster, Transfer8) {2}
260 #ifdef SIO_ENABLE_INFR
261 Device (INFR) // Infrared controller
263 Name (_HID, EISAID ("PNP0510"))
265 Method (_STA, 0, NotSerialized) {
269 Name (_CRS, ResourceTemplate()
271 IO (Decode16, SIO_INFR_IO0, SIO_INFR_IO0, 0x08, 0x08)
272 IRQNoFlags () { SIO_INFR_IRQ }
275 Name (_PRS, ResourceTemplate()
277 IO (Decode16, SIO_INFR_IO0, SIO_INFR_IO0, 0x08, 0x08)
278 IRQNoFlags () { SIO_INFR_IRQ }