Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; version 2 of |
| 9 | * the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 17 | /* The below definitions are used for customization |
| 18 | * Some boards/devices may need different data hold time |
| 19 | */ |
| 20 | #ifndef BOARD_I2C1_DATA_HOLD_TIME |
| 21 | #define BOARD_I2C1_DATA_HOLD_TIME 6 |
| 22 | #endif |
| 23 | |
| 24 | #ifndef BOARD_I2C2_DATA_HOLD_TIME |
| 25 | #define BOARD_I2C2_DATA_HOLD_TIME 6 |
| 26 | #endif |
| 27 | |
| 28 | #ifndef BOARD_I2C3_DATA_HOLD_TIME |
| 29 | #define BOARD_I2C3_DATA_HOLD_TIME 6 |
| 30 | #endif |
| 31 | |
| 32 | #ifndef BOARD_I2C4_DATA_HOLD_TIME |
| 33 | #define BOARD_I2C4_DATA_HOLD_TIME 6 |
| 34 | #endif |
| 35 | |
| 36 | #ifndef BOARD_I2C5_DATA_HOLD_TIME |
| 37 | #define BOARD_I2C5_DATA_HOLD_TIME 6 |
| 38 | #endif |
| 39 | |
| 40 | #ifndef BOARD_I2C6_DATA_HOLD_TIME |
| 41 | #define BOARD_I2C6_DATA_HOLD_TIME 6 |
| 42 | #endif |
| 43 | |
| 44 | #ifndef BOARD_I2C7_DATA_HOLD_TIME |
| 45 | #define BOARD_I2C7_DATA_HOLD_TIME 6 |
| 46 | #endif |
| 47 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 48 | Device (SDM1) |
| 49 | { |
| 50 | Name (_HID, "INTL9C60") |
| 51 | Name (_UID, 1) |
| 52 | Name (_DDN, "DMA Controller #1") |
| 53 | |
| 54 | Name (RBUF, ResourceTemplate() |
| 55 | { |
| 56 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 57 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 58 | { |
| 59 | LPSS_DMA1_IRQ |
| 60 | } |
| 61 | }) |
| 62 | |
| 63 | Method (_CRS) |
| 64 | { |
| 65 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 66 | Store (\S0B0, RBAS) |
| 67 | Return (^RBUF) |
| 68 | } |
| 69 | |
| 70 | Method (_STA) |
| 71 | { |
| 72 | If (LEqual (\S0EN, 1)) { |
| 73 | Return (0xF) |
| 74 | } Else { |
| 75 | Return (0x0) |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | Device (SDM2) |
| 81 | { |
| 82 | Name (_HID, "INTL9C60") |
| 83 | Name (_UID, 2) |
| 84 | Name (_DDN, "DMA Controller #2") |
| 85 | |
| 86 | Name (RBUF, ResourceTemplate() |
| 87 | { |
| 88 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 89 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 90 | { |
| 91 | LPSS_DMA2_IRQ |
| 92 | } |
| 93 | }) |
| 94 | |
| 95 | Method (_CRS) |
| 96 | { |
| 97 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 98 | Store (\S8B0, RBAS) |
| 99 | Return (^RBUF) |
| 100 | } |
| 101 | |
| 102 | Method (_STA) |
| 103 | { |
| 104 | If (LEqual (\S8EN, 1)) { |
| 105 | Return (0xF) |
| 106 | } Else { |
| 107 | Return (0x0) |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | Device (I2C1) |
| 113 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 114 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 115 | Name (_UID, 1) |
| 116 | Name (_DDN, "I2C Controller #1") |
| 117 | |
| 118 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 119 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C1_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 120 | |
| 121 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 122 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C1_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 123 | |
| 124 | Name (RBUF, ResourceTemplate() |
| 125 | { |
| 126 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 127 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 128 | { |
| 129 | LPSS_I2C1_IRQ |
| 130 | } |
| 131 | FixedDMA (0x10, 0x0, Width32Bit, ) |
| 132 | FixedDMA (0x11, 0x1, Width32Bit, ) |
| 133 | }) |
| 134 | |
| 135 | Method (_CRS) |
| 136 | { |
| 137 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 138 | Store (\S1B0, RBAS) |
| 139 | Return (^RBUF) |
| 140 | } |
| 141 | |
| 142 | Method (_STA) |
| 143 | { |
| 144 | If (LEqual (\S1EN, 1)) { |
| 145 | Return (0xF) |
| 146 | } Else { |
| 147 | Return (0x0) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | OperationRegion (KEYS, SystemMemory, S1B1, 0x100) |
| 152 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 153 | { |
| 154 | Offset (0x84), |
| 155 | PSAT, 32, |
| 156 | } |
| 157 | |
| 158 | Method (_PS3) |
| 159 | { |
| 160 | Or (PSAT, 0x00000003, PSAT) |
| 161 | Or (PSAT, 0x00000000, PSAT) |
| 162 | } |
| 163 | |
| 164 | Method (_PS0) |
| 165 | { |
| 166 | And (PSAT, 0xfffffffc, PSAT) |
| 167 | Or (PSAT, 0x00000000, PSAT) |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | Device (I2C2) |
| 172 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 173 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 174 | Name (_UID, 2) |
| 175 | Name (_DDN, "I2C Controller #2") |
| 176 | |
| 177 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 178 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C2_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 179 | |
| 180 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 181 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C2_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 182 | |
| 183 | Name (RBUF, ResourceTemplate() |
| 184 | { |
| 185 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 186 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 187 | { |
| 188 | LPSS_I2C2_IRQ |
| 189 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 190 | FixedDMA (0x12, 0x2, Width32Bit, ) |
| 191 | FixedDMA (0x13, 0x3, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 192 | }) |
| 193 | |
| 194 | Method (_CRS) |
| 195 | { |
| 196 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 197 | Store (\S2B0, RBAS) |
| 198 | Return (^RBUF) |
| 199 | } |
| 200 | |
| 201 | Method (_STA) |
| 202 | { |
| 203 | If (LEqual (\S2EN, 1)) { |
| 204 | Return (0xF) |
| 205 | } Else { |
| 206 | Return (0x0) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | OperationRegion (KEYS, SystemMemory, S2B1, 0x100) |
| 211 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 212 | { |
| 213 | Offset (0x84), |
| 214 | PSAT, 32, |
| 215 | } |
| 216 | |
| 217 | Method (_PS3) |
| 218 | { |
| 219 | Or (PSAT, 0x00000003, PSAT) |
| 220 | Or (PSAT, 0x00000000, PSAT) |
| 221 | } |
| 222 | |
| 223 | Method (_PS0) |
| 224 | { |
| 225 | And (PSAT, 0xfffffffc, PSAT) |
| 226 | Or (PSAT, 0x00000000, PSAT) |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | Device (I2C3) |
| 231 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 232 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 233 | Name (_UID, 3) |
| 234 | Name (_DDN, "I2C Controller #3") |
| 235 | |
| 236 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 237 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C3_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 238 | |
| 239 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 240 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C3_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 241 | |
| 242 | Name (RBUF, ResourceTemplate() |
| 243 | { |
| 244 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 245 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 246 | { |
| 247 | LPSS_I2C3_IRQ |
| 248 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 249 | FixedDMA (0x14, 0x4, Width32Bit, ) |
| 250 | FixedDMA (0x15, 0x5, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 251 | }) |
| 252 | |
| 253 | Method (_CRS) |
| 254 | { |
| 255 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 256 | Store (\S3B0, RBAS) |
| 257 | Return (^RBUF) |
| 258 | } |
| 259 | |
| 260 | Method (_STA) |
| 261 | { |
| 262 | If (LEqual (\S3EN, 1)) { |
| 263 | Return (0xF) |
| 264 | } Else { |
| 265 | Return (0x0) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | OperationRegion (KEYS, SystemMemory, S3B1, 0x100) |
| 270 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 271 | { |
| 272 | Offset (0x84), |
| 273 | PSAT, 32, |
| 274 | } |
| 275 | |
| 276 | Method (_PS3) |
| 277 | { |
| 278 | Or (PSAT, 0x00000003, PSAT) |
| 279 | Or (PSAT, 0x00000000, PSAT) |
| 280 | } |
| 281 | |
| 282 | Method (_PS0) |
| 283 | { |
| 284 | And (PSAT, 0xfffffffc, PSAT) |
| 285 | Or (PSAT, 0x00000000, PSAT) |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | Device (I2C4) |
| 290 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 291 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 292 | Name (_UID, 4) |
| 293 | Name (_DDN, "I2C Controller #4") |
| 294 | |
| 295 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 296 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C4_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 297 | |
| 298 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 299 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C4_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 300 | |
| 301 | Name (RBUF, ResourceTemplate() |
| 302 | { |
| 303 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 304 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 305 | { |
| 306 | LPSS_I2C4_IRQ |
| 307 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 308 | FixedDMA (0x16, 0x6, Width32Bit, ) |
| 309 | FixedDMA (0x17, 0x7, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 310 | }) |
| 311 | |
| 312 | Method (_CRS) |
| 313 | { |
| 314 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 315 | Store (\S4B0, RBAS) |
| 316 | Return (^RBUF) |
| 317 | } |
| 318 | |
| 319 | Method (_STA) |
| 320 | { |
| 321 | If (LEqual (\S4EN, 1)) { |
| 322 | Return (0xF) |
| 323 | } Else { |
| 324 | Return (0x0) |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | OperationRegion (KEYS, SystemMemory, S4B1, 0x100) |
| 329 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 330 | { |
| 331 | Offset (0x84), |
| 332 | PSAT, 32, |
| 333 | } |
| 334 | |
| 335 | Method (_PS3) |
| 336 | { |
| 337 | Or (PSAT, 0x00000003, PSAT) |
| 338 | Or (PSAT, 0x00000000, PSAT) |
| 339 | } |
| 340 | |
| 341 | Method (_PS0) |
| 342 | { |
| 343 | And (PSAT, 0xfffffffc, PSAT) |
| 344 | Or (PSAT, 0x00000000, PSAT) |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | Device (I2C5) |
| 349 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 350 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 351 | Name (_UID, 5) |
| 352 | Name (_DDN, "I2C Controller #5") |
| 353 | |
| 354 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 355 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C5_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 356 | |
| 357 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 358 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C5_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 359 | |
| 360 | Name (RBUF, ResourceTemplate() |
| 361 | { |
| 362 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 363 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 364 | { |
| 365 | LPSS_I2C5_IRQ |
| 366 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 367 | FixedDMA (0x18, 0x0, Width32Bit, ) |
| 368 | FixedDMA (0x19, 0x1, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 369 | }) |
| 370 | |
| 371 | Method (_CRS) |
| 372 | { |
| 373 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 374 | Store (\S5B0, RBAS) |
| 375 | Return (^RBUF) |
| 376 | } |
| 377 | |
| 378 | Method (_STA) |
| 379 | { |
| 380 | If (LEqual (\S5EN, 1)) { |
| 381 | Return (0xF) |
| 382 | } Else { |
| 383 | Return (0x0) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | OperationRegion (KEYS, SystemMemory, S5B1, 0x100) |
| 388 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 389 | { |
| 390 | Offset (0x84), |
| 391 | PSAT, 32, |
| 392 | } |
| 393 | |
| 394 | Method (_PS3) |
| 395 | { |
| 396 | Or (PSAT, 0x00000003, PSAT) |
| 397 | Or (PSAT, 0x00000000, PSAT) |
| 398 | } |
| 399 | |
| 400 | Method (_PS0) |
| 401 | { |
| 402 | And (PSAT, 0xfffffffc, PSAT) |
| 403 | Or (PSAT, 0x00000000, PSAT) |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | Device (I2C6) |
| 408 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 409 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 410 | Name (_UID, 6) |
| 411 | Name (_DDN, "I2C Controller #6") |
| 412 | |
| 413 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 414 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C6_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 415 | |
| 416 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 417 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C6_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 418 | |
| 419 | Name (RBUF, ResourceTemplate() |
| 420 | { |
| 421 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 422 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 423 | { |
| 424 | LPSS_I2C6_IRQ |
| 425 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 426 | FixedDMA (0x1A, 0x2, Width32Bit, ) |
| 427 | FixedDMA (0x1B, 0x3, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 428 | }) |
| 429 | |
| 430 | Method (_CRS) |
| 431 | { |
| 432 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 433 | Store (\S6B0, RBAS) |
| 434 | Return (^RBUF) |
| 435 | } |
| 436 | |
| 437 | Method (_STA) |
| 438 | { |
| 439 | If (LEqual (\S6EN, 1)) { |
| 440 | Return (0xF) |
| 441 | } Else { |
| 442 | Return (0x0) |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | OperationRegion (KEYS, SystemMemory, S6B1, 0x100) |
| 447 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 448 | { |
| 449 | Offset (0x84), |
| 450 | PSAT, 32, |
| 451 | } |
| 452 | |
| 453 | Method (_PS3) |
| 454 | { |
| 455 | Or (PSAT, 0x00000003, PSAT) |
| 456 | Or (PSAT, 0x00000000, PSAT) |
| 457 | } |
| 458 | |
| 459 | Method (_PS0) |
| 460 | { |
| 461 | And (PSAT, 0xfffffffc, PSAT) |
| 462 | Or (PSAT, 0x00000000, PSAT) |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | Device (I2C7) |
| 467 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 468 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 469 | Name (_UID, 7) |
| 470 | Name (_DDN, "I2C Controller #7") |
| 471 | |
| 472 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 473 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C7_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 474 | |
| 475 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 476 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C7_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 477 | |
| 478 | Name (RBUF, ResourceTemplate() |
| 479 | { |
| 480 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 481 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 482 | { |
| 483 | LPSS_I2C7_IRQ |
| 484 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 485 | FixedDMA (0x1C, 0x4, Width32Bit, ) |
| 486 | FixedDMA (0x1D, 0x5, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 487 | }) |
| 488 | |
| 489 | Method (_CRS) |
| 490 | { |
| 491 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 492 | Store (\S7B0, RBAS) |
| 493 | Return (^RBUF) |
| 494 | } |
| 495 | |
| 496 | Method (_STA) |
| 497 | { |
| 498 | If (LEqual (\S7EN, 1)) { |
| 499 | Return (0xF) |
| 500 | } Else { |
| 501 | Return (0x0) |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | OperationRegion (KEYS, SystemMemory, S7B1, 0x100) |
| 506 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 507 | { |
| 508 | Offset (0x84), |
| 509 | PSAT, 32, |
| 510 | } |
| 511 | |
| 512 | Method (_PS3) |
| 513 | { |
| 514 | Or (PSAT, 0x00000003, PSAT) |
| 515 | Or (PSAT, 0x00000000, PSAT) |
| 516 | } |
| 517 | |
| 518 | Method (_PS0) |
| 519 | { |
| 520 | And (PSAT, 0xfffffffc, PSAT) |
| 521 | Or (PSAT, 0x00000000, PSAT) |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | Device (SPI1) |
| 526 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 527 | Name (_HID, "8086228E") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 528 | Name (_UID, 1) |
| 529 | Name (_DDN, "SPI Controller #2") |
| 530 | |
| 531 | Name (RBUF, ResourceTemplate() |
| 532 | { |
| 533 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 534 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 535 | { |
| 536 | LPSS_SPI_IRQ |
| 537 | } |
| 538 | FixedDMA (0x0, 0x0, Width32Bit, ) |
| 539 | FixedDMA (0x1, 0x1, Width32Bit, ) |
| 540 | }) |
| 541 | |
| 542 | Method (_CRS) |
| 543 | { |
| 544 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 545 | Store (\S9B0, RBAS) |
| 546 | Return (^RBUF) |
| 547 | } |
| 548 | |
| 549 | Method (_STA) |
| 550 | { |
| 551 | If (LEqual (\S9EN, 1)) { |
| 552 | Return (0xF) |
| 553 | } Else { |
| 554 | Return (0x0) |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | OperationRegion (KEYS, SystemMemory, S9B1, 0x100) |
| 559 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 560 | { |
| 561 | Offset (0x84), |
| 562 | PSAT, 32, |
| 563 | } |
| 564 | |
| 565 | Method (_PS3) |
| 566 | { |
| 567 | Or (PSAT, 0x00000003, PSAT) |
| 568 | Or (PSAT, 0x00000000, PSAT) |
| 569 | } |
| 570 | |
| 571 | Method (_PS0) |
| 572 | { |
| 573 | And (PSAT, 0xfffffffc, PSAT) |
| 574 | Or (PSAT, 0x00000000, PSAT) |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | Device (PWM1) |
| 579 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 580 | Name (_HID, "80862288") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 581 | Name (_UID, 1) |
| 582 | Name (_DDN, "PWM Controller #1") |
| 583 | |
| 584 | Name (RBUF, ResourceTemplate() |
| 585 | { |
| 586 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 587 | }) |
| 588 | |
| 589 | Method (_CRS) |
| 590 | { |
| 591 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 592 | Store (\SAB0, RBAS) |
| 593 | Return (^RBUF) |
| 594 | } |
| 595 | |
| 596 | Method (_STA) |
| 597 | { |
| 598 | If (LEqual (\SAEN, 1)) { |
| 599 | Return (0xF) |
| 600 | } Else { |
| 601 | Return (0x0) |
| 602 | } |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | Device (PWM2) |
| 607 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 608 | Name (_HID, "80862288") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 609 | Name (_UID, 2) |
| 610 | Name (_DDN, "PWM Controller #2") |
| 611 | |
| 612 | Name (RBUF, ResourceTemplate() |
| 613 | { |
| 614 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 615 | }) |
| 616 | |
| 617 | Method (_CRS) |
| 618 | { |
| 619 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 620 | Store (\SBB0, RBAS) |
| 621 | Return (^RBUF) |
| 622 | } |
| 623 | |
| 624 | Method (_STA) |
| 625 | { |
| 626 | If (LEqual (\SBEN, 1)) { |
| 627 | Return (0xF) |
| 628 | } Else { |
| 629 | Return (0x0) |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | Device (UAR1) |
| 635 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 636 | Name (_HID, "8086228A") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 637 | Name (_UID, 1) |
| 638 | Name (_DDN, "HS-UART Controller #1") |
| 639 | |
| 640 | Name (RBUF, ResourceTemplate() |
| 641 | { |
| 642 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 643 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 644 | { |
| 645 | LPSS_HSUART1_IRQ |
| 646 | } |
| 647 | FixedDMA (0x2, 0x2, Width32Bit, ) |
| 648 | FixedDMA (0x3, 0x3, Width32Bit, ) |
| 649 | }) |
| 650 | |
| 651 | Method (_CRS) |
| 652 | { |
| 653 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 654 | Store (\SCB0, RBAS) |
| 655 | Return (^RBUF) |
| 656 | } |
| 657 | |
| 658 | Method (_STA) |
| 659 | { |
| 660 | If (LEqual (\SCEN, 1)) { |
| 661 | Return (0xF) |
| 662 | } Else { |
| 663 | Return (0x0) |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | OperationRegion (KEYS, SystemMemory, SCB1, 0x100) |
| 668 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 669 | { |
| 670 | Offset (0x84), |
| 671 | PSAT, 32, |
| 672 | } |
| 673 | |
| 674 | Method (_PS3) |
| 675 | { |
| 676 | Or (PSAT, 0x00000003, PSAT) |
| 677 | Or (PSAT, 0x00000000, PSAT) |
| 678 | } |
| 679 | |
| 680 | Method (_PS0) |
| 681 | { |
| 682 | And (PSAT, 0xfffffffc, PSAT) |
| 683 | Or (PSAT, 0x00000000, PSAT) |
| 684 | } |
| 685 | } |
| 686 | |
| 687 | Device (UAR2) |
| 688 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 689 | Name (_HID, "8086228A") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 690 | Name (_UID, 2) |
| 691 | Name (_DDN, "HS-UART Controller #2") |
| 692 | |
| 693 | Name (RBUF, ResourceTemplate() |
| 694 | { |
| 695 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 696 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 697 | { |
| 698 | LPSS_HSUART2_IRQ |
| 699 | } |
| 700 | FixedDMA (0x4, 0x4, Width32Bit, ) |
| 701 | FixedDMA (0x5, 0x5, Width32Bit, ) |
| 702 | }) |
| 703 | |
| 704 | Method (_CRS) |
| 705 | { |
| 706 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 707 | Store (\SDB0, RBAS) |
| 708 | Return (^RBUF) |
| 709 | } |
| 710 | |
| 711 | Method (_STA) |
| 712 | { |
| 713 | If (LEqual (\SDEN, 1)) { |
| 714 | Return (0xF) |
| 715 | } Else { |
| 716 | Return (0x0) |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | OperationRegion (KEYS, SystemMemory, SDB1, 0x100) |
| 721 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 722 | { |
| 723 | Offset (0x84), |
| 724 | PSAT, 32, |
| 725 | } |
| 726 | |
| 727 | Method (_PS3) |
| 728 | { |
| 729 | Or (PSAT, 0x00000003, PSAT) |
| 730 | Or (PSAT, 0x00000000, PSAT) |
| 731 | } |
| 732 | |
| 733 | Method (_PS0) |
| 734 | { |
| 735 | And (PSAT, 0xfffffffc, PSAT) |
| 736 | Or (PSAT, 0x00000000, PSAT) |
| 737 | } |
| 738 | } |