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