How to change wake pin status

Hi Team,

In Jetson Nano pinmux xl sheet “GPIO2(GPIO_PH6)” wake pin status is mentioned as “yes”. I have changed status to “no” and generated dts from the xl sheet but the the generated dts has no difference.

How to set this wake pin status as “no” from dts directly?

@WayneWWW
@ShaneCCC
@JerryChang

Thanks,
Arun

hello arunkumar.d,

once the pin has configured as wake-up pin, you may also create GPIO key to trigger wake up signal.
for example,

gpio-keys {
    wakeup_key {
        label = "WakeupKey";
        gpios = <&gpio TEGRA_GPIO(H, 6) GPIO_ACTIVE_LOW>;
        linux,code = <KEY_POWER>;
        gpio-key,wakeup;
...

@JerryChang

Thanks for the reply.

How to disable wakeup?
because of wakeup, device is not going to suspend. How make wake pin status as “no”.

Thanks,
Arun

hello arunkumar.d,

please have modification in device tree,
here’s an example for Nano’s default configuration, you may disassembler the dtb file into text file for checking.
i.e. $ dtc -I dtb -O dts -o output.txt tegra210-p3448-0000-p3449-0000-b00.dtb

        gpio-keys {
                compatible = "gpio-keys";
                gpio-keys,name = "gpio-keys";
                status = "okay";
                disable-on-recovery-kernel;

                power {
                        label = "Power";
                        gpios = <0x56 0xbd 0x1>;
                        linux,code = <0x74>;
                        gpio-key,wakeup;
                        debounce-interval = <0x1e>;
                        nvidia,pmc-wakeup = <0x37 0x0 0x18 0x0>;
                };

@JerryChang

the dts code snippet that you have shared is for enabling wakeup.

How to disable wakeup?

hello arunkumar.d,

you may remove the gpio-key definition as configure it as usual GPIO pin.