payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / intel / strago / acpi / mainboard.asl
blob0a7fb5c97c42da84edd6e67c675fad97f91864c5
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include "onboard.h"
5 Scope (\_SB)
7         Device (PWRB)
8         {
9                 Name (_HID, EisaId ("PNP0C0C"))
10                 Name (_UID, 1)
11         }
14 Scope (\_SB.PCI0.I2C1)
16         Device (ATSB)
17         {
18                 Name (_HID, "ATML0001")
19                 Name (_DDN, "Atmel Touchscreen Bootloader")
20                 Name (_UID, 4)
21                 Name (ISTP, 0) /* TouchScreen */
23                 Method(_CRS, 0x0, Serialized)
24                 {
25                         Name (BUF0, ResourceTemplate ()
26                         {
27                                 I2cSerialBus(
28                                         0x26,                     /* SlaveAddress */
29                                         ControllerInitiated,      /* SlaveMode */
30                                         400000,                   /* ConnectionSpeed */
31                                         AddressingMode7Bit,       /* AddressingMode */
32                                         "\\_SB.PCI0.I2C1",        /* ResourceSource */
33                                 )
34                                 Interrupt (ResourceConsumer, Edge, ActiveLow)
35                                 {
36                                         BOARD_TOUCH_IRQ
37                                 }
38                         })
39                         Return (BUF0)
40                 }
42                 Method (_STA)
43                 {
44                         If (LEqual (\S1EN, 1)) {
45                                 Return (0xF)
46                         } Else {
47                                 Return (0x0)
48                         }
49                 }
51                 /* Allow device to power off in S0 */
52                 Name (_S0W, 4)
53         }
55         Device (ATSA)
56         {
57                 Name (_HID, "ATML0001")
58                 Name (_DDN, "Atmel Touchscreen")
59                 Name (_UID, 5)
60                 Name (ISTP, 0) /* TouchScreen */
62                 Method(_CRS, 0x0, Serialized)
63                 {
64                         Name (BUF0, ResourceTemplate ()
65                         {
66                                 I2cSerialBus(
67                                         0x4b,                     /* SlaveAddress */
68                                         ControllerInitiated,      /* SlaveMode */
69                                         400000,                   /* ConnectionSpeed */
70                                         AddressingMode7Bit,       /* AddressingMode */
71                                         "\\_SB.PCI0.I2C1",        /* ResourceSource */
72                                 )
73                                 Interrupt (ResourceConsumer, Edge, ActiveLow)
74                                 {
75                                         BOARD_TOUCH_IRQ
76                                 }
77                         })
78                         Return (BUF0)
79                 }
81                 Method (_STA)
82                 {
83                         If (LEqual (\S1EN, 1)) {
84                                 Return (0xF)
85                         } Else {
86                                 Return (0x0)
87                         }
88                 }
90                 Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
92                 /* Allow device to power off in S0 */
93                 Name (_S0W, 4)
94         }
97 Scope (\_SB.PCI0.I2C5)
99         /* Realtek Audio Codec */
100         Device (RTEK)   /* Audio Codec driver I2C */
101         {
103                 Name (_HID, AUDIO_CODEC_HID)
104                 Name (_CID, AUDIO_CODEC_CID)
105                 Name (_DDN, AUDIO_CODEC_DDN)
106                 Name (_UID, 1)
108                 Method(_CRS, 0x0, Serialized)
109                 {
110                         Name(SBUF,ResourceTemplate ()
111                         {
112                                 I2CSerialBus(
113                                         AUDIO_CODEC_I2C_ADDR,   /* SlaveAddress: bus address */
114                                         ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
115                                         400000,                 /* ConnectionSpeed: in Hz */
116                                         AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
117                                         "\\_SB.PCI0.I2C5"       /* ResourceSource: I2C bus controller name */
118                                 )
120                          /* Jack Detect (index 0) */
121                          GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
122                                   "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX }
123                         } )
124                         Return (SBUF)
125                 }
127                 Method (_STA)
128                 {
129                         Return (0xF)
130                 }
131         }
134 Scope (\_SB.PCI0.I2C6)
136         Device (ETPA)
137         {
138                 Name (_HID, "ELAN0000")
139                 Name (_DDN, "Elan Touchpad")
140                 Name (_UID, 3)
141                 Name (ISTP, 1) /* Touchpad */
143                 Name (_CRS, ResourceTemplate()
144                 {
145                         I2cSerialBus (
146                                 0x15,                     /* SlaveAddress */
147                                 ControllerInitiated,      /* SlaveMode */
148                                 400000,                   /* ConnectionSpeed */
149                                 AddressingMode7Bit,       /* AddressingMode */
150                                 "\\_SB.PCI0.I2C6",        /* ResourceSource */
151                         )
152                         GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
153                                  "\\_SB.GPNC") { BOARD_TRACKPAD_GPIO_INDEX }
154                 })
156                 Method (_STA)
157                 {
158                         If (LEqual (\S6EN, 1)) {
159                                 Return (0xF)
160                         } Else {
161                                 Return (0x0)
162                         }
163                 }
165                 Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
166                 /* Allow device to power off in S0 */
167                 Name (_S0W, 4)
168         }
171 Scope (\_SB.PCI0.LPEA)
173         Name (GBUF, ResourceTemplate ()
174         {
175                 /* Jack Detect (index 0) */
176                 GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
177                          "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX }
178         })
181 Scope (\_SB.GPNC)
183         Method (_AEI, 0, Serialized)  // _AEI: ACPI Event Interrupts
184         {
185                 Name (RBUF, ResourceTemplate ()
186                 {
187                         GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
188                                 "\\_SB.GPNC") { BOARD_SCI_GPIO_INDEX }
189                 })
190                 Return (RBUF)
191         }
193         Method (_E0F, 0, NotSerialized)  // _Exx: Edge-Triggered GPE
194         {
195         }