All you need is the “dtc” package to de/-compile the existing dtb on the /boot partition.
I modified it (Release 5.x.x) this way:
--- armada-385-turris-omnia-phy.dts 2020-06-08 13:39:12.603583058 +0200
+++ armada-385-turris-omnia-phy-pps.dts 2020-06-08 13:44:53.589760925 +0200
@@ -466,6 +466,8 @@
#interrupt-cells = <0x02>;
interrupts = <0x00 0x35 0x04 0x00 0x36 0x04 0x00 0x37 0x04 0x00 0x38 0x04>;
clocks = <0x04 0x00>;
+ linux,phandle = <0x1e>;
+ phandle = <0x1e>;
};
gpio@18140 {
@@ -1055,4 +1057,11 @@
los-gpios = <0x1d 0x03 0x00>;
mod-def0-gpios = <0x1d 0x04 0x01>;
};
+
+ pps@18 {
+ gpios = <0x1e 0x12 0x0>;
+ compatible = "pps-gpio";
+ status = "okay";
+ };
+
};
As you can see I’m using GPIO18 (Pin1: https://wiki.turris.cz/doc/_media/omnia-pinout.png)
Works great with my uputronics uBLOX MAX-M8Q.
I use gpsd+chrony to discipline the clock. Keep an eye on the default busybox/sysntpd which gets reactivated with every update and conflicts with chronyd.
For chronyd I use
refclock SHM 0 poll 3 refid UBLX offset 0.2 noselect
refclock PPS /dev/pps0 lock UBLX refid GPS
in chrony.conf.
gspd is running with
/usr/sbin/gpsd -N -n -S 2947 /dev/ttyS1 /dev/pps0
Since I use this since Turris OS 3.x I’m currently not sure if I modified the init script or if it’s the default from OS 5 to handle /etc/config/gpsd with
config gpsd 'core'
option enabled '1'
option device '/dev/ttyS1'
option ppsdev '/dev/pps0'
option port '2947'
option listen_globally '0'
accordingly.