[PATCH 0/2] Input: gpio-keys - support wakeup pinctrl state

Kendall Willis posted 2 patches 1 week, 5 days ago
Documentation/devicetree/bindings/input/gpio-keys.yaml | 16 ++++++++++++++++
drivers/input/keyboard/gpio_keys.c                     | 13 +++++++++++++
2 files changed, 29 insertions(+)
[PATCH 0/2] Input: gpio-keys - support wakeup pinctrl state
Posted by Kendall Willis 1 week, 5 days ago
Add 'wakeup' pinctrl state to support separate pin wakeup
configurations for GPIO. Upon suspend the 'wakeup' pinctrl state is
chosen if it exists. On resume the 'default' pinctrl state is selected.
The 'wakeup' pinctrl state allows wakeup from low-power states if a
specific pin configuration is needed.

On TI K3 AM62 family of devices, the GPIO controller is turned off in
suspend to RAM states, so no interrupt can be received by the
controller. This prevents system wakeup from low-power states.
Alternatively, the pins can wakeup the system if a wakeup flag is set on
the pin by using pinctrl.

A corresponding device tree patch using the 'wakeup' pinctrl state can
be found under "arm64: dts: ti: k3-am62l3-evm: add wakeup-source for GPIO
button".

Tested GPIO wakeup from suspend on AM62L EVM and AM62P EVM.

Signed-off-by: Kendall Willis <k-willis@ti.com>
---
Kendall Willis (2):
      dt-bindings: input: gpio-keys: add pinctrl states
      Input: gpio-keys - support wakeup pinctrl state on suspend

 Documentation/devicetree/bindings/input/gpio-keys.yaml | 16 ++++++++++++++++
 drivers/input/keyboard/gpio_keys.c                     | 13 +++++++++++++
 2 files changed, 29 insertions(+)
---
base-commit: df2908090cda368b01ff43709f51890076c56157
change-id: 20260904-upstream-gpio-wakeup-52a54080c948

Best regards,
-- 
Kendall Willis <k-willis@ti.com>
Re: [PATCH 0/2] Input: gpio-keys - support wakeup pinctrl state
Posted by Francesco Dolcini 1 week, 4 days ago
Hello Kendall,

On Sat, Sep 12, 2026 at 04:33:52PM -0500, Kendall Willis wrote:
> Add 'wakeup' pinctrl state to support separate pin wakeup
> configurations for GPIO. Upon suspend the 'wakeup' pinctrl state is
> chosen if it exists. On resume the 'default' pinctrl state is selected.
> The 'wakeup' pinctrl state allows wakeup from low-power states if a
> specific pin configuration is needed.
> 
> On TI K3 AM62 family of devices, the GPIO controller is turned off in
> suspend to RAM states, so no interrupt can be received by the
> controller. This prevents system wakeup from low-power states.
> Alternatively, the pins can wakeup the system if a wakeup flag is set on
> the pin by using pinctrl.
> 
> A corresponding device tree patch using the 'wakeup' pinctrl state can
> be found under "arm64: dts: ti: k3-am62l3-evm: add wakeup-source for GPIO
> button".
> 
> Tested GPIO wakeup from suspend on AM62L EVM and AM62P EVM.
> 
> Signed-off-by: Kendall Willis <k-willis@ti.com>

This is going to be useful also for verdin am62 (verdin_key_wakeup /
k3-am62-verdin.dtsi).

Thanks,
Francesco