summaryrefslogtreecommitdiff
path: root/src/mainboard/system76/oryp5/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/system76/oryp5/acpi')
-rw-r--r--src/mainboard/system76/oryp5/acpi/gpe.asl12
-rw-r--r--src/mainboard/system76/oryp5/acpi/mainboard.asl16
-rw-r--r--src/mainboard/system76/oryp5/acpi/sleep.asl13
3 files changed, 41 insertions, 0 deletions
diff --git a/src/mainboard/system76/oryp5/acpi/gpe.asl b/src/mainboard/system76/oryp5/acpi/gpe.asl
new file mode 100644
index 0000000000..81022642e4
--- /dev/null
+++ b/src/mainboard/system76/oryp5/acpi/gpe.asl
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+// GPP_B23 SCI
+Method (_L17, 0, Serialized)
+{
+ Debug = Concatenate("GPE _L17: ", 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/oryp5/acpi/mainboard.asl b/src/mainboard/system76/oryp5/acpi/mainboard.asl
new file mode 100644
index 0000000000..a319ae627c
--- /dev/null
+++ b/src/mainboard/system76/oryp5/acpi/mainboard.asl
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#define EC_GPE_SCI 0x17 /* GPP_B23 */
+#define EC_GPE_SWI 0x26 /* GPP_G6 */
+#define EC_COLOR_KEYBOARD 1
+#include <ec/system76/ec/acpi/ec.asl>
+
+Scope (\_SB)
+{
+ #include "sleep.asl"
+}
+
+Scope (\_GPE)
+{
+ #include "gpe.asl"
+}
diff --git a/src/mainboard/system76/oryp5/acpi/sleep.asl b/src/mainboard/system76/oryp5/acpi/sleep.asl
new file mode 100644
index 0000000000..f2b194c422
--- /dev/null
+++ b/src/mainboard/system76/oryp5/acpi/sleep.asl
@@ -0,0 +1,13 @@
+/* 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)
+}