Failed to request PPS GPIO on Nvidia Jetson Orin Nano Dev board
Issue Overview
Users of the Nvidia Jetson Orin Nano Dev board are experiencing difficulties when attempting to configure and use the Pulse Per Second (PPS) GPIO functionality. The specific problem occurs when connecting a GNSS module’s PPS pin to the Jetson Orin Nano Devkit and configuring the device tree. Users encounter an error message indicating a failure to request the PPS GPIO, which prevents proper functionality of the PPS feature.
The error message appears in the system logs as follows:
[ 4.404332] pps-gpio pps: failed to request PPS GPIO
[ 4.409427] pps-gpio: probe of pps failed with error -22
This issue affects users trying to implement precise timing applications or those requiring accurate synchronization with GPS/GNSS modules.
Possible Causes
-
Incorrect GPIO Configuration: The default configuration of the GPIO pin (GPIO09) on the 40-pin header may not be suitable for PPS functionality.
-
Device Tree Misconfiguration: The device tree overlay might not be correctly set up to enable the PPS GPIO functionality.
-
Kernel Module Loading Order: The order in which kernel modules are loaded could affect the initialization of the PPS GPIO driver.
-
Hardware Connectivity Issues: Improper physical connection between the GNSS module’s PPS pin and the Jetson Orin Nano Devkit could lead to communication failures.
-
Conflicting Driver Usage: Another driver might be attempting to use the same GPIO pin, causing a resource conflict.
Troubleshooting Steps, Solutions & Fixes
-
Verify GPIO Configuration:
- Check the current GPIO configuration using the following command:
sudo cat /sys/kernel/debug/gpio | grep PAC.06
- Ensure that the output shows the correct GPIO (PAC.06) is available.
- Check the current GPIO configuration using the following command:
-
Review Pinmux Configuration:
- Examine the pinmux spreadsheet for the Orin Nano/NX.
- Verify that GPIO09 is configured as an input, which should be suitable for PPS signals.
-
Modify Kernel Configuration:
- Change the PPS GPIO module from built-in to loadable in the kernel’s defconfig file:
diff --git a/kernel/kernel-5.10/arch/arm64/configs/defconfig b/kernel/kernel-5.10/arch/arm64/configs/defconfig index ce9f3e0a7..2c735f855 100644 --- a/kernel/kernel-5.10/arch/arm64/configs/defconfig +++ b/kernel/kernel-5.10/arch/arm64/configs/defconfig @@ -752,7 +752,7 @@ CONFIG_SPI_SPIDEV=m CONFIG_SPI_TLE62X0=m CONFIG_SPMI=m CONFIG_PPS_DEBUG=y -CONFIG_PPS_CLIENT_GPIO=y +CONFIG_PPS_CLIENT_GPIO=m CONFIG_PINCTRL_TEGRA186_DPAUX=y CONFIG_PINCTRL_TEGRA234_DPAUX=y CONFIG_PINCTRL_SINGLE=y
- This change allows the module to be loaded separately, potentially resolving dependency issues.
- Change the PPS GPIO module from built-in to loadable in the kernel’s defconfig file:
-
Rebuild and Flash the Kernel:
- After modifying the kernel configuration, rebuild the kernel and flash it to the Jetson Orin Nano Dev board.
-
Verify PPS Functionality:
- After applying the changes and rebooting, check the system logs for PPS initialization:
sudo dmesg | grep pps
- Look for output similar to:
[ 1.595449] pps_core: LinuxPPS API ver. 1 registered [ 1.600411] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]> [ 13.202710] pps_core: source pps.-1 got cdev (245:0) [ 13.202716] pps pps0: new PPS source pps.-1 [ 13.218508] pps pps0: Registered IRQ 297 as PPS source
- This output indicates successful PPS GPIO initialization.
- After applying the changes and rebooting, check the system logs for PPS initialization:
-
Debug PPS GPIO Setup:
- If issues persist, investigate the
pps_gpio_setup()
function in thepps-gpio.c
file to understand why the pin request is failing.
- If issues persist, investigate the
-
Check for Conflicting Drivers:
- Ensure no other drivers are attempting to use the same GPIO pin.
- Review the device tree and kernel configuration for any potential conflicts.
-
Verify Physical Connections:
- Double-check the wiring between the GNSS module’s PPS pin and the Jetson Orin Nano Devkit.
- Ensure proper grounding and signal integrity.
By following these steps, users should be able to resolve the PPS GPIO request failure on the Nvidia Jetson Orin Nano Dev board and successfully implement PPS functionality for precise timing applications.