Issue with Synchronizing Jetson Orin AGX using PPS Signal on GPIO

kernel_tegra234-p3737-0000+p3701-0005-nv.zip (40.9 KB)
extlinux.txt (1.4 KB)
kernel_and_linux_versions.txt (224 Bytes)

We are trying to synchromnize our jetson orin AGX developer kit using GPS and PPS signal. We successfully manage to read GPS from the serial port.
When it comes to pps, we have tried to make an overlay on physical pin number 24 which PZ.06 which is GPIO.484.
We have install nvidia jetpack 6 ver1.

To make this we follow these steps:

1- sudo apt-install pps-tools
2- sudo modprobe pps-gpio
3- make an overlay:

/dts-v1/;
/plugin/;

/ {
overlay-name = “PPS-Pin7”;
jetson-header-name = “Jetson 40pin Header”;
compatible = “nvidia,p3737-0000+p3701-0005”, “nvidia,tegra234”, “nvidia,tegra23x”;

fragment@0 {
    target-path = "/";
    __overlay__ {
        pps_gpio {
            compatible = "pps-gpio";
            gpios  = <&gpio 454 0>;
            assert-falling-edge;
            status = "okay";
        };
    };
};

};

Compile the over lay using:

dtc -O dtb -o pps-overlay.dtbo -@ pps-overlay.dts

Copy to root:

sudo cp pps-overlay.dtbo /boot

we run the following scripts:
sudo /opt/nvidia/jetson-io/config-by-hardware.py -l

our overlay appears there.

After that when we run the following script:
sudo /opt/nvidia/jetson-io/config-by-hardware.py -n “PPS Overlay”

reboot the system.

After following all the steps, the overlay appears in the extlinux.conf.

Under the /dev we only have /dev/pps0 which is ktimer and there is no /dev/pps1.

When we use sudo ppstest /dev/pps0 we can just see the pps source from ktimer, not GPIO physical pin number 7.

Attached please find the kernel, and extlinux.conf and Linux and kernel versions info.

Then why are you writing 454 in your DTS overlay?
Also, is there any reason you have to do it as an overlay instead of integrate it into the kernel DTS?

1- Sorry it was PQ.06 which is pin 7 according to the pinmux. And PQ.06 is the GPIO 454 after running sudo cat /sys/kernel/debug/gpio. Could you please modify the overlay (including phandle, and pin number) based on this pin number?

2- Can you share some resources how to integrate pin number 7 into the kernel DTS?

There is a great amount of forums posts discussing PPS GPIO. Read them first.

  1. There is no need of making an overlay. Please directly add it into the main kernel DTB.
    Do it either in the kernel source code, or decompile the .dtb file you are using into .dts.
  2. Make sure all required kernel configs are enabled.

I have followed most of the instructions from the forum.

Do you mean we need to decompile kernel_tegra234-p3737-0000+p3701-0005-nv.dtb (which is located in the /boot directory) to a .dts file using the following command?

bash Copy code

dtc -I dtb -O dts -o kernel_tegra234-p3737-0000+p3701-0005-nv.dts /boot/kernel_tegra234-p3737-0000+p3701-0005-nv.dtb

Then, we should add the following section to the .dts file (could you pleae where exactly to add the section):

pps {

gpios = <&gpio TEGRA234_MAIN_GPIO(PQ, 6) GPIO_ACTIVE_HIGH>;

compatible = "pps-gpio";

status = "okay";

};

After modifying the .dts file, we need to compile it back to a .dtb file using:

dtc -I dts -O dtb -o kernel_tegra234-p3737-0000+p3701-0005-nv.dtb kernel_tegra234-p3737-0000+p3701-0005-nv.dts

Finally, replace the existing .dtb file in the /boot directory with the newly compiled one.

Do I need to change extlinux.config?

This won’t work with dtc because it does not know what TEGRA234_MAIN_GPIO(PQ, 6) is.
Add that code into :
Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/tegra234.dtsi for JetPack 6.
Linux_for_Tegra/source/public/hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-base.dtsi for JetPack 5.
Then compile it to get the final kernel DTB.

NO.

I could not find the .dtsi file in the

Unfortunately I could not find any .dtsi file inside of the jetson after installation JetPack6.

Do you mean we need to find it in the host machine? In the host machine under the path you mentioned I have the following file and there is no hardware folder in source.

Get the source code, please.
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/sources/public_sources.tbz2

"We have included the following clause in the path you mentioned:

pps {
    gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(PQ, 6) GPIO_ACTIVE_HIGH>;
    compatible = "pps-gpio";
    status = "okay";
};

You can see the location of the clause inside “tegra234-soc-base.dtsi” in the image.

After compiling the kernel, we encountered the following syntax error:

Error: ~/Documents/raw_materials/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/source/kernel/kernel-5.10/../../hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-base.dtsi:73.20-21 syntax error
FATAL ERROR: Unable to parse input tree

Could you please let us know how to resolve this error for Physical Pin 7 for Ubuntu 20 and JetPack 5.1.3?"

Which line of the source code is throwing the error?
I don’t see such information from your screenshot.

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