The issue with creating a dtb overlay is that you’ll have to convert the TEGRA_GPIO macro yourself because it’s normally parsed by the kernel build dtb generation process. To convert it, look at kernel-4.9/include/dt-bindings/gpio/tegra-gpio.h. Find the number associated to the GPIO letter, 16 for Q in this case, multiply it by 8, then add the GPIO number, 5 for a result of 133. Now you need to replace GPIO_ACTIVE_LOW by “1”.
So the line becomes…
gpio = <&gpio 133 1>;
So now an overlay source file should look like this…
/dts-v1/;
/plugin/;
/ {
overlay-name = "PPS Overlay";
compatible = "nvidia,p3509-0000+p3668-0000";
fragment@pps {
target-path = "/";
__overlay__ {
pps {
gpio = <&gpio 133 1>;
compatible = “pps-gpio”;
assert-falling-edge;
status = “okay”;
};
};
};
};
Once you have that file, follow the instructions in the L4T documentation to enable it…
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fhw_setup_jetson_io.html%23wwpID0E0EB0HA
I haven’t tried these exact steps yet but I will later today.