PPS on i.MX6Q IT

I am using a Trimble Mini-T GNSS module which is connected to a custom carrier board with an Apalis iMX6Q module. I am trying to get the PPS from the GNSS to the Apalis module for accurate time. I have added these lines to my device tree

/ {
        ........
        pps {
             compatible = "pps-gpio";
             pinctrl-names = "default";
             pinctrl-0 = <&pinctrl_pps>;
             gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
             status = "okay";
        };
};

&iomuxc {
	pinctrl-names = "default";

        ........

	pinctrl_pps: pps {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x130b0
		>;
	};
};

When i boot the module, it appears that the pps module is being created and assigned… well actually it looks like 3 of them are

root@acu3:~# dmesg |grep pps
[    0.238628] pps_core: LinuxPPS API ver. 1 registered
[    0.238632] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.471134] pps pps0: new PPS source ptp0
[    0.493930] pps_ldisc: PPS line discipline registered
[    0.494529] pps pps1: new PPS source pps.-1
[    0.494761] pps pps1: Registered IRQ 118 as PPS source
[   16.751466] pps pps2: new PPS source IMX-uart4
[   16.751554] pps pps2: source "/dev/ttymxc4" added

The GPS works perfectly using gpsd’s ‘cgps’ and when I scope the PCB trace, I can see the PPS signal so I know that it is reaching the pin. However when I run ‘ppstest’ I get nothing.

root@acu3:~# ppstest /dev/pps1
trying PPS source "/dev/pps1"
found PPS source "/dev/pps1"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
^C
root@acu3:~# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
^C
root@acu3:~# ppstest /dev/pps2
trying PPS source "/dev/pps2"
found PPS source "/dev/pps2"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
^C

Any thoughts as to what the issue might be. I am using ntpd for timing and it isnt working correctly but I feel that is due to the system not recognizing the PPS signal.

Which MXM pin you are using for PPS?

Could you share PPS related changes at kernel config you’ve made ?

@alex.tx the PPS signal is connected to MXM pin 1 (NAND_DATA04, GPIO2_IO4). I have not made any changes to the kernel config.

root@acu3:~# zcat /proc/config.gz | grep PPS
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set
# PPS clients support
# CONFIG_PPS_CLIENT_KTIMER is not set
CONFIG_PPS_CLIENT_LDISC=y
CONFIG_PPS_CLIENT_GPIO=y
# PPS generators support

Do i need to enable these other two PPS config settings?

I’m not familiar with PPS but will try to reproduce your issue using signal generator instead of GPS module. Meanwhile - could you try enable CONFIG_PPS_CLIENT_KTIMER ?

@alex.tx I added CONFIG_PPS_CLIENT_KTIMER to the kernel config and now the ppstest is successful. I will let you know if this also solves the problem with ntpd

Thank you for the update. Please open another ticket if you have ntpd or some other issue.