Hey Toradex Community,
I am working with a iMX8X board kernel version 5.15.129-6.5.0 and want to use the GPIO SODIMM pin 194 as wakeup source from suspend mode. Therefore I modified the device tree, applied it on the board. The device tree modification is as follows:
&colibri_gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
status = "okay";
key-wakeup {
debounce-interval = <10>;
gpios = <&lsio_gpio1 28 GPIO_ACTIVE_HIGH>;
label = "Wake-Up";
linux,code = <KEY_WAKEUP>;
wakeup-source;
};
};
&iomuxc {
/* ... */
/* Wakeup pin control **/
pinctrl_gpiokeys: gpiokeys-pins {
fsl,pins = <
IMX8QXP_MIPI_DSI0_GPIO0_01_LSIO_GPIO1_IO28 0x06700040 /** SODIMM 194 */
>;
};
};
The device tree modification works. I can suspend the board and wake it up again, but only once (until I restart the OS). Putting the device into suspend mode a second time after waking it once does not wake it up anymore. Do you know what could cause that behavior?
I checked the drivers for the GPIO device and something that surprised me was that its drivers were not bound after booting but I can still use it as a wake-up source (once). If I bind the drivers before using the GPIO to wake the system (once) the GPIO does not wake the system anymore. Therefore I was wondering, if the Wake-from-suspend is managed by the firmware instead of the kernel? And is it that binding the device via a driver blocks the firmware to use it as a wakeup source anymore? If that was the case it still would not explain why I can use the GPIO only once as wakeup source, since after waking the system (once) the GPIO driver is still unbound.
Kind regards, Jakob