Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 Kyösti Mälkki <kyosti.malkki@gmail.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | Device (USB0) |
| 17 | { |
| 18 | Name (_ADR, 0x001D0000) |
| 19 | Name (_PRW, Package () { 0x03, 0x05 }) |
| 20 | |
| 21 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 22 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 23 | { |
| 24 | Offset (0xC4), URES, 8 |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | Device (USB1) |
| 29 | { |
| 30 | Name (_ADR, 0x001D0001) |
| 31 | Name (_PRW, Package () { 0x04, 0x05 }) |
| 32 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 33 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 34 | { |
| 35 | Offset (0xC4), URES, 8 |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | Device (USB2) |
| 40 | { |
| 41 | Name (_ADR, 0x001D0002) |
| 42 | Name (_PRW, Package () { 0x0C, 0x05 }) |
| 43 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 44 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 45 | { |
| 46 | Offset (0xC4), URES, 8 |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | Device (USB3) |
| 51 | { |
| 52 | Name (_ADR, 0x001D0007) |
| 53 | Name (_PRW, Package () { 0x0D, 0x05 }) /* PME_B0_STS any 0:1d or 0:1f device */ |
| 54 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 55 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 56 | { |
| 57 | Offset (0xC4), URES, 8 |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | Device(PCI5) |
| 62 | { |
| 63 | Name (_ADR, 0x001E0000) |
| 64 | Name (_PRW, Package () { 0x0B, 0x05 }) /* PME# _STS */ |
| 65 | Name (_PRT, Package() { |
| 66 | Package() { 0x0003ffff, 0, 0, 20 }, |
| 67 | Package() { 0x0003ffff, 1, 0, 21 }, |
| 68 | Package() { 0x0003ffff, 2, 0, 22 }, |
| 69 | Package() { 0x0003ffff, 3, 0, 23 }, |
| 70 | }) |
| 71 | } |
| 72 | |
| 73 | Device (ICH0) |
| 74 | { |
| 75 | Name (_ADR, 0x001F0000) |
| 76 | OperationRegion (D310, PCI_Config, 0x00, 0xFF) |
| 77 | Field (D310, ByteAcc, NoLock, Preserve) |
| 78 | { |
| 79 | Offset (0x40), PBAR, 16, |
| 80 | Offset (0x58), GBAR, 16, |
| 81 | } |
| 82 | |
| 83 | OperationRegion (ACPI, SystemIO, 0x0400, 0xC0) |
| 84 | Field (ACPI, ByteAcc, NoLock, Preserve) |
| 85 | { |
| 86 | Offset (0x00), PS1L,8, PS1H,8, PE1L,8, PE1H,8, |
| 87 | Offset (0x28), GS0L,8, GS0H,8, GSPL,8, GSPH,8, |
| 88 | Offset (0x2C), GE0L,8, GE0H,8, GEPL,8, GEPH,8, |
| 89 | Offset (0xB8), GPLV,8 |
| 90 | } |
| 91 | |
| 92 | Name (MSBF, ResourceTemplate () |
| 93 | { |
| 94 | /* IOAPIC 0 */ |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 95 | Memory32Fixed (ReadWrite, IO_APIC_ADDR, 0x00001000,) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 96 | |
| 97 | IO (Decode16, 0x0, 0x0, 0x80, 0x0, PMIO) |
| 98 | IO (Decode16, 0x0, 0x0, 0x40, 0x0, GPIO) |
| 99 | |
| 100 | /* 8254 legacy irq */ |
| 101 | IO (Decode16, 0x04D0, 0x04D0, 0x02, 0x02,) |
| 102 | |
| 103 | /* reset generator */ |
| 104 | IO (Decode16, 0x0092, 0x0092, 0x01, 0x01, ) |
| 105 | }) |
| 106 | |
| 107 | Method (_CRS, 0, NotSerialized) |
| 108 | { |
| 109 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MIN, IOA1) |
| 110 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MAX, IOA2) |
| 111 | CreateByteField (MSBF, \_SB_.PCI0.ICH0.PMIO._LEN, IOAL) |
| 112 | |
| 113 | Store (PBAR, Local0) |
| 114 | If ( Land(Local0, 0x01) ) |
| 115 | { |
| 116 | And (Local0, 0xFFFE, Local0) |
| 117 | Store (Local0, IOA1) |
| 118 | Store (Local0, IOA2) |
| 119 | Store (0x80, IOAL) |
| 120 | } Else { |
| 121 | Store (0x00, IOAL) |
| 122 | } |
| 123 | |
| 124 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MIN, IOS1) |
| 125 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MAX, IOS2) |
| 126 | CreateByteField (MSBF, \_SB_.PCI0.ICH0.GPIO._LEN, IOSL) |
| 127 | |
| 128 | Store (GBAR, Local0) |
| 129 | If ( Land(Local0, 0x01) ) { |
| 130 | And (Local0, 0xFFFE, Local0) |
| 131 | Store (Local0, IOS1) |
| 132 | Store (Local0, IOS2) |
| 133 | Store (0x40, IOSL) |
| 134 | } Else { |
| 135 | Store (0x00, IOSL) |
| 136 | } |
| 137 | Return (MSBF) |
| 138 | } |
| 139 | |
| 140 | Device (FWH) |
| 141 | { |
| 142 | Name (_HID, EisaId ("PNP0C02")) |
| 143 | Name (_UID, 0x01) |
| 144 | |
| 145 | |
| 146 | Name (MSBG, ResourceTemplate () { |
| 147 | Memory32Fixed (ReadOnly, 0xFFF00000, 0x00080000,) |
| 148 | Memory32Fixed (ReadOnly, 0xFFF80000, 0x00080000,) |
| 149 | }) |
| 150 | |
| 151 | Method (_CRS, 0, NotSerialized) |
Elyes HAOUAS | 07662a6 | 2018-05-28 13:15:57 +0200 | [diff] [blame^] | 152 | { |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 153 | Return (MSBG) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | Device (SMSC) |
| 158 | { |
| 159 | Name (_HID, EisaId ("PNP0C02")) |
| 160 | Name (_UID, 0x02) |
| 161 | #include "acpi/superio.asl" |
| 162 | } |
| 163 | |
| 164 | } |