Attention is currently required from: Taniya Das. Hello Taniya Das,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/58580
to review the following change.
Change subject: qualcomm/sc7280: gpio: Support eGPIO scheme ......................................................................
qualcomm/sc7280: gpio: Support eGPIO scheme
eGPIO is a scheme which allows special power island domain IOs to be reused as regular chip GPIOs by muxing regular TLMM functions with Island Domain functions. Allow the eGPIO to be configured via gpio_configure API to be used as a TLMM gpio.
Change-Id: Ib2598a41ba3bb8a8a2acff8253b5bb78633f89f9 Signed-off-by: Taniya Das tdas@codeaurora.org --- M src/soc/qualcomm/common/gpio.c M src/soc/qualcomm/common/include/soc/gpio_common.h 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/58580/1
diff --git a/src/soc/qualcomm/common/gpio.c b/src/soc/qualcomm/common/gpio.c index 1ed8e8a..9893545 100644 --- a/src/soc/qualcomm/common/gpio.c +++ b/src/soc/qualcomm/common/gpio.c @@ -18,6 +18,9 @@ ((func & GPIO_CFG_FUNC_BMSK) << GPIO_CFG_FUNC_SHFT) | ((pull & GPIO_CFG_PULL_BMSK) << GPIO_CFG_PULL_SHFT);
+ if ((read32(®s->cfg) >> GPIO_EGPIO_SHFT) & GPIO_EGPIO_BMSK) + reg_val |= BIT(EGPIO_CFG_EN); + write32(®s->cfg, reg_val); }
diff --git a/src/soc/qualcomm/common/include/soc/gpio_common.h b/src/soc/qualcomm/common/include/soc/gpio_common.h index 20f947a..fd76631 100644 --- a/src/soc/qualcomm/common/include/soc/gpio_common.h +++ b/src/soc/qualcomm/common/include/soc/gpio_common.h @@ -21,6 +21,7 @@ GPIO_CFG_PULL_BMSK = 0x3, GPIO_CFG_FUNC_BMSK = 0xF, GPIO_CFG_DRV_BMSK = 0x7, + GPIO_EGPIO_BMSK = 0x1, };
/* GPIO TLMM INTR: Shift */ @@ -35,6 +36,7 @@ GPIO_CFG_FUNC_SHFT = 2, GPIO_CFG_DRV_SHFT = 6, GPIO_CFG_OE_SHFT = 9, + GPIO_EGPIO_SHFT = 11, };
/* GPIO IO: Shift */ @@ -82,6 +84,10 @@ IRQ_TYPE_DUAL_EDGE, };
+enum egpio_cfg { + EGPIO_CFG_EN = 12, +}; + typedef struct { u32 addr; } gpio_t;