-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TimeHAT V2 Pi 5 HAT from OCP-TAP #674
Comments
I was sent two of these (along with an M.2 u-blox ZED-F9T-00B-01 module, capable of high-accuracy GPS reception. I hope to get this set up as a time server in my rack soon—maybe I can also work with Masterclock to set up a nice time display as well? |
lol, how apropos ShortCircuit just posted a video on the Open Timecard Mini today. |
Just booted a new Pi OS install, but for some reason the card is not showing up when I run |
Following along with #606 (where we were debugging issues with the i225-V adapter), I've done the following:
After a reboot, I still see:
(This is also with |
Aha! I was using the little Pineboards FFC with the arrow on the GPIO side of the connection (mostly because I saw there was a tiny triangle on that side of the connector on the HAT, and I love matching triangles: (In the photo above I just placed the cable atop the other one in the orientation I had it.) I spun the cable around (did a 180) so the triangle is on the other side: After booting up, now I see the card:
|
...surprisingly, it looks like the Intel IGC driver is already present?
And it's giving me 2.5 Gbps full duplex:
|
In dmesg, I see the following when I connect a cable:
But I don't get an IP address assigned:
The interface appears in
|
Exploring PTP a bit:
Red Hat has some decent docs on Configuring PTP using |
To configure PPS signals from the NIC, I should be able to use the
|
I tested the other HAT that was shipped (both have a little EEPROM for the NIC that maybe dictates how DHCP works. It also doesn't retrieve an IPv4 address over DHCP, so I instead set a static IP.
Now the NIC is getting the IP I set:
But I can't actively use that network connection—it just times out if I unplug the main Pi NIC. I may try recompiling the kernel with the latest i226-V driver... |
Regarding the u-blox: It should be accessible via
(Except I'm not seeing Checking with
I used After rebooting, I'm getting GPS module data over serial!
I'm getting NMEA messages, but right now I'm connected to an antenna inside my studio, which is probably not going to get a signal. Need to find a window somewhere, heh. |
Looking around at GPS antenna and cabling guidelines, the first DDG result was from Masterclock! GPS Antenna & Cable Information. They recommend four standardized antenna options. |
Just noting PTP works out of the box on CM5 (no HAT required ;)
And testing with
|
mDNS doesn't seem to be working on the i226 interface by default either, but possibly just because that interface isn't working in general, heh... The configuration currently:
|
After seeing Connection loss with Intel Ethernet Controller I226-V, I added I tried disabling WiFi with |
Well that's fun... after reading through various forum topics about the i226-V, I found many people had connection issues (often flaky, some resolved by disabling ASPM, others not...), and since that didn't help for me, I tried the next option: Plugging the Pi into a 1 Gbps port instead of 2.5 Gbps. And now it's working perfectly—even both LEDs on the connector (green for activity and amber for connection) are lit up now. So... some weird bug in You can force a speed for an interface with:
(Thanks to this guide for the connection speed instructions.) This results in the following configuration:
|
Oddly, when I plug it into a 2.5 Gbps port again, I get:
However,
And I'm not getting packets through it (with the same single orange light on the port). Of course... now that I look closely in
And searching for that turns up this gem of a thread: i225 - IGC linux kernel Driver - Force Speed and duplex not supported, in which Intel support reps keep trying to pass the buck on an obvious driver shortcoming, resulting in:
That's about how I feel too haha. It seems like the |
Visualizing some GPS data...
Ah, I had
And
|
@ahmadexp recommended using the PHC (Physical Hardware Clock) of the i226 for the source, and then use Chronyd for NTP server. That way the NIC's PHC would be the source for both PTP and NTP. And though some references to i225/i226 indicate it can't do PPS out, this Intel community post shows it working on i225-T1, so I think it's a matter of the documentation lacking, rather than hardware. Also, tons of cards don't expose the pins at all, so that's also an issue :) But on there:
On my Pi setup, the i226 is
Then I can configure
I'm not sure if I can configure both on separate pins, but I may test that later. This is all using OCP |
Setting up Chrony, first just checking on current system time:
Install and configure Chrony:
The chrony config is in Need to allow clients to request sync from the server, so add the local IP range to a separate config file
Exploring the default configuration:
I am trying to figure out how to get Chrony to use the PHC from the NIC now... see Does chrony support PTP? and How can I avoid using wrong PHC refclock?. Edit: Ah, found Server using reference clock on NIC. Jotting down the configuration I'm testing here:
I think I should add my config into I at least know the time serving portion of Chrony is working well. From another Pi on the network, via WiFi (since
|
Going to test with the following inside
After a restart (
However, the date being returned is a bit off... comparing to Debian NTP server:
|
Exploring syncing the system clock...
There's a nice LinuxPTP guide on an audiophile forum that spells things out in some detail:
But to get
Now I'm just wondering - how do I set the PHC0 time from NMEA, so it's the correct source of truth? |
This comment was marked as outdated.
This comment was marked as outdated.
Okay, after a nice discussion with @leoleovich, I realized I was kind of looking at things the wrong way. My overall architecture should be:
So NTP clients will get their time served through If I wanted to configure
|
After allowing things to run a while, it looks like the GPS signal is "x", for "may be in error". Need to check on why. It could be reflections since the antenna is currently inside my building (though getting a 3D position lock... which moves around lol).
Also working on automating setup in an Ansible playbook now. I'd like to make this Pi able to be replaced in a moment, just by running the playbook. |
Now that I have the time server working—mostly—I'm putting all the configuration in an Ansible playbook: https://github.com/geerlingguy/time-pi I'll be working more on the software side there, and if there are any other hardware notes, I'll drop them in this issue. |
OCP-TAP has announced the TimeHAT V2, a Pi 5 HAT that embeds an Intel i226 NIC along with a B-key M.2 slot for cards like GPS/GNSS adapters.
The M.2 slot routes the PPS signal straight to the i226 input, for GPS time synchronization.
The two SMA connectors on the HAT can be configured for PPS in/out (IIRC the Pi 5 only has one PPS pin on it's built-in 1 Gbps NIC, but it is not exposed externally).
The preliminary schematics are available on the OCP-TAP GitHub here, and I have asked if they're considering selling units (or working with someone else to do so), and it sounds like this is a possibility!
From the LinkedIn post at the top of this issue, they also showed a demo of < 10ns sync using PTP with ptp4l:
See related: https://pipci.jeffgeerling.com/hats/ocp-tap-timehat.html / #619
Setup Instructions
Note: Still working on getting this running 100%, but here's how to get all the interfaces going for now:
First, add the following lines at the end of
/boot/firmware/config.txt
:Then, make sure you remove the part
console=serial0,115200
from/boot/firmware/cmdline.txt
so the u-blox GPS can use/dev/ttyAMA0
for it's serial output.Also, if you are on an older Pi OS or firmware, run
sudo apt update && sudo apt full-upgrade
, or consider runningsudo rpi-update
to get everything to the latest cutting edge releases.To get the I226-LM NIC working, make sure it's plugged into the Pi's PCIe FFC connection properly, and check if it's recognized with
lspci
:Check if it gets a connection with
ethtool eth1
:If you're having trouble with DHCP, you may need to configure a manual IP address, using
nmtui
. I've also found that 2.5 Gbps connections don't work at all, and you can't force 1 Gbps speeds on a 2.5 Gbps connection with theigb
driver that ships in Pi OS's kernel, so right now I just make sure I only plug in the HAT's Ethernet port to 1 Gbps ports on my switch.Install GPS software to work with the GPS modem:
Configure gpsd and NTPsec to sync via PPS. (TODO)
The text was updated successfully, but these errors were encountered: