From 36f3b1af84d374fb228d38dcca35a9144093f63e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 8 Dec 2020 09:05:34 -0700 Subject: [PATCH] Enable galp5 NVIDIA GPU Change-Id: I9dd1a7b0150672925bf454202947ccace8b0edb7 --- src/mainboard/system76/galp5/acpi/dgpu.asl | 22 +++++++++++++++++++ .../system76/galp5/acpi/mainboard.asl | 3 +++ src/mainboard/system76/galp5/bootblock.c | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/mainboard/system76/galp5/acpi/dgpu.asl diff --git a/src/mainboard/system76/galp5/acpi/dgpu.asl b/src/mainboard/system76/galp5/acpi/dgpu.asl new file mode 100644 index 0000000000..9a658d2776 --- /dev/null +++ b/src/mainboard/system76/galp5/acpi/dgpu.asl @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +External (\_SB.PCI0.RP01.RTD3) + +Device (\_SB.PCI0.RP01.DEV0) { + Name(_ADR, 0x00000000) + + Name (_PR0, Package() { \_SB.PCI0.RP01.RTD3 }) + Name (_PR3, Package() { \_SB.PCI0.RP01.RTD3 }) + + Method (_PS0, 0) { + Debug = "GPU _PS0" + STXS (DGPU_EVENT_N) + Sleep (1) + CTXS (DGPU_EVENT_N) + Sleep (1) + STXS (DGPU_EVENT_N) + } + + Method (_PS3, 0) { + Debug = "GPU _PS3" + } +} diff --git a/src/mainboard/system76/galp5/acpi/mainboard.asl b/src/mainboard/system76/galp5/acpi/mainboard.asl index 379f904f85..1aa3d43d69 100644 --- a/src/mainboard/system76/galp5/acpi/mainboard.asl +++ b/src/mainboard/system76/galp5/acpi/mainboard.asl @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include "../gpio.h" +#include "dgpu.asl" + #define EC_GPE_SCI 0x6E #define EC_GPE_SWI 0x6E #include diff --git a/src/mainboard/system76/galp5/bootblock.c b/src/mainboard/system76/galp5/bootblock.c index 9b760b6e6e..44489dfa6d 100644 --- a/src/mainboard/system76/galp5/bootblock.c +++ b/src/mainboard/system76/galp5/bootblock.c @@ -7,5 +7,5 @@ void bootblock_mainboard_init(void) { gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); - dgpu_power_enable(0); + dgpu_power_enable(1); }