1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* TODO: Update for Phoenix */
5 #include <soc/amd/common/acpi/aoac.asl>
6 #include <soc/aoac_defs.h>
9 #include <amdblocks/acpimmio_map.h>
13 Name (_HID, "AAHB0000")
15 Name (_CRS, ResourceTemplate()
17 Memory32Fixed (ReadWrite, ALINK_AHB_ADDRESS, 0x2000)
19 Method (_STA, 0x0, NotSerialized)
27 Name (_HID, GPIO_DEVICE_NAME)
28 Name (_CID, GPIO_DEVICE_NAME)
30 Name (_DDN, GPIO_DEVICE_DESC)
33 Local0 = ResourceTemplate() {
40 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
42 CreateDWordField (Local0, IRQR._INT, IRQN)
49 Return (ResourceTemplate() {
50 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
57 Method (_STA, 0x0, NotSerialized)
65 Name (_HID, "AMDI0020")
68 Local0 = ResourceTemplate() {
75 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
77 CreateDWordField (Local0, IRQR._INT, IRQN)
84 Return (ResourceTemplate() {
85 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
93 Method (_STA, 0x0, NotSerialized)
98 AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0)
102 Name (_HID, "AMDI0020")
105 Local0 = ResourceTemplate() {
112 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
114 CreateDWordField (Local0, IRQR._INT, IRQN)
121 Return (ResourceTemplate() {
122 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
130 Method (_STA, 0x0, NotSerialized)
135 AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0)
139 Name (_HID, "AMDI0020")
142 Local0 = ResourceTemplate() {
149 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
151 CreateDWordField (Local0, IRQR._INT, IRQN)
158 Return (ResourceTemplate() {
159 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
167 Method (_STA, 0x0, NotSerialized)
172 AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0)
176 Name (_HID, "AMDI0020")
179 Local0 = ResourceTemplate() {
186 Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000)
188 CreateDWordField (Local0, IRQR._INT, IRQN)
195 Return (ResourceTemplate() {
196 Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000)
204 Method (_STA, 0x0, NotSerialized)
209 AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0)
213 Name (_HID, "AMDI0020")
216 Local0 = ResourceTemplate() {
223 Memory32Fixed (ReadWrite, APU_UART4_BASE, 0x1000)
225 CreateDWordField (Local0, IRQR._INT, IRQN)
232 Return (ResourceTemplate() {
233 Memory32Fixed (ReadWrite, APU_UART4_BASE, 0x1000)
241 Method (_STA, 0x0, NotSerialized)
246 AOAC_DEVICE(FCH_AOAC_DEV_UART4, 0)
250 Name (_HID, "AMDI0010")
253 Local0 = ResourceTemplate() {
260 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
262 CreateDWordField (Local0, IRQR._INT, IRQN)
269 Return (ResourceTemplate() {
270 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
278 Method (_STA, 0x0, NotSerialized)
283 AOAC_DEVICE(FCH_AOAC_DEV_I2C0, 0)
287 Name (_HID, "AMDI0010")
290 Local0 = ResourceTemplate() {
297 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
299 CreateDWordField (Local0, IRQR._INT, IRQN)
306 Return (ResourceTemplate() {
307 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
315 Method (_STA, 0x0, NotSerialized)
320 AOAC_DEVICE(FCH_AOAC_DEV_I2C1, 0)
324 Name (_HID, "AMDI0010")
327 Local0 = ResourceTemplate() {
334 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
336 CreateDWordField (Local0, IRQR._INT, IRQN)
343 Return (ResourceTemplate() {
344 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
352 Method (_STA, 0x0, NotSerialized)
357 AOAC_DEVICE(FCH_AOAC_DEV_I2C2, 0)
362 #if CONFIG(SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP)
363 Name (_HID, "AMDI0019")
365 Name (_HID, "AMDI0010")
369 Local0 = ResourceTemplate() {
376 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
378 CreateDWordField (Local0, IRQR._INT, IRQN)
385 Return (ResourceTemplate() {
386 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
394 Method (_STA, 0x0, NotSerialized)
399 /* If this device is shared with PSP, then PSP takes care of power management */
400 #if !CONFIG(SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP)
401 AOAC_DEVICE(FCH_AOAC_DEV_I2C3, 0)
407 Name (_HID, "AMD0040")
409 Name (_CRS, ResourceTemplate() {
410 Memory32Fixed (ReadWrite, ACPIMMIO_MISC_BASE, 0x100)
412 Name (_DSD, Package ()
414 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
417 Package () { "is-rv", 1 },
420 Method (_STA, 0x0, NotSerialized)