GPIO Wake UP

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

GPIO Wake UP

Jump to solution
1,306 Views
ylmzhsn_
Contributor III

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";
};

0 Kudos
Reply
1 Solution
1,179 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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/wakeup

->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

View solution in original post

0 Kudos
Reply
4 Replies
1,279 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
1,221 Views
ylmzhsn_
Contributor III

Hi Sanket,

The reference guide I use:

The schematic  are attached.

imx8mpevk : 

2023-01-11 11-59-20 ekran görüntüsü.png

0 Kudos
Reply
1,180 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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/wakeup

->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

0 Kudos
Reply
1,152 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @ylmzhsn_ 

Any updates from your side?

Thanks & Regards

Sanket Parekh

0 Kudos
Reply