RE: [PATCH 1/1] gpio: mxc: map Both Edge pad wakeup to Rising Edge
From: Shenwei Wang
Date: Wed Mar 18 2026 - 11:57:30 EST
> -----Original Message-----
> From: Peng Fan (OSS) <peng.fan@xxxxxxxxxxx>
> Sent: Wednesday, March 18, 2026 6:19 AM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>; Linus Walleij
> <linusw@xxxxxxxxxx>; Bartosz Golaszewski <brgl@xxxxxxxxxx>; Frank Li
> <frank.li@xxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Cc: Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>; Fabio Estevam
> <festevam@xxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; linux-
> arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>; stable@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH 1/1] gpio: mxc: map Both Edge pad wakeup to Rising Edge
>
> Hi Shenwei,
>
> > Subject: [PATCH 1/1] gpio: mxc: map Both Edge pad wakeup to Rising
> > Edge
> >
> > Suspend may fail on i.MX8QM when Falling Edge is used as a pad wakeup
> > trigger due to a hardware bug in the detection logic.
>
> This hardware bug exists on i.MX8QM/QXP/DXL, or just 8QM?
>
Only on i.MX8QM, as described. The system fails to enter suspend when
Falling Edge wakeup is selected.
Thanks,
Shenwei
> More information better to add why suspend may fail.
> Do you mean not able to resume back because of failing to detect falling edge?
>
> Since the
> > hardware does not support Both Edge wakeup, remap requests for Both
> > Edge to Rising Edge by default to avoid hitting this issue.
> >
> > Fixes: f60c9eac54af ("gpio: mxc: enable pad wakeup on i.MX8x
> > platforms")
> > cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Shenwei Wang <shenwei.wang@xxxxxxx>
> > ---
> > drivers/gpio/gpio-mxc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index
> > d7666fe9dbf8..f8300690ac05 100644
> > --- a/drivers/gpio/gpio-mxc.c
> > +++ b/drivers/gpio/gpio-mxc.c
> > @@ -589,7 +589,7 @@ static bool mxc_gpio_set_pad_wakeup(struct
> > mxc_gpio_port *port, bool enable)
> > IMX_SCU_WAKEUP_OFF, /* 0 */
> > IMX_SCU_WAKEUP_RISE_EDGE, /*
> > IRQ_TYPE_EDGE_RISING */
> > IMX_SCU_WAKEUP_FALL_EDGE, /*
> > IRQ_TYPE_EDGE_FALLING */
> > - IMX_SCU_WAKEUP_FALL_EDGE, /*
> > IRQ_TYPE_EDGE_BOTH */
> > + IMX_SCU_WAKEUP_RISE_EDGE, /*
> > IRQ_TYPE_EDGE_BOTH */
>
> For IRQ_TYPE_EDGE_BOTH, use IMX_SCU_WAKEUP_RISE_EDGE.
> Do we need to also add a check for IRQ_TYPE_EDGE_FALLING?
> Saying not support IRQ_TYPE_EDGE_FALLING because of xxx.
>
> Regards
> Peng.
>
> > IMX_SCU_WAKEUP_HIGH_LVL, /*
> > IRQ_TYPE_LEVEL_HIGH */
> > IMX_SCU_WAKEUP_OFF, /* 5 */
> > IMX_SCU_WAKEUP_OFF, /* 6 */
> > --
> > 2.43.0