1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <soc/amd/common/acpi/aoac.asl>
4 #include <soc/aoac_defs.h>
7 #include <amdblocks/acpimmio_map.h>
11 Name (_HID, "AAHB0000")
13 Name (_CRS, ResourceTemplate()
15 Memory32Fixed (ReadWrite, ALINK_AHB_ADDRESS, 0x2000)
22 Name (_HID, GPIO_DEVICE_NAME)
23 Name (_CID, GPIO_DEVICE_NAME)
25 Name (_DDN, GPIO_DEVICE_DESC)
28 Local0 = ResourceTemplate() {
35 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
37 CreateDWordField (Local0, IRQR._INT, IRQN)
43 If (IRQN == 0x1f || IRQN == 0) {
44 Return (ResourceTemplate() {
45 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
52 Method (_STA, 0x0, NotSerialized)
60 Name (_HID, "AMDI0020")
63 Local0 = ResourceTemplate() {
70 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
72 CreateDWordField (Local0, IRQR._INT, IRQN)
79 Return (ResourceTemplate() {
80 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
88 Method (_STA, 0x0, NotSerialized)
93 AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0)
97 Name (_HID, "AMDI0020")
100 Local0 = ResourceTemplate() {
107 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
109 CreateDWordField (Local0, IRQR._INT, IRQN)
116 Return (ResourceTemplate() {
117 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
125 Method (_STA, 0x0, NotSerialized)
130 AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0)
134 Name (_HID, "AMDI0020")
137 Local0 = ResourceTemplate() {
144 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
146 CreateDWordField (Local0, IRQR._INT, IRQN)
153 Return (ResourceTemplate() {
154 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
162 Method (_STA, 0x0, NotSerialized)
167 AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0)
171 Name (_HID, "AMDI0010")
174 Local0 = ResourceTemplate() {
181 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
183 CreateDWordField (Local0, IRQR._INT, IRQN)
190 Return (ResourceTemplate() {
191 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
199 Method (_STA, 0x0, NotSerialized)
204 AOAC_DEVICE(FCH_AOAC_DEV_I2C0, 0)
208 Name (_HID, "AMDI0010")
211 Local0 = ResourceTemplate() {
218 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
220 CreateDWordField (Local0, IRQR._INT, IRQN)
227 Return (ResourceTemplate() {
228 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
236 Method (_STA, 0x0, NotSerialized)
241 AOAC_DEVICE(FCH_AOAC_DEV_I2C1, 0)
245 Name (_HID, "AMDI0010")
248 Local0 = ResourceTemplate() {
255 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
257 CreateDWordField (Local0, IRQR._INT, IRQN)
264 Return (ResourceTemplate() {
265 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
273 Method (_STA, 0x0, NotSerialized)
278 AOAC_DEVICE(FCH_AOAC_DEV_I2C2, 0)
283 Name (_HID, "AMDI0010")
286 Local0 = ResourceTemplate() {
293 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
295 CreateDWordField (Local0, IRQR._INT, IRQN)
302 Return (ResourceTemplate() {
303 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
311 Method (_STA, 0x0, NotSerialized)
316 AOAC_DEVICE(FCH_AOAC_DEV_I2C3, 0)
321 Name (_HID, "AMDI0010")
324 Local0 = ResourceTemplate() {
331 Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000)
333 CreateDWordField (Local0, IRQR._INT, IRQN)
340 Return (ResourceTemplate() {
341 Memory32Fixed (ReadWrite, APU_I2C4_BASE, 0x1000)
349 Method (_STA, 0x0, NotSerialized)
354 AOAC_DEVICE(FCH_AOAC_DEV_I2C4, 0)
359 Name (_HID, "AMDI0010")
362 Local0 = ResourceTemplate() {
369 Memory32Fixed (ReadWrite, APU_I2C5_BASE, 0x1000)
371 CreateDWordField (Local0, IRQR._INT, IRQN)
378 Return (ResourceTemplate() {
379 Memory32Fixed (ReadWrite, APU_I2C5_BASE, 0x1000)
387 Method (_STA, 0x0, NotSerialized)
392 AOAC_DEVICE(FCH_AOAC_DEV_I2C5, 0)
397 Name (_HID, "AMD0040")
399 Name (_CRS, ResourceTemplate() {
400 Memory32Fixed (ReadWrite, ACPIMMIO_MISC_BASE, 0x100)
402 Name (_DSD, Package ()
404 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
407 Package () { "is-rv", 1 },
410 Method (_STA, 0x0, NotSerialized)