From fa5a4752065ebb75b419815f97e95b62f0847a9d Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Tue, 1 Nov 2022 11:59:02 -0600 Subject: mb/system76/adl-p: Add Darter Pro 8 The Darter Pro 8 (darp8) is an Alder Lake-P board. Tested with a custom TianoCore UefiPayloadPkg. Working: - PS/2 keyboard, touchpad - Both DIMM slots (with NMSO480E82-3200EA00) - M.2 NVMe SSD (with MZVL2500HCJQ) - M.2 SATA SSD (with WDS100T2B0B) - All USB ports - SD card reader - Webcam - Ethernet - WiFi/Bluetooth - Integrated graphics using Intel GOP driver - Backlight controls on Windows 10 and Linux 6.1 - HDMI output - DisplayPort output over USB-C - Internal microphone - Internal speakers - Combined header + mic 3.5mm audio - S0ix suspend/resume - Booting Pop!_OS Linux 22.04 with kernel 5.18.5 - Internal flashing with flashrom v1.2-703-g76118a7c10ed Not working: - Detection of devices in TBT slot on boot Change-Id: Icc84d6cc3aec7149d9b538305288bbe2b56d53e4 Signed-off-by: Tim Crawford Reviewed-on: https://review.coreboot.org/c/coreboot/+/65301 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/mainboard/system76/adl-p/acpi/backlight.asl | 31 +++++++++++++++++ src/mainboard/system76/adl-p/acpi/mainboard.asl | 12 +++++++ src/mainboard/system76/adl-p/acpi/sleep.asl | 46 +++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 src/mainboard/system76/adl-p/acpi/backlight.asl create mode 100644 src/mainboard/system76/adl-p/acpi/mainboard.asl create mode 100644 src/mainboard/system76/adl-p/acpi/sleep.asl (limited to 'src/mainboard/system76/adl-p/acpi') diff --git a/src/mainboard/system76/adl-p/acpi/backlight.asl b/src/mainboard/system76/adl-p/acpi/backlight.asl new file mode 100644 index 0000000000..f020234450 --- /dev/null +++ b/src/mainboard/system76/adl-p/acpi/backlight.asl @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +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-p/acpi/mainboard.asl b/src/mainboard/system76/adl-p/acpi/mainboard.asl new file mode 100644 index 0000000000..c982a9ee4c --- /dev/null +++ b/src/mainboard/system76/adl-p/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 + +Scope (\_SB) { + #include "sleep.asl" + Scope (PCI0) { + #include "backlight.asl" + } +} diff --git a/src/mainboard/system76/adl-p/acpi/sleep.asl b/src/mainboard/system76/adl-p/acpi/sleep.asl new file mode 100644 index 0000000000..83888f3e59 --- /dev/null +++ b/src/mainboard/system76/adl-p/acpi/sleep.asl @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +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) + } +} -- cgit v1.2.3