Josie Nordrum has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44629 )
Change subject: Ezkinil: Fix stylus GPIO to enable suspend ......................................................................
Ezkinil: Fix stylus GPIO to enable suspend
Make GPIO_4 and GPIO_5 PAD_NC in ezkinil/gpio.c. Move interrupt status and wake status clearing to after GPIO config.
BUG=b:164892883, b:165342107 TEST=None BRANCH=None
Signed-off-by: Josie Nordrum josienordrum@google.com Change-Id: I7557575cf8b8e0f849e05bda1d69acf61e91a157 --- M src/mainboard/google/zork/variants/ezkinil/gpio.c M src/soc/amd/common/block/gpio_banks/gpio.c 2 files changed, 15 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/44629/1
diff --git a/src/mainboard/google/zork/variants/ezkinil/gpio.c b/src/mainboard/google/zork/variants/ezkinil/gpio.c index f8664bb..60fb6a4 100644 --- a/src/mainboard/google/zork/variants/ezkinil/gpio.c +++ b/src/mainboard/google/zork/variants/ezkinil/gpio.c @@ -8,6 +8,10 @@ #include <ec/google/chromeec/ec.h>
static const struct soc_amd_gpio ezkinil_bid1_gpio_set_stage_ram[] = { + /* PEN_DETECT_ODL */ + PAD_NC(GPIO_4), + /* PEN_POWER_EN */ + PAD_NC(GPIO_5), /* DMIC_SEL */ PAD_GPO(GPIO_13, LOW), // Select Camera 1 Dmic /* USB_OC4_L - USB_A1 */ @@ -29,6 +33,10 @@ };
static const struct soc_amd_gpio ezkinil_bid2_gpio_set_stage_ram[] = { + /* PEN_DETECT_ODL */ + PAD_NC(GPIO_4), + /* PEN_POWER_EN */ + PAD_NC(GPIO_5), /* FPMCU_RST_L Change NC */ PAD_NC(GPIO_11), /* DMIC_SEL */ @@ -50,6 +58,10 @@ };
static const struct soc_amd_gpio ezkinil_bid3_gpio_set_stage_ram[] = { + /* PEN_DETECT_ODL */ + PAD_NC(GPIO_4), + /* PEN_POWER_EN */ + PAD_NC(GPIO_5), /* FPMCU_RST_L Change NC */ PAD_NC(GPIO_11), /* FPMCU_BOOT0 Change NC */ diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c index 7fb6622..1909f99 100644 --- a/src/soc/amd/common/block/gpio_banks/gpio.c +++ b/src/soc/amd/common/block/gpio_banks/gpio.c @@ -214,10 +214,10 @@
soc_gpio_hook(gpio, mux);
- /* Clear interrupt and wake status (write 1-to-clear bits) */ - control |= GPIO_INT_STATUS | GPIO_WAKE_STATUS; __gpio_setbits32(gpio, PAD_CFG_MASK, control); - + /* Clear interrupt and wake status (write 1-to-clear bits) */ + __gpio_or32(gpio, GPIO_INT_STATUS | GPIO_WAKE_STATUS); + if (control_flags == 0) continue;