From 39ef89033624a2d14b0c77cdbdf287dd7d7059e1 Mon Sep 17 00:00:00 2001 From: Kangheui Won Date: Tue, 23 Mar 2021 14:56:31 +1100 Subject: mb/google/guybrush: disable KBRSTEN GPIO129 is muxed with KBRST, so setting GPIO129 to low causes reset when KBRSTEN is set to 1. Since reset value of KBRSTEN is 1 we need a logic to clear it. BUG=b:183340503 TEST=build Signed-off-by: Kangheui Won Change-Id: I194e8432a14d6105f6bcf12111647f5aad4e2de2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51727 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Raul Rangel --- src/mainboard/google/guybrush/mainboard.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/guybrush/mainboard.c b/src/mainboard/google/guybrush/mainboard.c index 72ad7a8a0f..ffa682218d 100644 --- a/src/mainboard/google/guybrush/mainboard.c +++ b/src/mainboard/google/guybrush/mainboard.c @@ -1,9 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include #include #include +#include #include #include @@ -88,6 +90,16 @@ static void mainboard_configure_gpios(void) { size_t base_num_gpios, override_num_gpios; const struct soc_amd_gpio *base_gpios, *override_gpios; + u32 reg; + + /* + * Disable KBRST feature + * KBRSTEN is set to 1 on reset and this causes system reset + * if GPIO 129 is configured as GPO_LOW. + * */ + reg = pm_read8(PM_RST_CTRL1); + reg &= ~KBRSTEN; + pm_write8(PM_RST_CTRL1, reg); base_gpios = variant_base_gpio_table(&base_num_gpios); override_gpios = variant_override_gpio_table(&override_num_gpios); -- cgit v1.2.3