Hi chengjingbo,
You can use GPIO as PPS interface.
Here are the steps:
- Enable CONFIG_PPS and CONFIG_PPS_CLIENT_GPIO configs in kernel
- Add Device tree node in kernel dtb anywhere inside dtb like following:
pps {
gpios = <&tegra_aon_gpio TEGRA194_AON_GPIO(AA, 0) GPIO_ACTIVE_LOW>;
compatible = “pps-gpio”;
assert-falling-edge;
status = “okay”;
};
You can choose any GPIO present on 40-pin (J30) for this purpose.
Compile, update dtb and flash system with above changes.
After system boots, you will see sysfs node for PPS.
$ ls /sys/class/pps/pps0/
Whenever interrupt occurs on falling edge of signal, timestamp will be captured and seen using:
cat /sys/class/pps/pps0/assert
If you want events to generate on rising edge of signal then remove assert-falling-edge; property from device node.
Let me know if you need any help.
Thanks,
Shubhi Garg