Waking up iMX93EVK from Deep Sleep via GPIO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Waking up iMX93EVK from Deep Sleep via GPIO

Waking up iMX93EVK from Deep Sleep via GPIO

-- DTS for gpio wakeup

 

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/*

 * Copyright 2022 NXP

 */

 

#include "imx93-11x11-evk.dts"

 

/ {

        gpio-keys {

                compatible = "gpio-keys";

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_gpio_keys>;

 

                power {

                  label = "GPIO Key Power";

                  linux,code = <KEY_POWER>;

                  gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;

                  wakeup-source;

                  debounce-interval = <20>;

                  interrupt-parent = <&gpio2>;

                  interrupts = <7 IRQ_TYPE_LEVEL_LOW>;

                };

        };

};

 

&iomuxc {

        pinctrl_gpio_keys: gpio_keys_grp {

                fsl,pins = <

                        MX93_PAD_GPIO_IO07__GPIO2_IO07  0x31e

                >;

        };

};


-- testing the switch GPIO 

First check if your gpio dts configuration to make it act as a switch works or not
After executing the command - 'evtest /dev/input/event1'
Trigger an interrupt by connecting GPIO2 7 to GND, as soon as you do that, you will receive Event logs such as below:-

gauravsharma7_0-1716787221867.png
This shows that your dts configuration for GPIO works.

 

 

-- Verify the interrupt

 

 

gauravsharma7_1-1716787221869.png

 

 

-- Go to sleep and then connect the GPIO to GND to trigger a wakeup, in the logs we see that kernel exits the suspend mode

 

gauravsharma7_2-1716787221871.png

 

No ratings
Version history
Last update:
3 weeks ago
Updated by: