PPS IN on AGX Orin Dev Kit 40-pin header

Hello,
I’m trying to read a PPS signal from a DJI drone on our Jetson AGX Orin Dev Kit onboard PC.
I intend to connect this signal to GPIO9, pin 32 of the 40-pin header, gpio-324 (PBB.00). Correct me if these don’t match.

Firstly, I tested 2 different approaches that didn’t seem to work. I was trying to avoid building kernel as I’m not very familiar with it.
I thought I would be able to set this as PPS input from using /opt/nvidia/jetson-io/jetson-io.py script but the terminal UI wouldn’t open. I couldn’t fix this and I’m not sure I would be able to achieve the PPS IN configuration intended with this only.

Then I looked at this post:
Using Nvidia AGX Orin GPIO pins to recieve a PPS signal

My current kernel already seemed to have the right configs for PPS.

$ zcat /proc/config.gz | grep CONFIG_PPS
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set
CONFIG_PPS_CLIENT_KTIMER=y
CONFIG_PPS_CLIENT_LDISC=y
CONFIG_PPS_CLIENT_GPIO=y

So I then thought I could avoid building the whole kernel and just apply a device tree overlay, but I got nowhere with that, too. Is it an option that doesn’t involve building a kernel?

Surrendering to building a new kernel and device tree, I followed this and downloaded the correct public_sources.tbz2 for my OS, synced sources, and edited Linux_for_Tegra/source/public/hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-base.dtsi to add:

	pps: pps_gpio {
		compatible = "pps-gpio";
		gpios = <&tegra_main_gpio 324 1>;
		assert-falling-edge;
		status = "okay";
	};

I’m now stuck, unsure of where to add the kernel config flags and the next steps to build and replace the current device tree with the new one.

I would appreciate any help in achieving this, and I’m sorry if I lack understanding of making changes on the kernel level. Thank you!

Also, my current kernel and OS details are the following:

NVIDIA Jetson AGX Orin Developer Kit
L4T 35.5.0 Ubuntu 20.04.6 LTS
Kernel Version: 5.10.192-tegra

Hi andre,

It should be fine if all the required kernel config for PPS have been enabled.

You have to modify this line to match the PIN32 of 40-pins expansion header in your case.

Please check if the PPS driver has been loaded during boot up through dmesg.

Isn’t tegra_main_gpio 324 correct?

I’ve been trying to apply the overlay, but the Jetson won’t boot with any overlay applied.
I even tried a simple overlay t2_overlay.dts:

/dts-v1/;
 
/ {
    overlay-name = "My Jetson Overlay Example";
    jetson-header-name = "Jetson 40pin Header";
    compatible = "nvidia,p3737-0000+p3701-0000\0nvidia,tegra234\0nvidia,tegra23x";
 
    fragment@0 {
        target-path = "/";
        __overlay__ {
            my-custom-property = "This Is My Overlay";
        };
    };
};

, then
dtc -O dtb -o test_overlay.dtbo -@ t2_overlay.dts
sudo cp test_overlay.dtbo /boot

sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "My Jetson Overlay Example"
Configuration saved to /boot/kernel_tegra234-p3701-0005-p3737-0000-user-custom.dtb.
Reboot system to reconfigure.

Finally, I reboot but it doesn’t boot with the overlay.

I noticed this:

zcat /proc/config.gz | grep CONFIG_OF_OVERLAY
# CONFIG_OF_OVERLAY is not set

Should this be set in order for overlays to work?

Please run the following command on your board and share extracted_proc.dts for further check.

$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.