GPIO based wake from deep sleep for I.mx8 mini

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

GPIO based wake from deep sleep for I.mx8 mini

2,197 Views
pranotigare
Contributor I

we are using I.MX8 mini on which Linux is running on we are putting Linux in deep sleep mode but for waking up from deep sleep mode we are using GPIO based wakeup so we are made changes in imx8mm-evk

pinctrl_gpio_keys: gpiokey {
fsl,pins = <
MX8MM_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x05
>;
};


gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_keys>;

wakeup_button {
label = "Power Button";
gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
};
};

and build image using bitbake command i.e bitbake virtual/kernel -f -c deploy but after flashing image in SD card and booting in linux. but GPIO  based wake up is not working. please help me with this

 
Labels (1)
0 Kudos
2 Replies

2,180 Views
igorpadykov
NXP Employee
NXP Employee

Hi Pranoti

 

one can check if MX8MM_IOMUXC_SAI5_RXD0.. is used in other dts configurations

like pinctrl_sai5: sai5grp :

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.d...

 

Best regards
igor

0 Kudos

2,188 Views
BiyongSUN
NXP Employee
NXP Employee

Works fine. 

 

HW: i.MX8MM EVK

SW: LF-v5.10.9_1.0.0

imx8mm-evk-gpio-key-wakeup-demo.dts

 

#include "imx8mm-evk.dts"

/{

gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_keys>;

power {
label = "GPIO Power";
linux,code = <KEY_POWER>;
gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
wakeup-source;
debounce-interval = <50>;

};
};

};

&iomuxc {

/delete-node/ pinctrl_pdm;

pinctrl_gpio_keys: gpio_keys_grp {
fsl,pins = <
MX8MM_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x19
>;
};
};

&micfil {
status = "disabled";
};

1.jpg

 

2.jpg

Untitled6.jpg

 

x.jpg

 

3.jpg

5.jpg