Eran Mitrani has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76146?usp=email )
Change subject: mb/google/brya/acpi: Hades Update ACPI GPU Sequences to have Aborts ......................................................................
mb/google/brya/acpi: Hades Update ACPI GPU Sequences to have Aborts
For Hades power on sequence , in case an expected handshake fails when powering on, abort and power off. Note: Also added an error if timing out waiting for correct vendor ID.
BUG=287218791 TEST=Tested on Hades. currently fails on the VID error, set to WIP.
Signed-off-by: Eran Mitrani mitrani@google.com Change-Id: I1ea1916c52461d36f2fc8d4cb98bbc0f56d998c7 --- M src/mainboard/google/brya/acpi/power.asl 1 file changed, 53 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/76146/1
diff --git a/src/mainboard/google/brya/acpi/power.asl b/src/mainboard/google/brya/acpi/power.asl index 7eb31d8..8626bcb 100644 --- a/src/mainboard/google/brya/acpi/power.asl +++ b/src/mainboard/google/brya/acpi/power.asl @@ -111,6 +111,21 @@ Local0, PMC_RP_IDX, Local1) }
+/* + * Check return code from GPPL, and shut down if it failed. + * Arg0 == return code from GPPL: 0 = OK, FF = Failure + * Arg1 == calling function name + * Arg2 == signal name + */ +Method(PGOR, 3, Serialized) +{ + if (Arg0 != 0) { + Printf("[ERROR] %o: %o not asserted. Shutting down power.", Arg1, Arg2) + PGOF() + } + Return (Arg0) +} + /* "GC6 In", i.e. GC6 Entry Sequence */ Method (GC6I, 0, Serialized) { @@ -168,15 +183,24 @@ STXS (GPIO_GPU_PERST_L)
/* Wait for GPU to assert GPU_NVVDD_EN */ - GPPL (GPIO_GPU_NVVDD_EN, 1, 20) + Local0 = GPPL (GPIO_GPU_NVVDD_EN, 1, 20) + if (PGOR(Local0, "GC6O", "GPIO_GPU_NVVDD_EN") != 0) { + return + }
/* Ramp up NVVDD */ STXS (GPIO_NVVDD_PWR_EN) - GPPL (NVPG, 1, 4) + Local0 = GPPL (NVPG, 1, 4) + if (PGOR(Local0, "GC6O", "GPIO_GPU_NVVDD_EN") != 0) { + return + }
/* Ramp up PEXVDD */ STXS (GPIO_PEXVDD_PWR_EN) - GPPL (GPIO_PEXVDD_PG, 1, 4) + Local0 = GPPL (GPIO_PEXVDD_PG, 1, 4) + if (PGOR(Local0, "GC6O", "GPIO_PEXVDD_PG") != 0) { + return + }
/* Ramp up FBVDD - TODO: Remove Agah when board is dropped */ #if CONFIG(BOARD_GOOGLE_AGAH) @@ -200,6 +224,7 @@ Local0-- If (Local0 == 0) { + Printf("[ERROR] dGPU didn't reappear on the bus.. NVID=0x%x", NVID) Break } } @@ -229,23 +254,38 @@
/* Ramp up 1.2V rail on boards with support */ STXS (GPIO_NV12_PWR_EN) - GPPL (GPIO_NV12_PG, 1, 5) + Local0 = GPPL (GPIO_NV12_PG, 1, 5) + if (PGOR(Local0, "PGON", "GPIO_NV12_PG") != 0) { + return + }
/* Ramp up 1.8V rail */ STXS (GPEN) - GPPL (GPIO_1V8_PG, 1, 20) + Local0 = GPPL (GPIO_1V8_PG, 1, 20) + if (PGOR(Local0, "PGON", "GPIO_1V8_PG") != 0) { + return + }
/* Ramp up NV33 rail */ STXS (GPIO_NV33_PWR_EN) - GPPL (GPIO_NV33_PG, 1, 20) + Local0 = GPPL (GPIO_NV33_PG, 1, 20) + if (PGOR(Local0, "PGON", "GPIO_NV33_PG") != 0) { + return + }
/* Ramp up NVVDD rail */ STXS (GPIO_NVVDD_PWR_EN) - GPPL (NVPG, 1, 5) + Local0 = GPPL (NVPG, 1, 5) + if (PGOR(Local0, "PGON", "NVPG") != 0) { + return + }
/* Ramp up PEXVDD rail */ STXS (GPIO_PEXVDD_PWR_EN) - GPPL (GPIO_PEXVDD_PG, 1, 5) + Local0 = GPPL (GPIO_PEXVDD_PG, 1, 5) + if (PGOR(Local0, "PGON", "GPIO_PEXVDD_PG") != 0) { + return + }
/* Ramp up FBVDD rail */ #if CONFIG(BOARD_GOOGLE_AGAH) @@ -254,7 +294,10 @@ STXS (GPIO_FBVDD_PWR_EN) #endif
- GPPL (GPIO_FBVDD_PG, 1, 5) + Local0 = GPPL (GPIO_FBVDD_PG, 1, 5) + if (PGOR(Local0, "PGON", "GPIO_FBVDD_PG") != 0) { + return + }
/* All rails are good */ STXS (GPIO_GPU_ALLRAILS_PG) @@ -333,6 +376,7 @@ Local0-- If (Local0 == 0) { + Printf("[ERROR] dGPU didn't reappear on the bus.. NVID=0x%x", NVID) Break } }