Hi NXP,
Referans Link: https://community.nxp.com/t5/i-MX-Processors/GPIO-based-wake-from-deep-sleep-for-I-mx8-mini/td-p/132...
But I couldn't get GPIO wake up. Does anyone know the solution for my error?
I created imx8mp-wakeup.dts file :
/home/hasan/imx-yocto-bsp/build/tmp/work-shared/imx8mpevk/kernel-source/arch/arm64/boot/dts/freescale
#include "imx8mp-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 = <
MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x19
>;
};
};
&micfil {
status = "disabled";
};
Solved! Go to Solution.
Hi @ylmzhsn_
->On SAI5 pin , whenever it got toggled , what is the output seen of below command
cat /proc/interrupts
->Does it get increased or not ?
->If not then one can enter GPIO sysfs entry by following below.
cd /sys/class/gpio
export GPIO=<num>
echo $GPIO > export
cd /sys/class/gpio/gpio$GPIO
->to read
echo "in" > direction
cat value
echo enabled > /sys/class/gpio/gpio<n>/power/
->Now when you toggled whats the output of below command is seen ?
cat /proc/interrupts
-> change the dts file as given changes
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
power {
label = "Wake-Up";
gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
wakeup-source;
};
};
->Kindly Share the Observation for Above Asked Queries.
Thanks & Regards
Sanket Parekh
Hi @ylmzhsn_
I hope you are doing well.
Please find my queries below.
-> What exactly output is shown when you toggled on gpio via cat /process/interrupts command to check whether the gpio he is using actually getting updated or not.
-> Can you please share the Schematic for 8mp for my reference so need to check from gpio architecture perspective that is used proper gpio pins or not ?
Thanks & Regards
Sanket Parekh
Hi @ylmzhsn_
->On SAI5 pin , whenever it got toggled , what is the output seen of below command
cat /proc/interrupts
->Does it get increased or not ?
->If not then one can enter GPIO sysfs entry by following below.
cd /sys/class/gpio
export GPIO=<num>
echo $GPIO > export
cd /sys/class/gpio/gpio$GPIO
->to read
echo "in" > direction
cat value
echo enabled > /sys/class/gpio/gpio<n>/power/
->Now when you toggled whats the output of below command is seen ?
cat /proc/interrupts
-> change the dts file as given changes
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
power {
label = "Wake-Up";
gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
wakeup-source;
};
};
->Kindly Share the Observation for Above Asked Queries.
Thanks & Regards
Sanket Parekh