summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2021-03-21 23:43:24 -0600
committerFelix Held <felix-coreboot@felixheld.de>2021-03-23 19:56:26 +0000
commitc3c7f8fc60eea829a8cf5e3b02cf7de9cd7c5792 (patch)
tree9eaec0984033f5a3d4b6c773d16a412bdad9d5f5 /src/soc/amd
parent76def38abb6b517407409e2386d920ee77838dd2 (diff)
soc/amd/common/block/gpio_defs: Support wake and debounce configuration
Add a pad configuration macro to support configuring both wake and debounce. This support is required by Pen Detect GPIO. BUG=b:180539900 TEST=Build Guybrush mainboard. Change-Id: I3343a4e80fd5aa3047d76ff9f91ea57c3763bbca Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51680 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Mathew King <mathewk@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/gpio_defs.h6
1 files changed, 6 insertions, 0 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 2dd10d574f..4a83e0b434 100644
--- a/src/soc/amd/common/block/include/amdblocks/gpio_defs.h
+++ b/src/soc/amd/common/block/include/amdblocks/gpio_defs.h
@@ -241,6 +241,12 @@
PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, \
PAD_PULL(pull) | PAD_DEBOUNCE_CONFIG(type) | PAD_DEBOUNCE_CONFIG(time))
+/* Wake + debounce configuration */
+#define PAD_WAKE_DEBOUNCE(pin, pull, trigger, waketype, debtype, time) \
+ PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, \
+ PAD_PULL(pull) | PAD_TRIGGER(trigger) | PAD_WAKE_ENABLE(waketype) | \
+ PAD_DEBOUNCE_CONFIG(debtype) | PAD_DEBOUNCE_CONFIG(time))
+
/* No-connect pad - configured as input with PULL_DOWN */
#define PAD_NC(pin) \
PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, PAD_PULL(PULL_DOWN))