Before I file a bug for this, I want to make sure I'm not doing something wrong.
I am trying to enable PPS on GPIO pin PD14 of an Orange Pi PC2. I've enabled the pps-gpio and uart overlays in my /boot/armbianEnv.txt file and rebooted.
root@ntp0:~# cat /boot/armbianEnv.txt
verbosity=1
bootlogo=false
console=both
disp_mode=1920x1080p60
overlay_prefix=sun50i-h5
rootdev=UUID=20dbbd2a-5783-4f98-b467-62fa62990ac8
rootfstype=ext4
overlays=pps-gpio uart1
param_pps_pin=PD14
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
root@ntp0:~#
On reboot I see the following problem in dmesg:
[ 5.542593] pps-gpio pps@0: failed to map GPIO to IRQ: -22
[ 5.542626] pps-gpio: probe of pps@0 failed with error -22
If I 'rmmod/modprobe' the pps-gpio/pps-ldisc modules I see pps0 created:
[ 54.983158] pps pps0: new PPS source serial1
[ 54.983284] pps pps0: source "/dev/ttyS1" added
Yet I am not getting PPS data on pps0 even with the gps locked as measured by cgps/gpsmon.
root@ntp0:~# 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)
time_pps_fetch() error -1 (Connection timed out)
^C
root@ntp0:~#
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqSeen 12/Used 9k
x Time: 2022-04-17T18:35:49.000Z (0) xxGNSS PRN Elev Azim SNR Usex
x Latitude: xx.xxxxxxxx N xxGP 1 1 26.0 49.0 15.0 Y x
x Longitude: yy.yyyyyyyy W xxGP 6 6 23.0 169.0 18.0 Y x
x Alt (HAE, MSL): 6353.675, 6407.480 ft xxGP 13 13 28.0 235.0 18.0 Y x
x Speed: 0.11 mph xxGP 14 14 54.0 72.0 21.0 Y x
x Track (true, var): 332.6, 11.0 deg xxGP 15 15 18.0 270.0 23.0 Y x
x Climb: 0.00 ft/min xxGP 17 17 84.0 23.0 22.0 Y x
x Status: 3D FIX (9 secs) xxGP 19 19 70.0 231.0 21.0 Y x
x Long Err (XDOP, EPX): 0.61, +/- 30.1 ft xxGP 24 24 21.0 314.0 28.0 Y x
x Lat Err (YDOP, EPY): 0.64, +/- 31.6 ft xxGP 30 30 26.0 151.0 16.0 Y x
x Alt Err (VDOP, EPV): 0.81, +/- 61.1 ft xxGP 7 7 2.0 146.0 0.0 N x
x 2D Err (HDOP, CEP): 0.87, +/- 54.2 ft xxGP 21 21 3.0 32.0 0.0 N x
x 3D Err (PDOP, SEP): 1.19, +/- 74.2 ft xxSB134 47 0.0 0.0 0.0 N x
x Time Err (TDOP): 0.88 xx x
x Geo Err (GDOP): 1.87 xx x
x ECEF X, VX: n/a n/a xx x
x ECEF Y, VY: n/a n/a xx x
x ECEF Z, VZ: n/a n/a xx x
x Speed Err (EPS): +/- 43.0 mph xx x
x Track Err (EPD): n/a xx x
x Time offset: 0.551504007 s xx x
x Grid Square: AABBCCDD xx x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
(location/grid square redacted)
Looking at what the kernel thinks it has for gpio pins enabled I see this:
root@ntp0:~# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl:
gpio-20 ( |orangepi:red:status ) out lo
gpio-102 ( |gmac-3v3 ) out hi
gpio-166 ( |cd ) in lo IRQ ACTIVE LOW
gpio-204 ( |usb0_id_det ) in hi IRQ
gpiochip0: GPIOs 352-383, parent: platform/1f02c00.pinctrl, 1f02c00.pinctrl:
gpio-354 ( |usb0-vbus ) out lo
gpio-355 ( |sw4 ) in hi IRQ ACTIVE LOW
gpio-362 ( |orangepi:green:pwr ) out hi
root@ntp0:~#
Is this indeed a case of the pin not being assigned an interrupt or is the pps-gpio IRQ mapping message unrelated to the problem?
Thanks