From 679f4fa46578267989b55635e50ef500f7327338 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Wed, 13 Oct 2021 22:45:18 -0600 Subject: mb/google/guybrush/var/nipperkin: Override GPIO configuration SOC_PEN_DETECT_ODL, SOC_SAR_INT_L and WWAN_AUX_RESET_L are not connected in nipperkin. Override those GPIO configurations. BUG=None TEST=Build and boot to OS in Nipperkin. Signed-off-by: Karthikeyan Ramasubramanian Change-Id: I7e497f83593472ecf4927e5379e1dd7786e77e62 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58379 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Raul Rangel Reviewed-by: Kevin Chiu --- .../guybrush/variants/nipperkin/Makefile.inc | 4 +++ .../google/guybrush/variants/nipperkin/gpio.c | 41 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/mainboard/google/guybrush/variants/nipperkin/gpio.c (limited to 'src/mainboard/google/guybrush/variants') diff --git a/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc b/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc index 88e75bde52..f7c97bafbf 100644 --- a/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc +++ b/src/mainboard/google/guybrush/variants/nipperkin/Makefile.inc @@ -1,3 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later +bootblock-y += gpio.c +romstage-y += gpio.c +ramstage-y += gpio.c + subdirs-y += ./memory diff --git a/src/mainboard/google/guybrush/variants/nipperkin/gpio.c b/src/mainboard/google/guybrush/variants/nipperkin/gpio.c new file mode 100644 index 0000000000..acdcc4f7f3 --- /dev/null +++ b/src/mainboard/google/guybrush/variants/nipperkin/gpio.c @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include +#include +#include + +static const struct soc_amd_gpio override_gpio_table[] = { + /* Unused TP1056 */ + PAD_NC(GPIO_4), + /* Unused TP1063 */ + PAD_NC(GPIO_17), + PAD_NC(GPIO_18), +}; + +static const struct soc_amd_gpio override_early_gpio_table[] = { + PAD_NC(GPIO_18), +}; + +static const struct soc_amd_gpio override_pcie_gpio_table[] = { + PAD_NC(GPIO_18), +}; + +const struct soc_amd_gpio *variant_override_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(override_gpio_table); + return override_gpio_table; +} + +const struct soc_amd_gpio *variant_early_override_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(override_early_gpio_table); + return override_early_gpio_table; +} + +const struct soc_amd_gpio *variant_pcie_override_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(override_pcie_gpio_table); + return override_pcie_gpio_table; +} -- cgit v1.2.3