summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2021-06-15 11:19:57 -0600
committerMartin Roth <martinroth@google.com>2021-06-22 21:30:05 +0000
commit0a5837e9f192cde66d6e7d1e2818d6526c766d0a (patch)
tree3ae66dd572691029c826672c8df830ad16752923 /src/soc/amd
parent1687c243f5fa4a3bd473c08ca846e0740f11643a (diff)
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 <martinroth@chromium.org> Change-Id: I636371517c99f94f76834abc4575795d51aa0368 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55652 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/gpio_defs.h6
1 files changed, 5 insertions, 1 deletions
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))