*** Please note that this reply is generated by LLM automatically ***
To configure a GPIO pin as a wake-up trigger in Jetson Orin Nano, you need to follow a series of steps. Here’s a comprehensive guide to help you achieve this:
Step 1: Identify the GPIO pin
First, you need to identify the GPIO pin you want to use as a wake-up trigger. In your case, you mentioned using a GPIO pin in the 40-pin header. You can refer to the Jetson Orin NX Series and Jetson Orin Nano Series Pinmux table (available on the NVIDIA website) to find the pin details.
For example, let’s say you want to use SOC_GPIO08, which is GPIO3_PB.00.
Step 2: Calculate the GPIO number
To calculate the GPIO number, you need to use the following formula:
base + port_offset + pin_offset
In this case, the base is 348 (mentioned in the kernel boot log), the port_offset for port B is 8, and the pin_offset is 0. Therefore, the GPIO number is:
348 + 8 + 0 = 356
Step 3: Verify the GPIO number using debugfs
You can verify the GPIO number using debugfs. Run the following command:
cat /sys/kernel/debug/gpio | grep PB.00
This should output the GPIO number, which should match the calculated value (gpio-356).
Step 4: Configure the pinmux
To use the GPIO pin as a wake-up trigger, you need to configure the pinmux. You can do this by downloading the Orin Series Pinmux spreadsheet from the NVIDIA website and customizing it according to your needs.
Make sure to set the Pin Direction to Bidirectional and disable the E_IO_HV field in the corresponding pinmux register. You can also disable the 3.3V Tolerance Enable field in the pinmux spreadsheet.
Step 5: Generate the DT files
After customizing the pinmux spreadsheet, click Generate DT File to generate the following files:
- pinmux.dtsi
- gpio.dtsi
- padvoltage.dtsi
Step 6: Copy the DT files
Copy the pinmux.dtsi file to the <l4t_top>/bootloader/generic/BCT/ directory, and copy the gpio.dtsi file to the <l4t_top>/bootloader/ directory.
Step 7: Update the kernel
To update the kernel, you need to reflash the board with the updated pinmux file. However, you mentioned that your custom changes to the pmcc file are getting overwritten. To avoid this, you can try the following:
- Instead of editing the pmcc file directly, create a new file with your custom changes and include it in the kernel build process.
- Use a kernel patch to apply your custom changes to the pmcc file.
By following these steps, you should be able to configure a GPIO pin as a wake-up trigger in Jetson Orin Nano.
Comparison with the original guide
The original guide you mentioned provides a general overview of the process, but it doesn’t provide detailed instructions for configuring a GPIO pin as a wake-up trigger. The steps outlined above provide a more comprehensive guide to help you achieve this.
Additionally, the original guide mentions editing the pmcc file directly, which can lead to your custom changes being overwritten. The approach outlined above avoids this issue by creating a new file with custom changes and including it in the kernel build process.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***