From 0a5837e9f192cde66d6e7d1e2818d6526c766d0a Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 15 Jun 2021 11:19:57 -0600 Subject: [PATCH] soc/amd/common: Add GPIO config for native func w/ output drive Our existing native function gpio configuration macro (PAD_NF) only sets the pull. For PCIe reset, we now need to be able to set it to its native function (PCIE_RST_L), and drive it low, then high. BUG=b:182805349 TEST=Configure GPIO, see correct behavior. Signed-off-by: Martin Roth Change-Id: I636371517c99f94f76834abc4575795d51aa0368 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55652 Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/include/amdblocks/gpio_defs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/include/amdblocks/gpio_defs.h b/src/soc/amd/common/block/include/amdblocks/gpio_defs.h index 4b25c31aed..bbc407e731 100644 --- a/src/soc/amd/common/block/include/amdblocks/gpio_defs.h +++ b/src/soc/amd/common/block/include/amdblocks/gpio_defs.h @@ -208,10 +208,14 @@ #define PAD_WAKE_ENABLE(__wake) GPIO_WAKE_ ## __wake #define PAD_DEBOUNCE_CONFIG(__deb) GPIO_DEB_ ## __deb -/* Native function pad configuration */ +/* Native function pad configuration with PAD_PULL */ #define PAD_NF(pin, func, pull) \ PAD_CFG_STRUCT(pin, pin ## _IOMUX_ ## func, PAD_PULL(pull)) +/* Native function pad configuration with PAD_OUTPUT */ +#define PAD_NFO(pin, func, direction) \ + PAD_CFG_STRUCT(pin, pin ## _IOMUX_ ## func, PAD_OUTPUT(direction)) + /* General purpose input pad configuration */ #define PAD_GPI(pin, pull) \ PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, PAD_PULL(pull))