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)
17 Method (_STA, 0x0, NotSerialized)
25 Name (_HID, GPIO_DEVICE_NAME)
26 Name (_CID, GPIO_DEVICE_NAME)
28 Name (_DDN, GPIO_DEVICE_DESC)
31 Local0 = ResourceTemplate() {
38 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
40 CreateDWordField (Local0, IRQR._INT, IRQN)
47 Return (ResourceTemplate() {
48 Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400)
55 Method (_STA, 0x0, NotSerialized)
63 Name (_HID, "AMDI0040")
66 Local0 = ResourceTemplate() {
73 Memory32Fixed (ReadWrite, APU_EMMC_BASE, 0x1000)
75 CreateDWordField (Local0, IRQR._INT, IRQN)
82 Return (ResourceTemplate(){
83 Memory32Fixed (ReadWrite, APU_EMMC_BASE, 0x1000)
91 Method (_STA, 0x0, NotSerialized)
98 Name (_ADR, 0x00000008)
99 Method (_RMV, 0, NotSerialized)
108 Name (_HID, "AMDI0020")
111 Local0 = ResourceTemplate() {
118 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
119 Memory32Fixed (ReadWrite, APU_DMAC0_BASE, 0x1000)
121 CreateDWordField (Local0, IRQR._INT, IRQN)
128 Return (ResourceTemplate() {
129 Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000)
130 Memory32Fixed (ReadWrite, APU_DMAC0_BASE, 0x1000)
138 Method (_STA, 0x0, NotSerialized)
143 AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0)
147 Name (_HID, "AMDI0020")
150 Local0 = ResourceTemplate() {
157 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
158 Memory32Fixed (ReadWrite, APU_DMAC1_BASE, 0x1000)
160 CreateDWordField (Local0, IRQR._INT, IRQN)
167 Return (ResourceTemplate() {
168 Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000)
169 Memory32Fixed (ReadWrite, APU_DMAC1_BASE, 0x1000)
177 Method (_STA, 0x0, NotSerialized)
182 AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0)
186 Name (_HID, "AMDI0020")
189 Local0 = ResourceTemplate() {
196 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
197 Memory32Fixed (ReadWrite, APU_DMAC2_BASE, 0x1000)
199 CreateDWordField (Local0, IRQR._INT, IRQN)
206 Return (ResourceTemplate() {
207 Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000)
208 Memory32Fixed (ReadWrite, APU_DMAC2_BASE, 0x1000)
216 Method (_STA, 0x0, NotSerialized)
221 AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0)
225 Name (_HID, "AMDI0020")
228 Local0 = ResourceTemplate() {
235 Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000)
236 Memory32Fixed (ReadWrite, APU_DMAC3_BASE, 0x1000)
238 CreateDWordField (Local0, IRQR._INT, IRQN)
245 Return (ResourceTemplate() {
246 Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000)
247 Memory32Fixed (ReadWrite, APU_DMAC3_BASE, 0x1000)
255 Method (_STA, 0x0, NotSerialized)
260 AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0)
263 #if CONFIG(PSP_LOAD_MP2_FW)
265 Name (_HID, "AMDI0011")
268 Local0 = ResourceTemplate() {
275 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
277 CreateDWordField (Local0, IRQR._INT, IRQN)
284 Return (ResourceTemplate() {
285 Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000)
293 Method (_STA, 0x0, NotSerialized)
302 Name (_HID, "AMDI0011")
305 Local0 = ResourceTemplate() {
312 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
314 CreateDWordField (Local0, IRQR._INT, IRQN)
321 Return (ResourceTemplate() {
322 Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000)
330 Method (_STA, 0x0, NotSerialized)
337 #endif /* CONFIG(PSP_LOAD_MP2_FW) */
340 Name (_HID, "AMDI0010")
343 Local0 = ResourceTemplate() {
350 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
352 CreateDWordField (Local0, IRQR._INT, IRQN)
359 Return (ResourceTemplate() {
360 Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000)
368 Method (_STA, 0x0, NotSerialized)
373 AOAC_DEVICE(FCH_AOAC_DEV_I2C2, 0)
378 Name (_HID, "AMDI0010")
381 Local0 = ResourceTemplate() {
388 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
390 CreateDWordField (Local0, IRQR._INT, IRQN)
397 Return (ResourceTemplate() {
398 Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000)
406 Method (_STA, 0x0, NotSerialized)
411 AOAC_DEVICE(FCH_AOAC_DEV_I2C3, 0)
416 Name (_HID, "AMD0040")
418 Name (_CRS, ResourceTemplate() {
419 Memory32Fixed (ReadWrite, ACPIMMIO_MISC_BASE, 0x100)
421 Name (_DSD, Package ()
423 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
426 Package () { "is-rv", 1 },
429 Method (_STA, 0x0, NotSerialized)