From a53772c5d6d0a25799938cc6f9999e1163e70996 Mon Sep 17 00:00:00 2001 From: EricKY Cheng Date: Tue, 30 Aug 2022 19:54:57 +0800 Subject: [PATCH] mb/google/skyrim/var/winterhold: Add gpio override settings Follow FT6_SOC_GPIO_PM&Strap_20220815A.XLSX update Gpio setting BUG=b:240824497 BRANCH=None Signed-off-by: EricKY Cheng Change-Id: I2086c326cbf46ba6378d18d37dcbbe9fafa6b2bc Reviewed-on: https://review.coreboot.org/c/coreboot/+/67209 Tested-by: build bot (Jenkins) Reviewed-by: Frank Wu Reviewed-by: Dtrain Hsu Reviewed-by: Raul Rangel --- .../skyrim/variants/winterhold/Makefile.inc | 2 ++ .../google/skyrim/variants/winterhold/gpio.c | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/mainboard/google/skyrim/variants/winterhold/gpio.c diff --git a/src/mainboard/google/skyrim/variants/winterhold/Makefile.inc b/src/mainboard/google/skyrim/variants/winterhold/Makefile.inc index 88e75bde52..db72b152a7 100644 --- a/src/mainboard/google/skyrim/variants/winterhold/Makefile.inc +++ b/src/mainboard/google/skyrim/variants/winterhold/Makefile.inc @@ -1,3 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later subdirs-y += ./memory + +ramstage-y += gpio.c diff --git a/src/mainboard/google/skyrim/variants/winterhold/gpio.c b/src/mainboard/google/skyrim/variants/winterhold/gpio.c new file mode 100644 index 0000000000..bed7f4b92f --- /dev/null +++ b/src/mainboard/google/skyrim/variants/winterhold/gpio.c @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include +#include +#include +#include + +/* GPIO configuration in ramstage */ +static const struct soc_amd_gpio override_gpio_table[] = { + + /* SOC_PEN_DETECT_ODL */ + PAD_NC(GPIO_3), + + /* EN_PWR_WWAN_X */ + PAD_NC(GPIO_8), + + /* SD_AUX_RST_SOC_L */ + PAD_NC(GPIO_27), + + /* WWAN_RST_L */ + PAD_NC(GPIO_42), + +}; + +void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size) +{ + *size = ARRAY_SIZE(override_gpio_table); + *gpio = override_gpio_table; +}