Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 2 | |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 3 | /* The below definitions are used for customization |
| 4 | * Some boards/devices may need different data hold time |
| 5 | */ |
| 6 | #ifndef BOARD_I2C1_DATA_HOLD_TIME |
| 7 | #define BOARD_I2C1_DATA_HOLD_TIME 6 |
| 8 | #endif |
| 9 | |
| 10 | #ifndef BOARD_I2C2_DATA_HOLD_TIME |
| 11 | #define BOARD_I2C2_DATA_HOLD_TIME 6 |
| 12 | #endif |
| 13 | |
| 14 | #ifndef BOARD_I2C3_DATA_HOLD_TIME |
| 15 | #define BOARD_I2C3_DATA_HOLD_TIME 6 |
| 16 | #endif |
| 17 | |
| 18 | #ifndef BOARD_I2C4_DATA_HOLD_TIME |
| 19 | #define BOARD_I2C4_DATA_HOLD_TIME 6 |
| 20 | #endif |
| 21 | |
| 22 | #ifndef BOARD_I2C5_DATA_HOLD_TIME |
| 23 | #define BOARD_I2C5_DATA_HOLD_TIME 6 |
| 24 | #endif |
| 25 | |
| 26 | #ifndef BOARD_I2C6_DATA_HOLD_TIME |
| 27 | #define BOARD_I2C6_DATA_HOLD_TIME 6 |
| 28 | #endif |
| 29 | |
| 30 | #ifndef BOARD_I2C7_DATA_HOLD_TIME |
| 31 | #define BOARD_I2C7_DATA_HOLD_TIME 6 |
| 32 | #endif |
| 33 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 34 | Device (SDM1) |
| 35 | { |
| 36 | Name (_HID, "INTL9C60") |
| 37 | Name (_UID, 1) |
| 38 | Name (_DDN, "DMA Controller #1") |
| 39 | |
| 40 | Name (RBUF, ResourceTemplate() |
| 41 | { |
| 42 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 43 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 44 | { |
| 45 | LPSS_DMA1_IRQ |
| 46 | } |
| 47 | }) |
| 48 | |
| 49 | Method (_CRS) |
| 50 | { |
| 51 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 52 | RBAS = \S0B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 53 | Return (^RBUF) |
| 54 | } |
| 55 | |
| 56 | Method (_STA) |
| 57 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 58 | If (\S0EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 59 | Return (0xF) |
| 60 | } Else { |
| 61 | Return (0x0) |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | Device (SDM2) |
| 67 | { |
| 68 | Name (_HID, "INTL9C60") |
| 69 | Name (_UID, 2) |
| 70 | Name (_DDN, "DMA Controller #2") |
| 71 | |
| 72 | Name (RBUF, ResourceTemplate() |
| 73 | { |
| 74 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 75 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 76 | { |
| 77 | LPSS_DMA2_IRQ |
| 78 | } |
| 79 | }) |
| 80 | |
| 81 | Method (_CRS) |
| 82 | { |
| 83 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 84 | RBAS = \S8B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 85 | Return (^RBUF) |
| 86 | } |
| 87 | |
| 88 | Method (_STA) |
| 89 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 90 | If (\S8EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 91 | Return (0xF) |
| 92 | } Else { |
| 93 | Return (0x0) |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | Device (I2C1) |
| 99 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 100 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 101 | Name (_UID, 1) |
| 102 | Name (_DDN, "I2C Controller #1") |
| 103 | |
| 104 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 105 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C1_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 106 | |
| 107 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 108 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C1_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 109 | |
| 110 | Name (RBUF, ResourceTemplate() |
| 111 | { |
| 112 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 113 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 114 | { |
| 115 | LPSS_I2C1_IRQ |
| 116 | } |
| 117 | FixedDMA (0x10, 0x0, Width32Bit, ) |
| 118 | FixedDMA (0x11, 0x1, Width32Bit, ) |
| 119 | }) |
| 120 | |
| 121 | Method (_CRS) |
| 122 | { |
| 123 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 124 | RBAS = \S1B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 125 | Return (^RBUF) |
| 126 | } |
| 127 | |
| 128 | Method (_STA) |
| 129 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 130 | If (\S1EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 131 | Return (0xF) |
| 132 | } Else { |
| 133 | Return (0x0) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | OperationRegion (KEYS, SystemMemory, S1B1, 0x100) |
| 138 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 139 | { |
| 140 | Offset (0x84), |
| 141 | PSAT, 32, |
| 142 | } |
| 143 | |
| 144 | Method (_PS3) |
| 145 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 146 | PSAT |= 3 |
| 147 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 148 | } |
| 149 | |
| 150 | Method (_PS0) |
| 151 | { |
| 152 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 153 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 154 | } |
| 155 | } |
| 156 | |
| 157 | Device (I2C2) |
| 158 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 159 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 160 | Name (_UID, 2) |
| 161 | Name (_DDN, "I2C Controller #2") |
| 162 | |
| 163 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 164 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C2_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 165 | |
| 166 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 167 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C2_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 168 | |
| 169 | Name (RBUF, ResourceTemplate() |
| 170 | { |
| 171 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 172 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 173 | { |
| 174 | LPSS_I2C2_IRQ |
| 175 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 176 | FixedDMA (0x12, 0x2, Width32Bit, ) |
| 177 | FixedDMA (0x13, 0x3, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 178 | }) |
| 179 | |
| 180 | Method (_CRS) |
| 181 | { |
| 182 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 183 | RBAS = \S2B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 184 | Return (^RBUF) |
| 185 | } |
| 186 | |
| 187 | Method (_STA) |
| 188 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 189 | If (\S2EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 190 | Return (0xF) |
| 191 | } Else { |
| 192 | Return (0x0) |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | OperationRegion (KEYS, SystemMemory, S2B1, 0x100) |
| 197 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 198 | { |
| 199 | Offset (0x84), |
| 200 | PSAT, 32, |
| 201 | } |
| 202 | |
| 203 | Method (_PS3) |
| 204 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 205 | PSAT |= 3 |
| 206 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | Method (_PS0) |
| 210 | { |
| 211 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 212 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 213 | } |
| 214 | } |
| 215 | |
| 216 | Device (I2C3) |
| 217 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 218 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 219 | Name (_UID, 3) |
| 220 | Name (_DDN, "I2C Controller #3") |
| 221 | |
| 222 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 223 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C3_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 224 | |
| 225 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 226 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C3_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 227 | |
| 228 | Name (RBUF, ResourceTemplate() |
| 229 | { |
| 230 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 231 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 232 | { |
| 233 | LPSS_I2C3_IRQ |
| 234 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 235 | FixedDMA (0x14, 0x4, Width32Bit, ) |
| 236 | FixedDMA (0x15, 0x5, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 237 | }) |
| 238 | |
| 239 | Method (_CRS) |
| 240 | { |
| 241 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 242 | RBAS = \S3B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 243 | Return (^RBUF) |
| 244 | } |
| 245 | |
| 246 | Method (_STA) |
| 247 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 248 | If (\S3EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 249 | Return (0xF) |
| 250 | } Else { |
| 251 | Return (0x0) |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | OperationRegion (KEYS, SystemMemory, S3B1, 0x100) |
| 256 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 257 | { |
| 258 | Offset (0x84), |
| 259 | PSAT, 32, |
| 260 | } |
| 261 | |
| 262 | Method (_PS3) |
| 263 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 264 | PSAT |= 3 |
| 265 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | Method (_PS0) |
| 269 | { |
| 270 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 271 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 272 | } |
| 273 | } |
| 274 | |
| 275 | Device (I2C4) |
| 276 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 277 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 278 | Name (_UID, 4) |
| 279 | Name (_DDN, "I2C Controller #4") |
| 280 | |
| 281 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 282 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C4_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 283 | |
| 284 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 285 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C4_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 286 | |
| 287 | Name (RBUF, ResourceTemplate() |
| 288 | { |
| 289 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 290 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 291 | { |
| 292 | LPSS_I2C4_IRQ |
| 293 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 294 | FixedDMA (0x16, 0x6, Width32Bit, ) |
| 295 | FixedDMA (0x17, 0x7, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 296 | }) |
| 297 | |
| 298 | Method (_CRS) |
| 299 | { |
| 300 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 301 | RBAS = \S4B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 302 | Return (^RBUF) |
| 303 | } |
| 304 | |
| 305 | Method (_STA) |
| 306 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 307 | If (\S4EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 308 | Return (0xF) |
| 309 | } Else { |
| 310 | Return (0x0) |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | OperationRegion (KEYS, SystemMemory, S4B1, 0x100) |
| 315 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 316 | { |
| 317 | Offset (0x84), |
| 318 | PSAT, 32, |
| 319 | } |
| 320 | |
| 321 | Method (_PS3) |
| 322 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 323 | PSAT |= 3 |
| 324 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | Method (_PS0) |
| 328 | { |
| 329 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 330 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 331 | } |
| 332 | } |
| 333 | |
| 334 | Device (I2C5) |
| 335 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 336 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 337 | Name (_UID, 5) |
| 338 | Name (_DDN, "I2C Controller #5") |
| 339 | |
| 340 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 341 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C5_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 342 | |
| 343 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 344 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C5_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 345 | |
| 346 | Name (RBUF, ResourceTemplate() |
| 347 | { |
| 348 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 349 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 350 | { |
| 351 | LPSS_I2C5_IRQ |
| 352 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 353 | FixedDMA (0x18, 0x0, Width32Bit, ) |
| 354 | FixedDMA (0x19, 0x1, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 355 | }) |
| 356 | |
| 357 | Method (_CRS) |
| 358 | { |
| 359 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 360 | RBAS = \S5B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 361 | Return (^RBUF) |
| 362 | } |
| 363 | |
| 364 | Method (_STA) |
| 365 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 366 | If (\S5EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 367 | Return (0xF) |
| 368 | } Else { |
| 369 | Return (0x0) |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | OperationRegion (KEYS, SystemMemory, S5B1, 0x100) |
| 374 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 375 | { |
| 376 | Offset (0x84), |
| 377 | PSAT, 32, |
| 378 | } |
| 379 | |
| 380 | Method (_PS3) |
| 381 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 382 | PSAT |= 3 |
| 383 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 384 | } |
| 385 | |
| 386 | Method (_PS0) |
| 387 | { |
| 388 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 389 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 390 | } |
| 391 | } |
| 392 | |
| 393 | Device (I2C6) |
| 394 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 395 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 396 | Name (_UID, 6) |
| 397 | Name (_DDN, "I2C Controller #6") |
| 398 | |
| 399 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 400 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C6_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 401 | |
| 402 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 403 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C6_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 404 | |
| 405 | Name (RBUF, ResourceTemplate() |
| 406 | { |
| 407 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 408 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 409 | { |
| 410 | LPSS_I2C6_IRQ |
| 411 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 412 | FixedDMA (0x1A, 0x2, Width32Bit, ) |
| 413 | FixedDMA (0x1B, 0x3, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 414 | }) |
| 415 | |
| 416 | Method (_CRS) |
| 417 | { |
| 418 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 419 | RBAS = \S6B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 420 | Return (^RBUF) |
| 421 | } |
| 422 | |
| 423 | Method (_STA) |
| 424 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 425 | If (\S6EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 426 | Return (0xF) |
| 427 | } Else { |
| 428 | Return (0x0) |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | OperationRegion (KEYS, SystemMemory, S6B1, 0x100) |
| 433 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 434 | { |
| 435 | Offset (0x84), |
| 436 | PSAT, 32, |
| 437 | } |
| 438 | |
| 439 | Method (_PS3) |
| 440 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 441 | PSAT |= 3 |
| 442 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | Method (_PS0) |
| 446 | { |
| 447 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 448 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 449 | } |
| 450 | } |
| 451 | |
| 452 | Device (I2C7) |
| 453 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 454 | Name (_HID, "808622C1") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 455 | Name (_UID, 7) |
| 456 | Name (_DDN, "I2C Controller #7") |
| 457 | |
| 458 | /* Standard Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 459 | Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C7_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 460 | |
| 461 | /* Fast Mode: HCNT, LCNT, SDA Hold Time */ |
Kane Chen | 54093e4 | 2015-10-26 13:02:33 +0800 | [diff] [blame] | 462 | Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C7_DATA_HOLD_TIME }) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 463 | |
| 464 | Name (RBUF, ResourceTemplate() |
| 465 | { |
| 466 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 467 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 468 | { |
| 469 | LPSS_I2C7_IRQ |
| 470 | } |
Matt DeVillier | f6cfa71 | 2017-06-02 14:33:22 -0500 | [diff] [blame] | 471 | FixedDMA (0x1C, 0x4, Width32Bit, ) |
| 472 | FixedDMA (0x1D, 0x5, Width32Bit, ) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 473 | }) |
| 474 | |
| 475 | Method (_CRS) |
| 476 | { |
| 477 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 478 | RBAS = \S7B0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 479 | Return (^RBUF) |
| 480 | } |
| 481 | |
| 482 | Method (_STA) |
| 483 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 484 | If (\S7EN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 485 | Return (0xF) |
| 486 | } Else { |
| 487 | Return (0x0) |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | OperationRegion (KEYS, SystemMemory, S7B1, 0x100) |
| 492 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 493 | { |
| 494 | Offset (0x84), |
| 495 | PSAT, 32, |
| 496 | } |
| 497 | |
| 498 | Method (_PS3) |
| 499 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 500 | PSAT |= 3 |
| 501 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 502 | } |
| 503 | |
| 504 | Method (_PS0) |
| 505 | { |
| 506 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 507 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 508 | } |
| 509 | } |
| 510 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 511 | Device (UAR1) |
| 512 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 513 | Name (_HID, "8086228A") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 514 | Name (_UID, 1) |
| 515 | Name (_DDN, "HS-UART Controller #1") |
| 516 | |
| 517 | Name (RBUF, ResourceTemplate() |
| 518 | { |
| 519 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 520 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 521 | { |
| 522 | LPSS_HSUART1_IRQ |
| 523 | } |
| 524 | FixedDMA (0x2, 0x2, Width32Bit, ) |
| 525 | FixedDMA (0x3, 0x3, Width32Bit, ) |
| 526 | }) |
| 527 | |
| 528 | Method (_CRS) |
| 529 | { |
| 530 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 531 | RBAS = \SCB0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 532 | Return (^RBUF) |
| 533 | } |
| 534 | |
| 535 | Method (_STA) |
| 536 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 537 | If (\SCEN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 538 | Return (0xF) |
| 539 | } Else { |
| 540 | Return (0x0) |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | OperationRegion (KEYS, SystemMemory, SCB1, 0x100) |
| 545 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 546 | { |
| 547 | Offset (0x84), |
| 548 | PSAT, 32, |
| 549 | } |
| 550 | |
| 551 | Method (_PS3) |
| 552 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 553 | PSAT |= 3 |
| 554 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 555 | } |
| 556 | |
| 557 | Method (_PS0) |
| 558 | { |
| 559 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 560 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 561 | } |
| 562 | } |
| 563 | |
| 564 | Device (UAR2) |
| 565 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 566 | Name (_HID, "8086228A") |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 567 | Name (_UID, 2) |
| 568 | Name (_DDN, "HS-UART Controller #2") |
| 569 | |
| 570 | Name (RBUF, ResourceTemplate() |
| 571 | { |
| 572 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 573 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 574 | { |
| 575 | LPSS_HSUART2_IRQ |
| 576 | } |
| 577 | FixedDMA (0x4, 0x4, Width32Bit, ) |
| 578 | FixedDMA (0x5, 0x5, Width32Bit, ) |
| 579 | }) |
| 580 | |
| 581 | Method (_CRS) |
| 582 | { |
| 583 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 584 | RBAS = \SDB0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 585 | Return (^RBUF) |
| 586 | } |
| 587 | |
| 588 | Method (_STA) |
| 589 | { |
Felix Singer | edec4d9 | 2022-12-11 21:25:32 +0100 | [diff] [blame] | 590 | If (\SDEN == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 591 | Return (0xF) |
| 592 | } Else { |
| 593 | Return (0x0) |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | OperationRegion (KEYS, SystemMemory, SDB1, 0x100) |
| 598 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 599 | { |
| 600 | Offset (0x84), |
| 601 | PSAT, 32, |
| 602 | } |
| 603 | |
| 604 | Method (_PS3) |
| 605 | { |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 606 | PSAT |= 3 |
| 607 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 608 | } |
| 609 | |
| 610 | Method (_PS0) |
| 611 | { |
| 612 | And (PSAT, 0xfffffffc, PSAT) |
Felix Singer | 86bc2e7 | 2022-12-16 04:40:39 +0100 | [diff] [blame^] | 613 | PSAT |= 0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 614 | } |
| 615 | } |