summaryrefslogtreecommitdiff
path: root/src/ec/google/wilco/acpi/lid.asl
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-10-15 15:01:15 -0700
committerDuncan Laurie <dlaurie@chromium.org>2018-10-31 18:30:29 +0000
commita802be2910735c73f1b3c21dc837ce7750ed4ff7 (patch)
treeae5efab331802d2d4f1156d93226e1822315bf1c /src/ec/google/wilco/acpi/lid.asl
parentea98b40efe0ae6d514ebc1d797e564abe79ea34d (diff)
ec/google/wilco: Add ACPI EC infrastructure
Add the base ACPI support for the Wilco embedded controller, using ASL 2.0 syntax throughout. This includes the EC device and its resources, as well as the layout for the EC RAM and the functions needed to read and write to the EC RAM. The EC RAM address space is typically read/write, and so the ACPI EC device expects that a defined Field can be read and/or written. With this EC the read and write address spaces are different. For example, a read from address zero will return data that is unrelated to what a write to address zero expects. This makes using a typical OperationRegion to describe the EC RAM address space somewhat impracticle, since field definitions would overlap. Instead, methods are provided for reading and writing to an EC RAM offset, and the EC RAM layout is defined as a Package that describes offset+mask for read or write fields within the EC RAM. Change-Id: If8cfdf2633db1ccad4306fe877180ba197ee7414 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29122 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/google/wilco/acpi/lid.asl')
-rw-r--r--src/ec/google/wilco/acpi/lid.asl27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ec/google/wilco/acpi/lid.asl b/src/ec/google/wilco/acpi/lid.asl
new file mode 100644
index 0000000000..818e1355c0
--- /dev/null
+++ b/src/ec/google/wilco/acpi/lid.asl
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+Device (LID)
+{
+ Name (_HID, EisaId ("PNP0C0D"))
+ Name (_UID, 1)
+ Name (_STA, 0xf)
+
+ Method (_LID, 0, NotSerialized)
+ {
+ Return (R (P1LC))
+ }
+}