summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2022-08-11 15:58:49 -0600
committerTim Wawrzynczak <twawrzynczak@chromium.org>2022-08-16 14:20:25 +0000
commit74633b5580c7072262aa0aa753ce42d5b6c0d509 (patch)
tree17160bb511805f3fff9d1c1751b76fe9785ffc0a /src
parent57acfad0bc31dc252d2516de9c04a5cfa93b58b8 (diff)
mb/google/brya/acpi: Add minimum off timer for GCOFF
By moving the large wait for FBVDD discharge from PGOF to PGON, the whole time may be avoided if enough time has elapsed between the successive calls. BUG=b:239719056 TEST=With Nvidia test software, verify ACPI prints Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: I891aa14f120d58c45b8965038a9d2f2a417b3f3d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66642 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Cliff Huang <cliff.huang@intel.com> Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/acpi/power.asl15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/acpi/power.asl b/src/mainboard/google/brya/acpi/power.asl
index 55f8dbda8f..618030b4fd 100644
--- a/src/mainboard/google/brya/acpi/power.asl
+++ b/src/mainboard/google/brya/acpi/power.asl
@@ -19,6 +19,9 @@
#define GC6_DEFER_TYPE_EXIT_GC6 3
+/* 250ms in "Timer" units (i.e. 100ns increments) */
+#define MIN_OFF_TIME_TIMERS 2500000
+
/* Optimus Power Control State */
Name (OPCS, OPTIMUS_POWER_CONTROL_DISABLE)
@@ -45,6 +48,8 @@ Name (DFEN, 0)
Name (DFCI, 0)
/* Deferred GC6 Exit control */
Name (DFCO, 0)
+/* GCOFF Timer */
+Name (GCOT, 0)
/* "GC6 In", i.e. GC6 Entry Sequence */
Method (GC6I, 0, Serialized)
@@ -115,6 +120,14 @@ Method (PGON, 0, Serialized)
Return
}
+ Local0 = Timer - GCOT
+ If (Local0 < MIN_OFF_TIME_TIMERS)
+ {
+ Local1 = (MIN_OFF_TIME_TIMERS - Local0) / 10000
+ Printf("Sleeping %o to ensure min GCOFF time", Local1)
+ Sleep (Local1)
+ }
+
/* Assert PERST# */
\_SB.PCI0.CTXS (GPIO_GPU_PERST_L)
@@ -189,6 +202,8 @@ Method (PGOF, 0, Serialized)
\_SB.PCI0.CTXS (GPIO_1V8_PWR_EN)
GPPL (GPIO_1V8_PG, 0, 20)
+ GCOT = Timer
+
GPPS = GPU_POWER_STATE_OFF
Printf ("GPU sequenced off")
}