From c3c7f8fc60eea829a8cf5e3b02cf7de9cd7c5792 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Sun, 21 Mar 2021 23:43:24 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51680 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Mathew King Reviewed-by: Furquan Shaikh --- src/soc/amd/common/block/include/amdblocks/gpio_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/soc/amd/common/block') 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)) -- cgit v1.2.3