Angel Pons | ae59387 | 2020-04-04 18:50:57 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 2 | |
Raul E Rangel | 5c5f211 | 2021-02-11 16:00:22 -0700 | [diff] [blame] | 3 | #include <soc/amd/common/acpi/aoac.asl> |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 4 | #include <soc/aoac_defs.h> |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 5 | #include <soc/gpio.h> |
| 6 | #include <soc/iomap.h> |
Kyösti Mälkki | c9eae79 | 2019-11-27 07:45:27 +0200 | [diff] [blame] | 7 | #include <amdblocks/acpimmio_map.h> |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 8 | |
| 9 | Device (AAHB) |
| 10 | { |
| 11 | Name (_HID, "AAHB0000") |
| 12 | Name (_UID, 0x0) |
| 13 | Name (_CRS, ResourceTemplate() |
| 14 | { |
| 15 | Memory32Fixed (ReadWrite, ALINK_AHB_ADDRESS, 0x2000) |
| 16 | }) |
Felix Held | 39a9826 | 2023-05-12 18:51:24 +0200 | [diff] [blame] | 17 | Method (_STA, 0x0, NotSerialized) |
| 18 | { |
| 19 | Return (0x0b) |
| 20 | } |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | Device (GPIO) |
| 24 | { |
| 25 | Name (_HID, GPIO_DEVICE_NAME) |
| 26 | Name (_CID, GPIO_DEVICE_NAME) |
| 27 | Name (_UID, 0) |
| 28 | Name (_DDN, GPIO_DEVICE_DESC) |
| 29 | |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 30 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 31 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 32 | Interrupt ( |
| 33 | ResourceConsumer, |
| 34 | Level, |
| 35 | ActiveLow, |
Raul E Rangel | 0a5d1d7 | 2022-05-09 16:53:28 -0600 | [diff] [blame] | 36 | Shared, , , IRQR) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 37 | { 0 } |
Felix Held | 88d8e2b | 2020-12-03 18:17:57 +0100 | [diff] [blame] | 38 | Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 39 | } |
| 40 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 41 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 42 | IRQN = IGPI |
| 43 | } Else { |
| 44 | IRQN = PGPI |
| 45 | } |
| 46 | If (IRQN == 0x1f) { |
| 47 | Return (ResourceTemplate() { |
Felix Held | 88d8e2b | 2020-12-03 18:17:57 +0100 | [diff] [blame] | 48 | Memory32Fixed (ReadWrite, ACPIMMIO_GPIO0_BASE, 0x400) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 49 | }) |
| 50 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 51 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 52 | } |
| 53 | } |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 54 | |
| 55 | Method (_STA, 0x0, NotSerialized) |
| 56 | { |
| 57 | Return (0x0F) |
| 58 | } |
| 59 | } |
| 60 | |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 61 | Device (MMC0) |
| 62 | { |
| 63 | Name (_HID, "AMDI0040") |
| 64 | Name (_UID, 0x0) |
| 65 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 66 | Local0 = ResourceTemplate() { |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 67 | Interrupt ( |
| 68 | ResourceConsumer, |
| 69 | Level, |
| 70 | ActiveLow, |
| 71 | Exclusive, , , IRQR) |
| 72 | { 0 } |
| 73 | Memory32Fixed (ReadWrite, APU_EMMC_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 74 | } |
| 75 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 76 | If (PICM) { |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 77 | IRQN = IMMC |
| 78 | } Else { |
| 79 | IRQN = PMMC |
| 80 | } |
| 81 | If (IRQN == 0x1f) { |
| 82 | Return (ResourceTemplate(){ |
| 83 | Memory32Fixed (ReadWrite, APU_EMMC_BASE, 0x1000) |
| 84 | }) |
| 85 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 86 | Return (Local0) |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 87 | } |
| 88 | } |
| 89 | |
Felix Held | 850b6c6 | 2023-09-07 16:33:26 +0200 | [diff] [blame] | 90 | Name (STAT, 0x0) |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 91 | Method (_STA, 0x0, NotSerialized) |
| 92 | { |
Felix Held | 850b6c6 | 2023-09-07 16:33:26 +0200 | [diff] [blame] | 93 | Return (STAT) |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 94 | } |
CoolStar | 35130a8 | 2024-04-11 21:23:25 -0700 | [diff] [blame^] | 95 | |
| 96 | Device (CARD) |
| 97 | { |
| 98 | Name (_ADR, 0x00000008) |
| 99 | Method (_RMV, 0, NotSerialized) |
| 100 | { |
| 101 | Return (0) |
| 102 | } |
| 103 | } |
Raul E Rangel | f700be0 | 2020-05-28 15:29:01 -0600 | [diff] [blame] | 104 | } |
| 105 | |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 106 | Device (FUR0) |
| 107 | { |
Raul E Rangel | 4389bbc | 2021-01-22 10:07:59 -0700 | [diff] [blame] | 108 | Name (_HID, "AMDI0020") |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 109 | Name (_UID, 0x0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 110 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 111 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 112 | Interrupt ( |
| 113 | ResourceConsumer, |
| 114 | Edge, |
| 115 | ActiveHigh, |
| 116 | Exclusive, , , IRQR) |
| 117 | { 0 } |
| 118 | Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 119 | Memory32Fixed (ReadWrite, APU_DMAC0_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 120 | } |
| 121 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 122 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 123 | IRQN = IUA0 |
| 124 | } Else { |
| 125 | IRQN = PUA0 |
| 126 | } |
| 127 | If (IRQN == 0x1f) { |
| 128 | Return (ResourceTemplate() { |
| 129 | Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 130 | Memory32Fixed (ReadWrite, APU_DMAC0_BASE, 0x1000) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 131 | }) |
| 132 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 133 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 134 | } |
| 135 | } |
Kangheui Won | 7fe005f | 2020-08-06 19:03:23 +1000 | [diff] [blame] | 136 | |
Matt DeVillier | 7cf9c74 | 2023-08-08 11:37:03 -0500 | [diff] [blame] | 137 | Name (STAT, 0x0) |
| 138 | Method (_STA, 0x0, NotSerialized) |
| 139 | { |
| 140 | Return (STAT) |
| 141 | } |
| 142 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 143 | AOAC_DEVICE(FCH_AOAC_DEV_UART0, 0) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | Device (FUR1) { |
Raul E Rangel | 4389bbc | 2021-01-22 10:07:59 -0700 | [diff] [blame] | 147 | Name (_HID, "AMDI0020") |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 148 | Name (_UID, 0x1) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 149 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 150 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 151 | Interrupt ( |
| 152 | ResourceConsumer, |
| 153 | Edge, |
| 154 | ActiveHigh, |
| 155 | Exclusive, , , IRQR) |
| 156 | { 0 } |
| 157 | Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 158 | Memory32Fixed (ReadWrite, APU_DMAC1_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 159 | } |
| 160 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 161 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 162 | IRQN = IUA1 |
| 163 | } Else { |
| 164 | IRQN = PUA1 |
| 165 | } |
| 166 | If (IRQN == 0x1f) { |
| 167 | Return (ResourceTemplate() { |
| 168 | Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 169 | Memory32Fixed (ReadWrite, APU_DMAC1_BASE, 0x1000) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 170 | }) |
| 171 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 172 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 173 | } |
| 174 | } |
Raul E Rangel | a31a769 | 2020-06-10 16:29:22 -0600 | [diff] [blame] | 175 | |
Matt DeVillier | 7cf9c74 | 2023-08-08 11:37:03 -0500 | [diff] [blame] | 176 | Name (STAT, 0x0) |
| 177 | Method (_STA, 0x0, NotSerialized) |
| 178 | { |
| 179 | Return (STAT) |
| 180 | } |
| 181 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 182 | AOAC_DEVICE(FCH_AOAC_DEV_UART1, 0) |
Marshall Dawson | c0b8d0d | 2019-06-20 10:29:29 -0600 | [diff] [blame] | 183 | } |
| 184 | |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 185 | Device (FUR2) { |
Raul E Rangel | 4389bbc | 2021-01-22 10:07:59 -0700 | [diff] [blame] | 186 | Name (_HID, "AMDI0020") |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 187 | Name (_UID, 0x2) |
| 188 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 189 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 190 | Interrupt ( |
| 191 | ResourceConsumer, |
| 192 | Edge, |
| 193 | ActiveHigh, |
| 194 | Exclusive, , , IRQR) |
| 195 | { 0 } |
| 196 | Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 197 | Memory32Fixed (ReadWrite, APU_DMAC2_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 198 | } |
| 199 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 200 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 201 | IRQN = IUA2 |
| 202 | } Else { |
| 203 | IRQN = PUA2 |
| 204 | } |
| 205 | If (IRQN == 0x1f) { |
| 206 | Return (ResourceTemplate() { |
| 207 | Memory32Fixed (ReadWrite, APU_UART2_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 208 | Memory32Fixed (ReadWrite, APU_DMAC2_BASE, 0x1000) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 209 | }) |
| 210 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 211 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 212 | } |
| 213 | } |
Raul E Rangel | a31a769 | 2020-06-10 16:29:22 -0600 | [diff] [blame] | 214 | |
Matt DeVillier | 7cf9c74 | 2023-08-08 11:37:03 -0500 | [diff] [blame] | 215 | Name (STAT, 0x0) |
| 216 | Method (_STA, 0x0, NotSerialized) |
| 217 | { |
| 218 | Return (STAT) |
| 219 | } |
| 220 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 221 | AOAC_DEVICE(FCH_AOAC_DEV_UART2, 0) |
Marshall Dawson | c0b8d0d | 2019-06-20 10:29:29 -0600 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | Device (FUR3) { |
Raul E Rangel | 4389bbc | 2021-01-22 10:07:59 -0700 | [diff] [blame] | 225 | Name (_HID, "AMDI0020") |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 226 | Name (_UID, 0x3) |
| 227 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 228 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 229 | Interrupt ( |
| 230 | ResourceConsumer, |
| 231 | Edge, |
| 232 | ActiveHigh, |
| 233 | Exclusive, , , IRQR) |
| 234 | { 0 } |
| 235 | Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 236 | Memory32Fixed (ReadWrite, APU_DMAC3_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 237 | } |
| 238 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 239 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 240 | IRQN = IUA3 |
| 241 | } Else { |
| 242 | IRQN = PUA3 |
| 243 | } |
| 244 | If (IRQN == 0x1f) { |
| 245 | Return (ResourceTemplate() { |
| 246 | Memory32Fixed (ReadWrite, APU_UART3_BASE, 0x1000) |
Matt DeVillier | 619bb07 | 2022-06-18 15:32:39 -0500 | [diff] [blame] | 247 | Memory32Fixed (ReadWrite, APU_DMAC3_BASE, 0x1000) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 248 | }) |
| 249 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 250 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 251 | } |
| 252 | } |
Raul E Rangel | a31a769 | 2020-06-10 16:29:22 -0600 | [diff] [blame] | 253 | |
Matt DeVillier | 7cf9c74 | 2023-08-08 11:37:03 -0500 | [diff] [blame] | 254 | Name (STAT, 0x0) |
| 255 | Method (_STA, 0x0, NotSerialized) |
| 256 | { |
| 257 | Return (STAT) |
| 258 | } |
| 259 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 260 | AOAC_DEVICE(FCH_AOAC_DEV_UART3, 0) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 261 | } |
| 262 | |
Ritul Guru | c58f674 | 2022-07-06 15:17:38 +0530 | [diff] [blame] | 263 | #if CONFIG(PSP_LOAD_MP2_FW) |
| 264 | Device (I2C0) { |
| 265 | Name (_HID, "AMDI0011") |
| 266 | Name (_UID, 0x0) |
| 267 | Method (_CRS, 0) { |
| 268 | Local0 = ResourceTemplate() { |
| 269 | Interrupt ( |
| 270 | ResourceConsumer, |
| 271 | Edge, |
| 272 | ActiveHigh, |
| 273 | Exclusive, , , IRQR) |
| 274 | { 0 } |
| 275 | Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000) |
| 276 | } |
| 277 | CreateDWordField (Local0, IRQR._INT, IRQN) |
| 278 | If (PICM) { |
| 279 | IRQN = II20 |
| 280 | } Else { |
| 281 | IRQN = PI20 |
| 282 | } |
| 283 | If (IRQN == 0x1f) { |
| 284 | Return (ResourceTemplate() { |
| 285 | Memory32Fixed (ReadWrite, APU_I2C0_BASE, 0x1000) |
| 286 | }) |
| 287 | } Else { |
| 288 | Return (Local0) |
| 289 | } |
| 290 | } |
| 291 | |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 292 | Name (STAT, 0x0) |
Ritul Guru | c58f674 | 2022-07-06 15:17:38 +0530 | [diff] [blame] | 293 | Method (_STA, 0x0, NotSerialized) |
| 294 | { |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 295 | Return (STAT) |
Ritul Guru | c58f674 | 2022-07-06 15:17:38 +0530 | [diff] [blame] | 296 | } |
| 297 | |
| 298 | AOAC_DEVICE(5, 0) |
| 299 | } |
| 300 | |
| 301 | Device (I2C1) { |
| 302 | Name (_HID, "AMDI0011") |
| 303 | Name (_UID, 0x1) |
| 304 | Method (_CRS, 0) { |
| 305 | Local0 = ResourceTemplate() { |
| 306 | Interrupt ( |
| 307 | ResourceConsumer, |
| 308 | Edge, |
| 309 | ActiveHigh, |
| 310 | Exclusive, , , IRQR) |
| 311 | { 0 } |
| 312 | Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000) |
| 313 | } |
| 314 | CreateDWordField (Local0, IRQR._INT, IRQN) |
| 315 | If (PICM) { |
| 316 | IRQN = II21 |
| 317 | } Else { |
| 318 | IRQN = PI21 |
| 319 | } |
| 320 | If (IRQN == 0x1f) { |
| 321 | Return (ResourceTemplate() { |
| 322 | Memory32Fixed (ReadWrite, APU_I2C1_BASE, 0x1000) |
| 323 | }) |
| 324 | } Else { |
| 325 | Return (Local0) |
| 326 | } |
| 327 | } |
| 328 | |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 329 | Name (STAT, 0x0) |
Ritul Guru | c58f674 | 2022-07-06 15:17:38 +0530 | [diff] [blame] | 330 | Method (_STA, 0x0, NotSerialized) |
| 331 | { |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 332 | Return (STAT) |
Ritul Guru | c58f674 | 2022-07-06 15:17:38 +0530 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | AOAC_DEVICE(6, 0) |
| 336 | } |
| 337 | #endif /* CONFIG(PSP_LOAD_MP2_FW) */ |
| 338 | |
Marshall Dawson | 59e97b6 | 2019-08-15 17:49:11 -0600 | [diff] [blame] | 339 | Device (I2C2) { |
Raul E Rangel | 8ace387 | 2021-01-22 10:15:21 -0700 | [diff] [blame] | 340 | Name (_HID, "AMDI0010") |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 341 | Name (_UID, 0x2) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 342 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 343 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 344 | Interrupt ( |
| 345 | ResourceConsumer, |
| 346 | Edge, |
| 347 | ActiveHigh, |
| 348 | Exclusive, , , IRQR) |
| 349 | { 0 } |
| 350 | Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 351 | } |
| 352 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 353 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 354 | IRQN = II22 |
| 355 | } Else { |
| 356 | IRQN = PI22 |
| 357 | } |
| 358 | If (IRQN == 0x1f) { |
| 359 | Return (ResourceTemplate() { |
| 360 | Memory32Fixed (ReadWrite, APU_I2C2_BASE, 0x1000) |
| 361 | }) |
| 362 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 363 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 364 | } |
| 365 | } |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 366 | |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 367 | Name (STAT, 0x0) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 368 | Method (_STA, 0x0, NotSerialized) |
| 369 | { |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 370 | Return (STAT) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 371 | } |
Raul E Rangel | a31a769 | 2020-06-10 16:29:22 -0600 | [diff] [blame] | 372 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 373 | AOAC_DEVICE(FCH_AOAC_DEV_I2C2, 0) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 374 | } |
| 375 | |
Marshall Dawson | 59e97b6 | 2019-08-15 17:49:11 -0600 | [diff] [blame] | 376 | Device (I2C3) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 377 | { |
Raul E Rangel | 8ace387 | 2021-01-22 10:15:21 -0700 | [diff] [blame] | 378 | Name (_HID, "AMDI0010") |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 379 | Name (_UID, 0x3) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 380 | Method (_CRS, 0) { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 381 | Local0 = ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 382 | Interrupt ( |
| 383 | ResourceConsumer, |
| 384 | Edge, |
| 385 | ActiveHigh, |
| 386 | Exclusive, , , IRQR) |
| 387 | { 0 } |
| 388 | Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000) |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 389 | } |
| 390 | CreateDWordField (Local0, IRQR._INT, IRQN) |
Kyösti Mälkki | 3f24670 | 2021-01-25 16:48:51 +0200 | [diff] [blame] | 391 | If (PICM) { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 392 | IRQN = II23 |
| 393 | } Else { |
| 394 | IRQN = PI23 |
| 395 | } |
| 396 | If (IRQN == 0x1f) { |
| 397 | Return (ResourceTemplate() { |
| 398 | Memory32Fixed (ReadWrite, APU_I2C3_BASE, 0x1000) |
| 399 | }) |
| 400 | } Else { |
Felix Held | e5f4b2f | 2020-06-08 22:31:53 +0200 | [diff] [blame] | 401 | Return (Local0) |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 402 | } |
| 403 | } |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 404 | |
| 405 | Name (STAT, 0x0) |
Marshall Dawson | 59e97b6 | 2019-08-15 17:49:11 -0600 | [diff] [blame] | 406 | Method (_STA, 0x0, NotSerialized) |
| 407 | { |
Felix Held | bfd8521 | 2023-09-04 18:02:32 +0200 | [diff] [blame] | 408 | Return (STAT) |
Marshall Dawson | 59e97b6 | 2019-08-15 17:49:11 -0600 | [diff] [blame] | 409 | } |
Raul E Rangel | a31a769 | 2020-06-10 16:29:22 -0600 | [diff] [blame] | 410 | |
Felix Held | 3b46333 | 2021-06-15 16:25:46 +0200 | [diff] [blame] | 411 | AOAC_DEVICE(FCH_AOAC_DEV_I2C3, 0) |
Marshall Dawson | 59e97b6 | 2019-08-15 17:49:11 -0600 | [diff] [blame] | 412 | } |
| 413 | |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 414 | Device (MISC) |
| 415 | { |
| 416 | Name (_HID, "AMD0040") |
| 417 | Name (_UID, 0x3) |
| 418 | Name (_CRS, ResourceTemplate() { |
Raul E Rangel | 27b6b0e | 2020-03-10 14:05:42 -0600 | [diff] [blame] | 419 | Memory32Fixed (ReadWrite, ACPIMMIO_MISC_BASE, 0x100) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 420 | }) |
Akshu Agrawal | c49d07c | 2020-07-06 19:38:16 +0530 | [diff] [blame] | 421 | Name (_DSD, Package () |
| 422 | { |
| 423 | ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), |
| 424 | Package () |
| 425 | { |
| 426 | Package () { "is-rv", 1 }, |
| 427 | }, |
| 428 | }) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 429 | Method (_STA, 0x0, NotSerialized) |
| 430 | { |
Felix Held | 3d19aa9 | 2022-10-28 19:58:09 +0200 | [diff] [blame] | 431 | Return (0x0b) |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 432 | } |
| 433 | } |