Jetson xavier nx PPS support

I have a jetson xavier nx with jetpack 5.1 and I followed here to config: AGX Xavier PPS fetch timeout R35.2.1(R32.7.1 works fine) and here: Enabling PPS on Xavier AGX - #5 by aspen.eyers I got the /dev/pps1 I set it like:
/dts-v1/;
/plugin/;

/ {
overlay-name = “Jetson PPS”;
compatible = “p3509-0000+3668-0000”;

fragment {
    target-path = "/";
    __overlay__ {
                    pps: pps_gpio {
                            compatible = "pps-gpio";
                            gpios = <&tegra_main_gpio 157 1>;
                            assert-falling-edge;
                            status = "okay";
                    };
    };
};

};
However, I heard that Jetpack 5.1 was different. I got /dev/pps1 and I set here: gpios = <&tegra_main_gpio 157 1>; 157 was for pin12 on the J12. But when I connect pin 12 with PPS source and use ppstest there was no PPS source available. Do you know what is the problem? Thx

Hi yu.lan,

Are you using the devkit or custom board for Xavier NX?

It seems to be 149 for PT.15(PIN12 of J12)
Please try using 149 instead of 157 in your device tree.

Hi, many thanks for your help! I used devkit for xavier nx. However I changed into 149 but it did not help, I had pps1 and connect to ublox but no pps come to jetson.

I used the cat /sys/kernel/debug/gpio to check and I found mine here:


it is gpio 454.

However when I checked the pinmux:


and use:cat /sys/kernel/debug/gpio | grep PT.05 I noticed that the gpio is 462.I2S0_SCLK
in J12 is pin12 is I got it right.
And in the ppstest I can only see:
image

Do you have any idea here? Thx!

Which GPIO are you connecting from HW?
PS.05 or PT.05?

From your current screenshot, pps_gpio is configured as 157 or 149 in device tree?

I connetced PT.0.5 here:


The pin12 is the I2S0_SCLK:

I currently configured 157. I tried 149 but it did not help. Do you have any idea or if I did something wrong?

Okay, 157 should be the correct value in your case for PT.05.
Please share the result of the following command on your board.

$ cat /sys/kernel/debug/gpio|grep pps_gpio

I would also like to check the full dmesg.

The output is like this:

And another question I need to mention here was I did not convert Pinmux here:Jetson Module Adaptation and Bring-Up: Jetson Xavier NX Series — Jetson Linux<br/>Developer Guide 34.1 documentation into cfg file, do you think should I do that?

I also tried this:


But I got the error:
image
Is it still possible for me to just overwrite the device tree instead of reflashing the system again?

I have made some progress toward my goal, as I am sometimes able to obtain the PPS signal, but other times I cannot obtain PPS1. I suspect it might be an issue with my level settings. Additionally, when my GNSS receiver is connected to the Jetson, the PPS signal does not show up on my GNSS receiver. Could this be a level issue?

Maybe you should use the phandle value of tegra_main_gio instead of &tegra_main_gpio here.

It is expected since dtb would not know the macro. 157 should be okay in your case for PT.05.

What issue did you hit during converting pinmux dts to cfg?

Could you elaborate on this? Do you mean that the PPS works as expected if you disconnect it from Jetson?

Hi:

Many thanks for your help!
I tried what you told me: use the phandle value of tegra_main_gio instead of &tegra_main_gpiohere but I still got the error of syntax.
For the pimux actually I did not really know if I need to convert into cfg? I did not do this before and I did not know if the problem was from here. Only connect the PPS source and jetson then the pps1 can have few PPS received but most time it did not receive the PPS, I did not know if there is some thing I have to do for the logical electrical level like: GPIO_ACTIVE_HIGH, but when I overlayed the device tree I could not write like this:


it will give me syntax error:
image

I want to mention after reflashing I did not have pps1, only when I overlay the device tree then I will have pps1 but I can only set it like this:
image

And this the export of the PPS in /dev/pps1 port:


I noticed when I reconnect the PPS source and Jetson there will be several PPS siganls occurred at the same time, but then come back to timeout status, I did not know the reason here.

For Xavier series, you have to convert dts to cfg to apply the change for pinmux.
You can refer to <Linux_for_Tegra>/kernel/pinmux/t19x/README.txt for detailed steps.

You should use only HEX value in the overlay dts or you can not convert it to dtb.

Do you mean PPS may work sometimes? Or it may fail with timed out error?

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