Duncan Laurie | f5d688a | 2018-10-15 15:22:21 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2018 Google LLC |
| 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. |
| 15 | */ |
| 16 | |
| 17 | /* Scope is \_SB.PCI0.LPCB */ |
| 18 | |
| 19 | Device (SIO) |
| 20 | { |
| 21 | Name (_UID, 0) |
| 22 | Name (_ADR, 0) |
| 23 | |
| 24 | Device (COM1) |
| 25 | { |
| 26 | Name (_HID, EisaId ("PNP0501")) |
| 27 | Name (_UID, 1) |
| 28 | Name (_ADR, 0) |
| 29 | |
| 30 | Method (_STA, 0, NotSerialized) |
| 31 | { |
Duncan Laurie | f6ce603 | 2018-11-17 12:15:31 -0700 | [diff] [blame] | 32 | #if IS_ENABLED(CONFIG_DRIVERS_UART_8250IO) |
Duncan Laurie | f5d688a | 2018-10-15 15:22:21 -0700 | [diff] [blame] | 33 | Return (0x0f) |
| 34 | #else |
| 35 | Return (Zero) |
| 36 | #endif |
| 37 | } |
| 38 | |
| 39 | Name (_CRS, ResourceTemplate () |
| 40 | { |
| 41 | IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08) |
| 42 | IRQNoFlags () {4} |
| 43 | }) |
| 44 | |
| 45 | Name (_PRS, ResourceTemplate () |
| 46 | { |
| 47 | StartDependentFn (0, 0) { |
| 48 | IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08) |
| 49 | IRQNoFlags () {4} |
| 50 | } |
| 51 | EndDependentFn () |
| 52 | }) |
| 53 | } |
| 54 | |
| 55 | Device (PS2K) |
| 56 | { |
| 57 | Name (_HID, EisaId ("PNP0303")) |
| 58 | Name (_CID, EisaId ("PNP030B")) |
| 59 | Name (_UID, 0) |
| 60 | Name (_ADR, 0) |
| 61 | |
| 62 | Method (_STA, 0, NotSerialized) |
| 63 | { |
| 64 | #ifdef SIO_EC_ENABLE_PS2K |
| 65 | Return (0x0f) |
| 66 | #else |
| 67 | Return (Zero) |
| 68 | #endif |
| 69 | } |
| 70 | |
| 71 | Name (_CRS, ResourceTemplate() |
| 72 | { |
| 73 | IO (Decode16, 0x60, 0x60, 0x01, 0x01) |
| 74 | IO (Decode16, 0x64, 0x64, 0x01, 0x01) |
| 75 | IRQ (Edge, ActiveHigh, Exclusive) {1} |
| 76 | }) |
| 77 | |
| 78 | Name (_PRS, ResourceTemplate() |
| 79 | { |
| 80 | StartDependentFn (0, 0) { |
| 81 | IO (Decode16, 0x60, 0x60, 0x01, 0x01) |
| 82 | IO (Decode16, 0x64, 0x64, 0x01, 0x01) |
| 83 | IRQ (Edge, ActiveHigh, Exclusive) {1} |
| 84 | } |
| 85 | EndDependentFn () |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | Device (PS2M) |
| 90 | { |
| 91 | Name (_HID, EisaId ("PNP0F13")) |
| 92 | Name (_UID, 0) |
| 93 | Name (_ADR, 0) |
| 94 | |
| 95 | Method (_STA, 0, NotSerialized) |
| 96 | { |
| 97 | #ifdef SIO_EC_ENABLE_PS2M |
| 98 | Return (0x0f) |
| 99 | #else |
| 100 | Return (Zero) |
| 101 | #endif |
| 102 | } |
| 103 | |
| 104 | Name (_CRS, ResourceTemplate() |
| 105 | { |
| 106 | IRQ (Edge, ActiveHigh, Exclusive) {12} |
| 107 | }) |
| 108 | |
| 109 | Name (_PRS, ResourceTemplate() |
| 110 | { |
| 111 | StartDependentFn (0, 0) { |
| 112 | IRQ (Edge, ActiveHigh, Exclusive) {12} |
| 113 | } |
| 114 | EndDependentFn () |
| 115 | }) |
| 116 | } |
| 117 | } |