aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/system76/addw1/acpi
diff options
context:
space:
mode:
authorTim Crawford <tcrawford@system76.com>2021-09-20 10:18:02 -0600
committerFelix Held <felix-coreboot@felixheld.de>2021-09-22 13:45:55 +0000
commit6a93a4524205e66c16fdc568f7991b6d25887a22 (patch)
treeecd16eb9a7becf3a3ef86e8205c2733e3a4e9752 /src/mainboard/system76/addw1/acpi
parent5ab146674c5e95f9910b3edae88fbb5dd35aaeb4 (diff)
mb/system76/addw1: Add System76 Adder Workstation 1
Change-Id: I5dd3bc320ca640728e1d86180c6bfa0dc7295760 Signed-off-by: Jeremy Soller <jeremy@system76.com> Signed-off-by: Tim Crawford <tcrawford@system76.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48421 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/mainboard/system76/addw1/acpi')
-rw-r--r--src/mainboard/system76/addw1/acpi/gpe.asl11
-rw-r--r--src/mainboard/system76/addw1/acpi/mainboard.asl13
-rw-r--r--src/mainboard/system76/addw1/acpi/sleep.asl11
3 files changed, 35 insertions, 0 deletions
diff --git a/src/mainboard/system76/addw1/acpi/gpe.asl b/src/mainboard/system76/addw1/acpi/gpe.asl
new file mode 100644
index 0000000000..7ef9a989c0
--- /dev/null
+++ b/src/mainboard/system76/addw1/acpi/gpe.asl
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+// GPP_K6 SCI
+Method (_L06, 0, Serialized) {
+ Debug = Concatenate("GPE _L06: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
+ If (\_SB.PCI0.LPCB.EC0.ECOK) {
+ If (\_SB.PCI0.LPCB.EC0.WFNO == 1) {
+ Notify(\_SB.LID0, 0x80)
+ }
+ }
+}
diff --git a/src/mainboard/system76/addw1/acpi/mainboard.asl b/src/mainboard/system76/addw1/acpi/mainboard.asl
new file mode 100644
index 0000000000..4e67439c56
--- /dev/null
+++ b/src/mainboard/system76/addw1/acpi/mainboard.asl
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#define EC_GPE_SCI 0x03 /* GPP_K3 */
+#define EC_GPE_SWI 0x06 /* GPP_K6 */
+#include <ec/system76/ec/acpi/ec.asl>
+
+Scope (\_SB) {
+ #include "sleep.asl"
+}
+
+Scope (\_GPE) {
+ #include "gpe.asl"
+}
diff --git a/src/mainboard/system76/addw1/acpi/sleep.asl b/src/mainboard/system76/addw1/acpi/sleep.asl
new file mode 100644
index 0000000000..48c50e075e
--- /dev/null
+++ b/src/mainboard/system76/addw1/acpi/sleep.asl
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/* Method called from _PTS prior to enter sleep state */
+Method (MPTS, 1) {
+ \_SB.PCI0.LPCB.EC0.PTS (Arg0)
+}
+
+/* Method called from _WAK prior to wakeup */
+Method (MWAK, 1) {
+ \_SB.PCI0.LPCB.EC0.WAK (Arg0)
+}