Add PPS signal to device tree in Nano

I am trying to add a pps signal to the nano in order to keep accurate time. Ive seen the instructions on how to recompile the kernel from scratch, but I think the pps code is already in the kernel? I dont see anything in /dev/. Do I just need to add something in a device tree overly somewhere? If so, how do I do that? Output below

uname -a
Linux robot 4.9.201-tegra #1 SMP PREEMPT Fri Jan 15 14:41:02 PST 2021 aarch64 aarch64 aarch64 GNU/Linux

gunzip < /proc/config.gz | grep PPS
# PPS support
CONFIG_PPS=y
CONFIG_PPS_DEBUG=y
# PPS clients support
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
CONFIG_PPS_CLIENT_GPIO=y
# PPS generators support  

Have a reference to this relative topic.

Ive seen those threads, but they are involve recompiling the kernel. The config PPS flags are already set in the default kernel, so why does it need to be recompiled?

I have recently build a kernel with PPS enabled, this is the patch for tegra_defconfig:

--- a/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
+++ b/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
@@ -682,8 +682,10 @@ CONFIG_BATTERY_BQ27XXX=y
 CONFIG_GPIO_TACHOMETER=y
 CONFIG_GENERIC_PWM_TACHOMETER=y
 CONFIG_PPS=y
-CONFIG_PPS_DEBUG=y
+CONFIG_PPS_DEBUG=n
 CONFIG_PPS_CLIENT_GPIO=y
+CONFIG_PPS_CLIENT_KTIMER=y
+CONFIG_PPS_CLIENT_LDISC=y
 CONFIG_THERMAL=y
 CONFIG_THERMAL_WRITABLE_TRIPS=y
 CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y

As you can see, some additional options need to be enabled. I disabled PPS_DEBUG otherwise it will spam in dmesg which is usually not desirable. And the following needs to be added to the device tree:

--- a/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
+++ b/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base.dtsi
@@ -2567,4 +2567,10 @@
 			#extcon-cells = <1>;
 		};
 	};
+
+	pps {
+		gpios = <&gpio TEGRA_GPIO(B, 7) 0>;
+		compatible = "pps-gpio";
+		status = "okay";
+	};
 };

I have deb files with the L4T kernel with PPS enabled, I can share them tomorrow if you want, but my packages require JP 4.5 and may not work on lower versions.

If you use lower JP or prefer to compile yourself, you can apply the patches above and it should work. If you are unsure how to do this, this article describes how to enable PPS, compile the kernel and test it. If everything done correctly, in /dev/ pps0 and pps1 should be present.

Ok thanks, I will try this.