sb,soc/amd: Drop OSFL method in ASL
[coreboot.git] / src / mainboard / lenovo / g505s / acpi / mainboard.asl
blob4bde39df7c3f27811c7737e9d462a8b229b39cbe
1 /* SPDX-License-Identifier: GPL-2.0-only */
3         /* Data to be patched by the BIOS during POST */
4         /* FIXME the patching is not done yet! */
5         /* Memory related values */
6         Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
7         Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
8         Name(PBLN, 0x0) /* Length of BIOS area */
10         Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS)  /* Base address of PCIe config space */
11         Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */
12         Name(HPBA, 0xFED00000)  /* Base address of HPET table */
14         /* AcpiGpe0Blk */
15         OperationRegion(GP0B, SystemMemory, 0xfed80814, 0x04)
16                 Field(GP0B, ByteAcc, NoLock, Preserve) {
17                 , 11,
18                 USBS, 1,
19         }
21         /* GPIO control block -- hardcoded to 0xfed80100 by AGESA */
22         OperationRegion (GPIO, SystemMemory, 0xfed80100, 0x100)
23         Field (GPIO, ByteAcc, NoLock, Preserve) {
24                 Offset (0x39),
25                 , 6,
26                 GP57, 1,        /* out: WLAN control (rf-kill) */
27                 Offset (0x76),
28                 , 7,
29                 GE22, 1,        /* General event 22 - connected to lid switch */
30         }
32         /* SMI/SCI control block -- hardcoded to 0xfed80200 by AGESA */
33         OperationRegion (SMIX, SystemMemory, 0xfed80200, 0x100)
34         Field (SMIX, AnyAcc, NoLock, Preserve) {
35                 Offset (0x08),  /* SCI level: 0 = active low, 1 = active high */
36                 , 22,
37                 LPOL, 1,        /* SCI22 trigger polarity - lid switch */
38         }
40         /*
41          * Used by EC code on certain events
42          *
43          * From ec/compal/ene932/acpi/ec.asl:
44          * The mainboard must define a PNOT method to handle power state
45          * notifications and Notify CPU device objects to re-evaluate their
46          * _PPC and _CST tables.
47          */
48         Method (PNOT)
49         {
50                 Debug = "Received PNOT call (probably from EC)"
51                 /* TODO: Implement this */
52         }
54 Scope (\_SB) {
55         Device (LID)
56         {
57                 Name(_HID, EisaId("PNP0C0D"))
58                 Name(_PRW, Package () {EC_LID_GPE, 0x04}) /* wake from S1-S4 */
59                 Method(_LID, 0)
60                 {
61                         Return (GE22)   /* GE pin 22 */
62                 }
64                 Method (_INI, 0)
65                 {
66                         /* Make sure lid trigger polarity is set so that we
67                          * trigger an SCI when lid status changes.
68                          */
69                         LPOL = ~GE22
70                 }
71         }
73         Device (MB) {
74                 Name(_HID, EisaId("PNP0C01")) // System Board
76                 /* Lid open */
77                 Method (LIDO) { /* Stub */ }
78                 /* Lid closed */
79                 Method (LIDC) { /* Stub */ }
80                 /* Increase brightness */
81                 Method (BRTU) { /* Stub */ }
82                 /* Decrease brightness */
83                 Method (BRTD) { /* Stub */ }
84                 /* Switch display */
85                 Method (DSPS) { /* Stub */ }
86                 /* Toggle wireless */
87                 Method (WLTG)
88                 {
89                         GP57 = ~GP57
90                 }
91                 /* Return lid state */
92                 Method (LIDS)
93                 {
94                         Return(GE22)
95                 }
96         }