soc/amd/common/gpio: add PAD_NF_SCI pad type
This patch adds a pin configuration macro that supports both switching a pin to its native function and configuring it as a SCI source. This is a preparation to remove the GPIO2 soc_gpio_hook. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: If0da5c010f35fd902f6b8857368daec93c12394a Reviewed-on: https://review.coreboot.org/c/coreboot/+/50373 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
89d3a2f01e
commit
2fa96eb33e
|
@ -167,11 +167,16 @@
|
||||||
* PAD_SCI The pin is a SCI source
|
* PAD_SCI The pin is a SCI source
|
||||||
* pin the pin to be programmed
|
* pin the pin to be programmed
|
||||||
* pull pull up, pull down or no pull
|
* pull pull up, pull down or no pull
|
||||||
* event trigger LEVEL_LOW, LEVEL_HIGH, EDGE_LOW, EDGE_HIGH
|
* event trigger LEVEL_LOW, LEVEL_HIGH, EDGE_LOW, EDGE_HIGH
|
||||||
* PAD_SMI The pin is a SMI source
|
* PAD_SMI The pin is a SMI source
|
||||||
* pin the pin to be programmed
|
* pin the pin to be programmed
|
||||||
* pull pull up, pull down or no pull
|
* pull pull up, pull down or no pull
|
||||||
* event trigger LEVEL_LOW, LEVEL_HIGH
|
* event trigger LEVEL_LOW, LEVEL_HIGH
|
||||||
|
* PAD_NF_SCI Define native alternate function and confiure SCI source
|
||||||
|
* pin the pin to be programmed
|
||||||
|
* function the native function
|
||||||
|
* pull pull up, pull down or no pull
|
||||||
|
* event trigger LEVEL_LOW, LEVEL_HIGH, EDGE_LOW, EDGE_HIGH
|
||||||
* PAD_WAKE The pin can wake, use after PAD_INT or PAD_SCI
|
* PAD_WAKE The pin can wake, use after PAD_INT or PAD_SCI
|
||||||
* pin the pin to be programmed
|
* pin the pin to be programmed
|
||||||
* pull pull up, pull down or no pull
|
* pull pull up, pull down or no pull
|
||||||
|
@ -232,6 +237,12 @@
|
||||||
PAD_PULL(pull) | PAD_TRIGGER(LEVEL_HIGH), \
|
PAD_PULL(pull) | PAD_TRIGGER(LEVEL_HIGH), \
|
||||||
PAD_FLAG_EVENT_TRIGGER(trigger) | GPIO_FLAG_SMI)
|
PAD_FLAG_EVENT_TRIGGER(trigger) | GPIO_FLAG_SMI)
|
||||||
|
|
||||||
|
/* Native function + SCI pad configuration */
|
||||||
|
#define PAD_NF_SCI(pin, func, pull, trigger) \
|
||||||
|
PAD_CFG_STRUCT_FLAGS(pin, pin ## _IOMUX_ ## func, \
|
||||||
|
PAD_PULL(pull), \
|
||||||
|
PAD_FLAG_EVENT_TRIGGER(trigger) | GPIO_FLAG_SCI)
|
||||||
|
|
||||||
/* WAKE pad configuration */
|
/* WAKE pad configuration */
|
||||||
#define PAD_WAKE(pin, pull, trigger, type) \
|
#define PAD_WAKE(pin, pull, trigger, type) \
|
||||||
PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, \
|
PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, \
|
||||||
|
|
Loading…
Reference in New Issue