Jetson AGX Orin Devkit GPIO as a Wake-Up Source

I’m using the Jetson AGX Orin Devkit with the Jetpack 36.4.

I’m following the Developer Guide R36.4 Chapter “Enabling GPIO as a Wake-Up Source”.
My goal is to configure one of the Pins on the 40Pin Header so i can use it as a Wake-Up source.

I decided to use the Pin 24 on the 40 Pin Header for this. (I just want to find out how to do it so i dont care which of the pins i just chose one)
If i’m correct this should be connected to Pin E55 (SPI1_CS0_N / GPIO3_PZ.06 )

In the Pinmux Spreadsheet i have set the Pin E55 to:
Customer Usage = GPIO3_PZ.06
Pin Direction = Input
Req. Initial State = Int PU
Wake Pin = Yes

With the makro i made the .dtsi files and copied them to the folder stated in the Design Guide Chapter Pinmux Changes and referenced the new file in the .config file.
For other tests i had to previously do pinmux changes this way and this worked in the end so i think this should be working correctly.

As stated in the Developer Guide R36.4 Chapter “Enabling GPIO as a Wake-Up Source” i added a line to the struct tegra234_wake_eventsin the pmc.c file.
The new line i added is:
TEGRA_WAKE_GPIO(“power2”, 45, 0, TEGRA234_MAIN_GPIO(Z, 6)),

According to the Chapter “Kernel Customization” i built the Kernel, the Modules and the DTBs and than used the flash.sh script to flash my devkit.

This all worked flawless, however when i use a button to connect the PIN24 on the 40 Pin header to either 3.3V or GND it does not wake the devkit from the suspend state.

Is there something i’m missing or i’m doing wrong?

Hi,
Here are some suggestions for the common issues:

1. Performance

Please run the below command before benchmarking deep learning use case:

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

2. Installation

Installation guide of deep learning frameworks on Jetson:

3. Tutorial

Startup deep learning tutorial:

4. Report issue

If these suggestions don’t help and you want to report an issue to us, please attach the model, command/step, and the customized app (if any) with us to reproduce locally.

Thanks!

Dear carolyuu,

Your answer has nothing to do with my question.

I have an actual technical difficulty with my Devkit besides following the developer guide and expected to get at least some level of support here.
Is this the wrong page to ask technical question regarding nvidia products?

Looking forward to some actual help here.

Hi @sevi150

In order to help you, I would like to ask for a couple of things first to double check your steps, for that, can you send me the output of the following commands?

cd <add-path>/Linux_for_Tegra
cat p3701.conf.common | grep -i pinmux
cat p3701.conf.common | grep -i padvoltage
ls -lt bootloader/generic/BCT/
ls -lt bootloader/

Also, can you provide the output log shown during the flashing process?

Ricardo González Víquez
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Hi sevi150,

Have you tried to configure it Int PD in pinmux spreadsheet?

Or have you tried to using another AON pin like the following one(PIN16 of 40 pins expandsion header)?
image

Please also share the full device tree and dmesg for further check.

Hi ricardo.gonzales1

Thank you for your answer.

As some additional Information, in the meantime i have done some more tests to try and solve this myself but have not been successful so far.

I have seen that the pin i initially tried to configure as a wake pin is connected to a level shifter so to be sure this is not a problem i changed pin and i now try to configure the pin B61 “GPIO3_PAA.03” as a wake source.
My configuration is still Input, Int PU, Wake Yes as mentioned in my original post.
I also changed the line in the pmc.c file to “TEGRA_WAKE_GPIO(“power2”, 43, 1, TEGRA234_AON_GPIO(AA, 3)),”

I also changed the file Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/boot/dts/nvidia/tegra234-3737-0000+p3701-0000.dts

I added the following to gpio-keys {}:
test1234 {
label = “Test1234”;
gpios = <&gpio_aon TEGRA234_AON_GPIO(AA, 3) GPIO_ACTIVE_LOW>;
linux,input-type = <EV_KEY>;
//linux,code = <KEY_SLEEP>;
wakeup-event-action = <EV_ACT_ASSERTED>;
wakeup-source;
};
I expected this change to be visible under /sys/kernel/debug/gpio on the target system but it was not so i think i used the wrong dts file for this change?

I added the output of the commands you asked for in the log1.txt file
I added the output from the flash process in the log2.txt file.

log1.txt (59.6 KB)
log2.txt (100.5 KB)

Hi @sevi150,

Thanks for the additional information. By checking your bootloader/generic/BCT/ directory, I notice that your custom pinmux file is Orin-2_pinmux_raiaversuch_wake-pinmux.dtsi, am I right? But by checking the p3701.conf.common file I see that you haven’t modified the PINMUX_CONFIG variable to your custom pinmux. I think that you are modifying it on the p3737-0000-p3701-0000.conf.common instead. Is that right?

Commonly, the modifications made to the conf.common file are based on the module ID of the device. Check the following image to know which number it is:

Based on Jetson FAQ | NVIDIA Developer documentation, I get that for Jetson AGX Orin, the module ID is 3701. Normally, when working with this device, I modify the p3701.conf.common file. Can you check if adding the pinmux changes to this file solves your problems?