1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> 4 */ 5 6/* Intel LPC Bus Device - 0:1f.0 */ 7 8Device (LPCB) 9{ 10 Name(_ADR, 0x001f0000) 11 12 OperationRegion(PRTX, PCI_Config, 0x60, 8) 13 Field(PRTX, AnyAcc, NoLock, Preserve) { 14 PRTA, 8, 15 PRTB, 8, 16 PRTC, 8, 17 PRTD, 8, 18 PRTE, 8, 19 PRTF, 8, 20 PRTG, 8, 21 PRTH, 8, 22 } 23 24 #include <asm/acpi/irqlinks.asl> 25 26 /* Firmware Hub */ 27 Device (FWH) 28 { 29 Name(_HID, EISAID("INT0800")) 30 Name(_CRS, ResourceTemplate() 31 { 32 Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) 33 }) 34 } 35 36 /* 8259 Interrupt Controller */ 37 Device (PIC) 38 { 39 Name(_HID, EISAID("PNP0000")) 40 Name(_CRS, ResourceTemplate() 41 { 42 IO(Decode16, 0x20, 0x20, 0x01, 0x02) 43 IO(Decode16, 0x24, 0x24, 0x01, 0x02) 44 IO(Decode16, 0x28, 0x28, 0x01, 0x02) 45 IO(Decode16, 0x2c, 0x2c, 0x01, 0x02) 46 IO(Decode16, 0x30, 0x30, 0x01, 0x02) 47 IO(Decode16, 0x34, 0x34, 0x01, 0x02) 48 IO(Decode16, 0x38, 0x38, 0x01, 0x02) 49 IO(Decode16, 0x3c, 0x3c, 0x01, 0x02) 50 IO(Decode16, 0xa0, 0xa0, 0x01, 0x02) 51 IO(Decode16, 0xa4, 0xa4, 0x01, 0x02) 52 IO(Decode16, 0xa8, 0xa8, 0x01, 0x02) 53 IO(Decode16, 0xac, 0xac, 0x01, 0x02) 54 IO(Decode16, 0xb0, 0xb0, 0x01, 0x02) 55 IO(Decode16, 0xb4, 0xb4, 0x01, 0x02) 56 IO(Decode16, 0xb8, 0xb8, 0x01, 0x02) 57 IO(Decode16, 0xbc, 0xbc, 0x01, 0x02) 58 IO(Decode16, 0x4d0, 0x4d0, 0x01, 0x02) 59 IRQNoFlags () { 2 } 60 }) 61 } 62 63 /* 8254 timer */ 64 Device (TIMR) 65 { 66 Name(_HID, EISAID("PNP0100")) 67 Name(_CRS, ResourceTemplate() 68 { 69 IO(Decode16, 0x40, 0x40, 0x01, 0x04) 70 IO(Decode16, 0x50, 0x50, 0x10, 0x04) 71 IRQNoFlags() { 0 } 72 }) 73 } 74 75 /* HPET */ 76 Device (HPET) 77 { 78 Name(_HID, EISAID("PNP0103")) 79 Name(_CID, 0x010CD041) 80 Name(_CRS, ResourceTemplate() 81 { 82 Memory32Fixed(ReadOnly, HPET_BASE_ADDRESS, HPET_BASE_SIZE) 83 }) 84 85 Method(_STA) 86 { 87 Return (STA_VISIBLE) 88 } 89 } 90 91 /* Real Time Clock */ 92 Device (RTC) 93 { 94 Name(_HID, EISAID("PNP0B00")) 95 Name(_CRS, ResourceTemplate() 96 { 97 IO(Decode16, 0x70, 0x70, 1, 8) 98 IRQNoFlags() { 8 } 99 }) 100 } 101 102 /* LPC device: Resource consumption */ 103 Device (LDRC) 104 { 105 Name(_HID, EISAID("PNP0C02")) 106 Name(_UID, 2) 107 108 Name(RBUF, ResourceTemplate() 109 { 110 IO(Decode16, 0x61, 0x61, 0x1, 0x01) /* NMI Status */ 111 IO(Decode16, 0x63, 0x63, 0x1, 0x01) /* CPU Reserved */ 112 IO(Decode16, 0x65, 0x65, 0x1, 0x01) /* CPU Reserved */ 113 IO(Decode16, 0x67, 0x67, 0x1, 0x01) /* CPU Reserved */ 114 IO(Decode16, 0x80, 0x80, 0x1, 0x01) /* Port 80 Post */ 115 IO(Decode16, 0x92, 0x92, 0x1, 0x01) /* CPU Reserved */ 116 IO(Decode16, 0xb2, 0xb2, 0x1, 0x02) /* SWSMI */ 117 }) 118 119 Method(_CRS, 0, NotSerialized) 120 { 121 Return (RBUF) 122 } 123 } 124} 125