Angel Pons | c3f58f6 | 2020-04-05 15:46:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 2 | |
Felix Held | 972d9f2 | 2022-02-23 16:32:20 +0100 | [diff] [blame^] | 3 | #include <arch/hpet.h> |
| 4 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 5 | /* Intel LPC Bus Device - 0:1f.0 */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 6 | |
| 7 | Device (LPCB) |
| 8 | { |
| 9 | Name(_ADR, 0x001f0000) |
| 10 | |
| 11 | #include "irqlinks.asl" |
| 12 | |
| 13 | #include "acpi/ec.asl" |
| 14 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 15 | Device (DMAC) /* DMA Controller */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 16 | { |
| 17 | Name(_HID, EISAID("PNP0200")) |
| 18 | Name(_CRS, ResourceTemplate() |
| 19 | { |
| 20 | IO (Decode16, 0x00, 0x00, 0x01, 0x20) |
| 21 | IO (Decode16, 0x81, 0x81, 0x01, 0x11) |
| 22 | IO (Decode16, 0x93, 0x93, 0x01, 0x0d) |
| 23 | IO (Decode16, 0xc0, 0xc0, 0x01, 0x20) |
| 24 | DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 } |
| 25 | }) |
| 26 | } |
| 27 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 28 | Device (FWH) /* Firmware Hub */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 29 | { |
| 30 | Name (_HID, EISAID("INT0800")) |
| 31 | Name (_CRS, ResourceTemplate() |
| 32 | { |
| 33 | Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | Device (HPET) |
| 38 | { |
| 39 | Name (_HID, EISAID("PNP0103")) |
| 40 | Name (_CID, 0x010CD041) |
| 41 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 42 | Method (_STA, 0) /* Device Status */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 43 | { |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 44 | Return (0xf) /* Enable and show device */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | Name(_CRS, ResourceTemplate() |
| 48 | { |
Felix Held | 972d9f2 | 2022-02-23 16:32:20 +0100 | [diff] [blame^] | 49 | Memory32Fixed(ReadOnly, HPET_BASE_ADDRESS, 0x400) |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 50 | }) |
| 51 | } |
| 52 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 53 | Device(PIC) /* 8259 Interrupt Controller */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 54 | { |
| 55 | Name(_HID,EISAID("PNP0000")) |
| 56 | Name(_CRS, ResourceTemplate() |
| 57 | { |
| 58 | IO (Decode16, 0x20, 0x20, 0x01, 0x02) |
| 59 | IO (Decode16, 0x24, 0x24, 0x01, 0x02) |
| 60 | IO (Decode16, 0x28, 0x28, 0x01, 0x02) |
| 61 | IO (Decode16, 0x2c, 0x2c, 0x01, 0x02) |
| 62 | IO (Decode16, 0x30, 0x30, 0x01, 0x02) |
| 63 | IO (Decode16, 0x34, 0x34, 0x01, 0x02) |
| 64 | IO (Decode16, 0x38, 0x38, 0x01, 0x02) |
| 65 | IO (Decode16, 0x3c, 0x3c, 0x01, 0x02) |
| 66 | IO (Decode16, 0xa0, 0xa0, 0x01, 0x02) |
| 67 | IO (Decode16, 0xa4, 0xa4, 0x01, 0x02) |
| 68 | IO (Decode16, 0xa8, 0xa8, 0x01, 0x02) |
| 69 | IO (Decode16, 0xac, 0xac, 0x01, 0x02) |
| 70 | IO (Decode16, 0xb0, 0xb0, 0x01, 0x02) |
| 71 | IO (Decode16, 0xb4, 0xb4, 0x01, 0x02) |
| 72 | IO (Decode16, 0xb8, 0xb8, 0x01, 0x02) |
| 73 | IO (Decode16, 0xbc, 0xbc, 0x01, 0x02) |
| 74 | IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02) |
| 75 | IRQNoFlags () { 2 } |
| 76 | }) |
| 77 | } |
| 78 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 79 | Device(LDRC) /* LPC device: Resource consumption */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 80 | { |
| 81 | Name (_HID, EISAID("PNP0C02")) |
| 82 | Name (_UID, 2) |
| 83 | |
| 84 | Name (RBUF, ResourceTemplate() |
| 85 | { |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 86 | IO (Decode16, 0x61, 0x61, 0x1, 0x01) /* NMI Status */ |
| 87 | IO (Decode16, 0x63, 0x63, 0x1, 0x01) /* CPU Reserved */ |
| 88 | IO (Decode16, 0x65, 0x65, 0x1, 0x01) /* CPU Reserved */ |
| 89 | IO (Decode16, 0x67, 0x67, 0x1, 0x01) /* CPU Reserved */ |
| 90 | IO (Decode16, 0x80, 0x80, 0x1, 0x01) /* Port 80 Post */ |
| 91 | IO (Decode16, 0x92, 0x92, 0x1, 0x01) /* CPU Reserved */ |
| 92 | IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) /* SWSMI */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 93 | }) |
| 94 | |
| 95 | Method (_CRS, 0, NotSerialized) |
| 96 | { |
| 97 | Return (RBUF) |
| 98 | } |
| 99 | } |
| 100 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 101 | Device (RTC) /* Real Time Clock */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 102 | { |
| 103 | Name (_HID, EISAID("PNP0B00")) |
| 104 | Name (_CRS, ResourceTemplate() |
| 105 | { |
| 106 | IO (Decode16, 0x70, 0x70, 1, 8) |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 107 | }) |
| 108 | } |
| 109 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 110 | Device (TIMR) /* Intel 8254 timer */ |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 111 | { |
| 112 | Name(_HID, EISAID("PNP0100")) |
| 113 | Name(_CRS, ResourceTemplate() |
| 114 | { |
| 115 | IO (Decode16, 0x40, 0x40, 0x01, 0x04) |
| 116 | IO (Decode16, 0x50, 0x50, 0x10, 0x04) |
| 117 | IRQNoFlags() {0} |
| 118 | }) |
| 119 | } |
| 120 | |
Angel Pons | 26b49cc | 2020-07-07 17:17:51 +0200 | [diff] [blame] | 121 | /* Include mainboard's superio.asl file. */ |
Aaron Durbin | ab7ed054 | 2013-11-07 14:33:21 -0600 | [diff] [blame] | 122 | #include "acpi/superio.asl" |
Aaron Durbin | 3bde3d7 | 2013-11-04 21:45:52 -0600 | [diff] [blame] | 123 | } |