Subrata Banik | 0808992 | 2020-10-03 13:02:06 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | /* Intel PCH PCIe support */ |
| 4 | |
| 5 | Method (IRQM, 1, Serialized) { |
| 6 | |
| 7 | /* Interrupt Map INTA->INTA, INTB->INTB, INTC->INTC, INTD->INTD */ |
| 8 | Name (IQAA, Package () { |
| 9 | Package () { 0x0000ffff, 0, 0, 16 }, |
| 10 | Package () { 0x0000ffff, 1, 0, 17 }, |
| 11 | Package () { 0x0000ffff, 2, 0, 18 }, |
| 12 | Package () { 0x0000ffff, 3, 0, 19 } }) |
| 13 | Name (IQAP, Package () { |
| 14 | Package () { 0x0000ffff, 0, 0, 11 }, |
| 15 | Package () { 0x0000ffff, 1, 0, 10 }, |
| 16 | Package () { 0x0000ffff, 2, 0, 11 }, |
| 17 | Package () { 0x0000ffff, 3, 0, 11 } }) |
| 18 | |
| 19 | /* Interrupt Map INTA->INTB, INTB->INTC, INTC->INTD, INTD->INTA */ |
| 20 | Name (IQBA, Package () { |
| 21 | Package () { 0x0000ffff, 0, 0, 17 }, |
| 22 | Package () { 0x0000ffff, 1, 0, 18 }, |
| 23 | Package () { 0x0000ffff, 2, 0, 19 }, |
| 24 | Package () { 0x0000ffff, 3, 0, 16 } }) |
| 25 | Name (IQBP, Package () { |
| 26 | Package () { 0x0000ffff, 0, 0, 10 }, |
| 27 | Package () { 0x0000ffff, 1, 0, 11 }, |
| 28 | Package () { 0x0000ffff, 2, 0, 11 }, |
| 29 | Package () { 0x0000ffff, 3, 0, 11 } }) |
| 30 | |
| 31 | /* Interrupt Map INTA->INTC, INTB->INTD, INTC->INTA, INTD->INTB */ |
| 32 | Name (IQCA, Package () { |
| 33 | Package () { 0x0000ffff, 0, 0, 18 }, |
| 34 | Package () { 0x0000ffff, 1, 0, 19 }, |
| 35 | Package () { 0x0000ffff, 2, 0, 16 }, |
| 36 | Package () { 0x0000ffff, 3, 0, 17 } }) |
| 37 | Name (IQCP, Package () { |
| 38 | Package () { 0x0000ffff, 0, 0, 11 }, |
| 39 | Package () { 0x0000ffff, 1, 0, 11 }, |
| 40 | Package () { 0x0000ffff, 2, 0, 11 }, |
| 41 | Package () { 0x0000ffff, 3, 0, 10 } }) |
| 42 | |
| 43 | /* Interrupt Map INTA->INTD, INTB->INTA, INTC->INTB, INTD->INTC */ |
| 44 | Name (IQDA, Package () { |
| 45 | Package () { 0x0000ffff, 0, 0, 19 }, |
| 46 | Package () { 0x0000ffff, 1, 0, 16 }, |
| 47 | Package () { 0x0000ffff, 2, 0, 17 }, |
| 48 | Package () { 0x0000ffff, 3, 0, 18 } }) |
| 49 | Name (IQDP, Package () { |
| 50 | Package () { 0x0000ffff, 0, 0, 11 }, |
| 51 | Package () { 0x0000ffff, 1, 0, 11 }, |
| 52 | Package () { 0x0000ffff, 2, 0, 10 }, |
| 53 | Package () { 0x0000ffff, 3, 0, 11 } }) |
| 54 | |
| 55 | Switch (ToInteger (Arg0)) |
| 56 | { |
Michał Żygowski | f422ed8 | 2022-04-20 12:52:51 +0200 | [diff] [blame] | 57 | Case (Package () { 1, 5, 9, 13, 17, 21, 25 }) { |
Subrata Banik | 0808992 | 2020-10-03 13:02:06 +0530 | [diff] [blame] | 58 | If (PICM) { |
| 59 | Return (IQAA) |
| 60 | } Else { |
| 61 | Return (IQAP) |
| 62 | } |
| 63 | } |
| 64 | |
Michał Żygowski | f422ed8 | 2022-04-20 12:52:51 +0200 | [diff] [blame] | 65 | Case (Package () { 2, 6, 10, 14, 18, 22, 26 }) { |
Subrata Banik | 0808992 | 2020-10-03 13:02:06 +0530 | [diff] [blame] | 66 | If (PICM) { |
| 67 | Return (IQBA) |
| 68 | } Else { |
| 69 | Return (IQBP) |
| 70 | } |
| 71 | } |
| 72 | |
Michał Żygowski | f422ed8 | 2022-04-20 12:52:51 +0200 | [diff] [blame] | 73 | Case (Package () { 3, 7, 11, 15, 19, 23, 27 }) { |
Subrata Banik | 0808992 | 2020-10-03 13:02:06 +0530 | [diff] [blame] | 74 | If (PICM) { |
| 75 | Return (IQCA) |
| 76 | } Else { |
| 77 | Return (IQCP) |
| 78 | } |
| 79 | } |
| 80 | |
Michał Żygowski | f422ed8 | 2022-04-20 12:52:51 +0200 | [diff] [blame] | 81 | Case (Package () { 4, 8, 12, 16, 20, 24, 28 }) { |
Subrata Banik | 0808992 | 2020-10-03 13:02:06 +0530 | [diff] [blame] | 82 | If (PICM) { |
| 83 | Return (IQDA) |
| 84 | } Else { |
| 85 | Return (IQDP) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | Default { |
| 90 | If (PICM) { |
| 91 | Return (IQDA) |
| 92 | } Else { |
| 93 | Return (IQDP) |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | Device (RP01) |
| 100 | { |
| 101 | Name (_ADR, 0x001C0000) |
| 102 | |
| 103 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 104 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 105 | { |
| 106 | , 24, |
| 107 | RPPN, 8, /* Root Port Number */ |
| 108 | } |
| 109 | |
| 110 | Method (_PRT) |
| 111 | { |
| 112 | Return (IRQM (RPPN)) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | Device (RP02) |
| 117 | { |
| 118 | Name (_ADR, 0x001C0001) |
| 119 | |
| 120 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 121 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 122 | { |
| 123 | , 24, |
| 124 | RPPN, 8, /* Root Port Number */ |
| 125 | } |
| 126 | |
| 127 | Method (_PRT) |
| 128 | { |
| 129 | Return (IRQM (RPPN)) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | Device (RP03) |
| 134 | { |
| 135 | Name (_ADR, 0x001C0002) |
| 136 | |
| 137 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 138 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 139 | { |
| 140 | , 24, |
| 141 | RPPN, 8, /* Root Port Number */ |
| 142 | } |
| 143 | |
| 144 | Method (_PRT) |
| 145 | { |
| 146 | Return (IRQM (RPPN)) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | Device (RP04) |
| 151 | { |
| 152 | Name (_ADR, 0x001C0003) |
| 153 | |
| 154 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 155 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 156 | { |
| 157 | , 24, |
| 158 | RPPN, 8, /* Root Port Number */ |
| 159 | } |
| 160 | |
| 161 | Method (_PRT) |
| 162 | { |
| 163 | Return (IRQM (RPPN)) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | Device (RP05) |
| 168 | { |
| 169 | Name (_ADR, 0x001C0004) |
| 170 | |
| 171 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 172 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 173 | { |
| 174 | , 24, |
| 175 | RPPN, 8, /* Root Port Number */ |
| 176 | } |
| 177 | |
| 178 | Method (_PRT) |
| 179 | { |
| 180 | Return (IRQM (RPPN)) |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | Device (RP06) |
| 185 | { |
| 186 | Name (_ADR, 0x001C0005) |
| 187 | |
| 188 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 189 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 190 | { |
| 191 | , 24, |
| 192 | RPPN, 8, /* Root Port Number */ |
| 193 | } |
| 194 | |
| 195 | Method (_PRT) |
| 196 | { |
| 197 | Return (IRQM (RPPN)) |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | Device (RP07) |
| 202 | { |
| 203 | Name (_ADR, 0x001C0006) |
| 204 | |
| 205 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 206 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 207 | { |
| 208 | , 24, |
| 209 | RPPN, 8, /* Root Port Number */ |
| 210 | } |
| 211 | |
| 212 | Method (_PRT) |
| 213 | { |
| 214 | Return (IRQM (RPPN)) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | Device (RP08) |
| 219 | { |
| 220 | Name (_ADR, 0x001C0007) |
| 221 | |
| 222 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 223 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 224 | { |
| 225 | , 24, |
| 226 | RPPN, 8, /* Root Port Number */ |
| 227 | } |
| 228 | |
| 229 | Method (_PRT) |
| 230 | { |
| 231 | Return (IRQM (RPPN)) |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | Device (RP09) |
| 236 | { |
| 237 | Name (_ADR, 0x001D0000) |
| 238 | |
| 239 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 240 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 241 | { |
| 242 | , 24, |
| 243 | RPPN, 8, /* Root Port Number */ |
| 244 | } |
| 245 | |
| 246 | Method (_PRT) |
| 247 | { |
| 248 | Return (IRQM (RPPN)) |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | Device (RP10) |
| 253 | { |
| 254 | Name (_ADR, 0x001D0001) |
| 255 | |
| 256 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 257 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 258 | { |
| 259 | , 24, |
| 260 | RPPN, 8, /* Root Port Number */ |
| 261 | } |
| 262 | |
| 263 | Method (_PRT) |
| 264 | { |
| 265 | Return (IRQM (RPPN)) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | Device (RP11) |
| 270 | { |
| 271 | Name (_ADR, 0x001D0002) |
| 272 | |
| 273 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 274 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 275 | { |
| 276 | , 24, |
| 277 | RPPN, 8, /* Root Port Number */ |
| 278 | } |
| 279 | |
| 280 | Method (_PRT) |
| 281 | { |
| 282 | Return (IRQM (RPPN)) |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | Device (RP12) |
| 287 | { |
| 288 | Name (_ADR, 0x001D0003) |
| 289 | |
| 290 | OperationRegion (RPCS, PCI_Config, 0x4c, 4) |
| 291 | Field (RPCS, AnyAcc, NoLock, Preserve) |
| 292 | { |
| 293 | , 24, |
| 294 | RPPN, 8, /* Root Port Number */ |
| 295 | } |
| 296 | |
| 297 | Method (_PRT) |
| 298 | { |
| 299 | Return (IRQM (RPPN)) |
| 300 | } |
| 301 | } |
Tim Wawrzynczak | cf39336 | 2021-12-16 15:01:44 -0700 | [diff] [blame] | 302 | |
Michał Żygowski | f422ed8 | 2022-04-20 12:52:51 +0200 | [diff] [blame] | 303 | #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S) |
| 304 | #include "pcie_pch_s.asl" |
| 305 | #endif |
| 306 | |
| 307 | |
Sean Rhodes | 2eee78a | 2024-02-19 11:47:21 +0000 | [diff] [blame^] | 308 | #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_P) |
Tim Wawrzynczak | cf39336 | 2021-12-16 15:01:44 -0700 | [diff] [blame] | 309 | Device (PEG0) |
| 310 | { |
| 311 | Name (_ADR, 0x00060000) |
| 312 | } |
| 313 | #endif |
| 314 | |
| 315 | #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_P) |
| 316 | Device (PEG1) |
| 317 | { |
| 318 | Name (_ADR, 0x00060002) |
| 319 | } |
| 320 | |
| 321 | Device (PEG2) |
| 322 | { |
| 323 | Name (_ADR, 0x00010000) |
| 324 | } |
| 325 | #endif |
Anil Kumar | f945118 | 2022-12-07 16:33:51 -0800 | [diff] [blame] | 326 | |
| 327 | Device (SRAM) |
| 328 | { |
| 329 | Name (_ADR, 0x00140002) |
| 330 | } |
| 331 | |
| 332 | Device (HEC1) |
| 333 | { |
| 334 | Name (_ADR, 0x00160000) |
| 335 | } |