GPIO3 PEE.04 not working after system resume

I am using L4T 35.5 with Jetson Orin Nano.
We have designed a power button on the custom carrier board using GPIO3 PEE.04.
The power button worked well and I can see interrupts increased by pressing the power button as well as pop-up Power Off window.

power-off

$ sudo cat /proc/interrupts | grep power-key
293: 2 2 0 0 0 0 gpio 27 Edge power-key

But after the system resumes from suspend when power button pressed I can’t get GPIO interrupt and Power Off window anymore.

The GPIO PEE.04 setting in device tree is following (in Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi)

gpio-keys {
        compatible = "gpio-keys";
        gpio-keys,name = "gpio-keys";
        status = "okay";

        forcerecovery {
                label = "force-recovery";
                gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
                linux,code = <BTN_1>;
        };  

        power_key {
                label = "power-key";
                gpios = <&tegra_aon_gpio TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>;
                linux,code = <KEY_POWER>;
                gpio-key,wakeup;
        };  
};

How to get the GPIO3 PEE.04 working after resume?
Thanks.

Does it work if you wire the power button to a DevKit board with the same GPIO pins?

Sorry, I cannot do it because I don’t have a dev kit on hand.

Then do pins other than EE.04 work?
Does dmesg show anythig after the operation?

Hi,

It’s a known issue in SC7 binary that has been fixed internally, please wait for the next public release.
As a workaround for now, you can manually modify the register after resume to enable interrupt:

This is the normal status before suspend:

root@tegra-ubuntu:/home/nvidia# busybox devmem 0x0c2f1080
0x000000ED

This is the abnormal one after suspend:

root@tegra-ubuntu:/home/nvidia# busybox devmem 0x0c2f1080
0x00000001

So please write 0x000000ED back to 0x0c2f1080 after resume to fix it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.