Hi Community,
I connected the PPS pin of the GNSS module to the Jetson Orin Nano Devkit as below :
and configured the device-tree as following :
/ {
pps {
gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(AC, 6) GPIO_ACTIVE_HIGH>;
compatible = "pps-gpio";
status = "okay";
};
};
However, I got the following error :
[ 1.513054] pps_core: LinuxPPS API ver. 1 registered
[ 1.518017] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 4.404332] pps-gpio pps: failed to request PPS GPIO
[ 4.409427] pps-gpio: probe of pps failed with error -22
Should I modify the default configuration of the GPIO09 (currently SFIO) of the 40-pin header for this purpose, please ?
I am using Jetpack-5.1.2
Thanks in advance and best regards,
Khang
Hi khang.l4es,
Could you share the result of the following command on your board?
$ sudo cat /sys/kernel/debug/gpio|grep PAC.06
and also share your configuration for this pin in pinmux spreasheet.
It should be configured as an output GPIO by default.
Hi @KevinFFF ,
Thanks for your prompt reply.
Could you share the result of the following command on your board?
$ sudo cat /sys/kernel/debug/gpio|grep PAC.06
gpio-492 (PAC.06 )
and also share your configuration for this pin in pinmux spreasheet.
I haven’t modified this yet. I used the default of Jetson Orin Devkit (within the Jetpack-5.1.2).
Best Regards,
Khang
Hi @KevinFFF ,
It should be configured as an output GPIO by default.
I referred to the A3 spreadsheets of the Orin Nano/NX pinmux config template and found that the relevant GPIO was configured as input :
How should I modify this to output as per your advice? Should I re-generate the .dtsi files(s) of the Orin Devkit board?
Best Regards,
Khang
khang.l4es:
gpio-492 (PAC.06 )
It seems no other driver using the pin.
Yes, it has been configured as input and should work with PPS signal.
You could check pps_gpio_setup() in pps-gpio.c and debug the reason about why i the pin could not be requested in driver.
Hi @KevinFFF ,
Not sure if it was a problem of dependency order (module loading order), but when I changed the module from built-in to loadable in the kernel’s defconfig :
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
Then it works :
dynim@Orin-Devkit:~$ sudo dmesg | grep pps
[sudo] password for dynim:
[ 1.595449] pps_core: LinuxPPS API ver. 1 registered
[ 1.600411] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 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
Best Regards,
Khang
1 Like