summaryrefslogtreecommitdiff
path: root/src/mainboard/system76/adl/acpi
diff options
context:
space:
mode:
authorTim Crawford <tcrawford@system76.com>2023-02-06 11:14:57 -0700
committerFelix Held <felix-coreboot@felixheld.de>2023-02-28 17:43:00 +0000
commitf0400e7d3f1bf7e6f8b5fa2ba371a24c39f91b0e (patch)
tree2e0bdcdec2b3e445f3393d698e344cc3baeb1f26 /src/mainboard/system76/adl/acpi
parent9770df1e9dfff99f8e764a56e6f603d4266edfb7 (diff)
mb/system76: Rename adl-p to adl
The directory holds boards other than ADL-P, such as ADL-U and ADL-H. Change-Id: I8e1b67f83d649cd07645a4a519ba1bf2f6f5e7c6 Signed-off-by: Tim Crawford <tcrawford@system76.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72802 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jeremy Soller <jeremy@system76.com>
Diffstat (limited to 'src/mainboard/system76/adl/acpi')
-rw-r--r--src/mainboard/system76/adl/acpi/backlight.asl31
-rw-r--r--src/mainboard/system76/adl/acpi/mainboard.asl12
-rw-r--r--src/mainboard/system76/adl/acpi/sleep.asl46
3 files changed, 89 insertions, 0 deletions
diff --git a/src/mainboard/system76/adl/acpi/backlight.asl b/src/mainboard/system76/adl/acpi/backlight.asl
new file mode 100644
index 0000000000..f020234450
--- /dev/null
+++ b/src/mainboard/system76/adl/acpi/backlight.asl
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <drivers/intel/gma/acpi/gma.asl>
+
+Scope (GFX0)
+{
+ Name (BRIG, Package (22) {
+ 40, /* default AC */
+ 40, /* default Battery */
+ 5,
+ 10,
+ 15,
+ 20,
+ 25,
+ 30,
+ 35,
+ 40,
+ 45,
+ 50,
+ 55,
+ 60,
+ 65,
+ 70,
+ 75,
+ 80,
+ 85,
+ 90,
+ 95,
+ 100
+ })
+}
diff --git a/src/mainboard/system76/adl/acpi/mainboard.asl b/src/mainboard/system76/adl/acpi/mainboard.asl
new file mode 100644
index 0000000000..c982a9ee4c
--- /dev/null
+++ b/src/mainboard/system76/adl/acpi/mainboard.asl
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#define EC_GPE_SCI 0x6E
+#define EC_GPE_SWI 0x6B
+#include <ec/system76/ec/acpi/ec.asl>
+
+Scope (\_SB) {
+ #include "sleep.asl"
+ Scope (PCI0) {
+ #include "backlight.asl"
+ }
+}
diff --git a/src/mainboard/system76/adl/acpi/sleep.asl b/src/mainboard/system76/adl/acpi/sleep.asl
new file mode 100644
index 0000000000..83888f3e59
--- /dev/null
+++ b/src/mainboard/system76/adl/acpi/sleep.asl
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <intelblocks/gpio.h>
+
+Method (PGPM, 1, Serialized)
+{
+ For (Local0 = 0, Local0 < 6, Local0++)
+ {
+ \_SB.PCI0.CGPM (Local0, Arg0)
+ }
+}
+
+/*
+ * Method called from _PTS prior to system sleep state entry
+ * Enables dynamic clock gating for all 5 GPIO communities
+ */
+Method (MPTS, 1, Serialized)
+{
+ \_SB.PCI0.LPCB.EC0.PTS (Arg0)
+ PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
+}
+
+/*
+ * Method called from _WAK prior to system sleep state wakeup
+ * Disables dynamic clock gating for all 5 GPIO communities
+ */
+Method (MWAK, 1, Serialized)
+{
+ PGPM (0)
+ \_SB.PCI0.LPCB.EC0.WAK (Arg0)
+}
+
+/*
+ * S0ix Entry/Exit Notifications
+ * Called from \_SB.PEPD._DSM
+ */
+Method (MS0X, 1, Serialized)
+{
+ If (Arg0 == 1) {
+ /* S0ix Entry */
+ PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
+ } Else {
+ /* S0ix Exit */
+ PGPM (0)
+ }
+}