How Hybrid Timing Works¶
Overview
Hybrid timing combines two time sources on the same node: a GNSS receiver
and a PTP backhaul from an upstream grandmaster. The dpll-mgr service
selects which source the node follows, using the DPLL input pins.
The diagram below shows how these sources reach the DPLL, how the DPLL disciplines the E825 PHC, and which services act on each clock. The sections that follow explain the pin priorities, the gear states (PARK and DRIVE), and what happens in holdover.
Upstream T-GM or T-BC GNSS satellites
(G.8275.1 or G.8275.2) |
| |
| PTP (backhaul) | antenna
v v
+------------------------------------+ +------------------------------------+
| ptp01bh (ptp4l, backhaul client) | | ts1 (ts2phc, channel ts2_0) |
| gear: PARK or DRIVE (dpll-mgr) | | GNSS time + 1PPS -> E825 PHC |
+----------------+-------------------+ +-----------------+------------------+
| |
| SDP0 1PPS out | GNSS 1PPS
| |
v v
+--------------------------------------------------------------------------------+
| DPLL (ZL3073x): locks to the best valid input pin |
| SDP0_REF0N prio 12 (phase) / 15 (freq) GNSS_REF4P prio 0 |
+--------------------------------------------------------------------------------+
|
| locked source disciplines the E825 PHC
v
+----------------------------+
| E825 PHC |
+----------------------------+
|
+------------------------------+------------------------------+
| | |
v v v
+----------------------+ +------------------------+ +-----------------------+
| ptp01fh | | phc1 (phc2sys) | | ts2 (ts2phc generic) |
| E825 fronthaul GM | | -> system clock | | -> E830 PHC -> |
+----------------------+ +------------------------+ | ptp02fh fronthaul GM |
+-----------------------+
+--------------------------------------------------------------------------------+
| dpll-mgr: reads the DPLL and sets the pin priorities. Sends PARK or DRIVE |
| to ptp01bh and ts1, and always DRIVE to ts2. Tracks holdover and writes |
| /var/run/dpll_mgr/status.json |
+--------------------------------------------------------------------------------+
Figure 1. Sources, the DPLL, and the Services
Both reference signals reach the DPLL as 1PPS inputs on two physical pins:
GNSS_REF4P- the 1PPS from the GNSS receiver.ts2phc(ts1) uses the same receiver to set the E825 PHC time.SDP0_REF0N- the 1PPS that the E825 PHC exports on its SDP0 output after the backhaulptp4lhas set that PHC from the upstream grandmaster. SDP0 is looped back into the DPLL.
dpll-mgr assigns each pin a priority; the DPLL locks to the valid pin
with the best (lowest-numbered) priority and dpll-mgr follows the DPLL’s
choice.
Two DPLL Planes: Frequency and Phase¶
The ZL3073x presents two DPLL devices, and dpll-mgr sets a pin-priority
map on each:
Plane |
Config key |
Controls |
Default map |
|---|---|---|---|
EEC / frequency ( |
|
Which source the frequency follows |
|
PPS / phase ( |
|
Which source the phase (time) follows, and therefore which source is the current master |
|
Reason for two Planes. Frequency and time are two different things to keep correct. GNSS provides both. The PTP backhaul reaches the DPLL as a 1PPS pulse on SDP0, which carries time (phase) but is not a continuous frequency reference. The two planes therefore follow different sources: the frequency plane stays on GNSS and never uses the backhaul, and the phase plane chooses between GNSS and the backhaul.
Which plane decides the master. The master that dpll-mgr reports
(current_master, and the source it follows at failover) is the source the
phase plane (dpll1) is locked to. To make the PTP backhaul the
primary, invert the map on dpll1 and not on “dpll0”:
Scenario |
|
|
Result |
|---|---|---|---|
A and B: GNSS primary |
|
|
GNSS is the master; the backhaul is the standby. |
C: PTP backhaul primary |
|
|
The backhaul is the master; GNSS is the standby; the frequency plane still follows GNSS. |
Priority Numbers
A priority from 0 to 14 ranks the pin: the valid pin with the lowest
number is selected, and a pin with a higher number is still used when it is the
only valid source. 15 is different: it is not “the lowest priority” but a
disconnect. A pin at 15 is removed from the selection entirely, and the
DPLL never locks, even if no other source is available. That is why the
backhaul pin is 15 on the frequency plane. Use 15 only to exclude a
pin.
Important
Inverting the priorities on dpll0 only has no effect on which source is
the master, because the master is decided on dpll1. The symptom is a
node that still reports GNSS_REF4P as the master after you configured
the backhaul as primary (Other Symptoms). Always change dpll1_pin_priority_map.
Gearshift: PARK and DRIVE¶
The E825 PHC can be disciplined by more than one service: ts1 (from
GNSS) and ptp01bh (from the backhaul). Only one of them may adjust it at
a time, so dpll-mgr PARKs the instance that does not follow the active
source and DRIVEs the one that does. It sends each of the three controlled
instances a gear:
DRIVE - the instance disciplines the clock.
PARK - the instance keeps running and tracking, but does not adjust the clock.
State |
|
|
|
|---|---|---|---|
GNSS is the active source |
PARK |
DRIVE |
DRIVE |
Backhaul is the active source |
DRIVE |
PARK |
DRIVE |
Holdover |
PARK |
DRIVE |
DRIVE |
The E830 ts2phc instance (ts2) is never parked: it simply copies
the E825 PHC to the E830 PHC, and the E825 PHC is correct whichever
source is driving it.
This is also what determines the backhaul instance’s PTP port state:
|
Meaning |
|---|---|
|
Locked to the upstream grandmaster at the PTP layer but PARKed (GNSS is the active source, so the servo is held off). This is the normal state while GNSS is primary. |
|
Locked and DRIVE: the backhaul is disciplining the clock. |
|
No upstream grandmaster is present. |
|
The port or link is down. |
Lock States, Holdover, and Liveness¶
dpll-mgr reports the DPLL state in dpll_lock_status:
Value |
Meaning |
|---|---|
|
Healthy. The DPLL is locked to a valid source ( |
|
No valid source. The DPLL is holding the last good frequency and phase. |
|
Not locked (for example during start-up, or after a loss of lock that is not holdover). |
When the DPLL enters holdover, current_master becomes HOLDOVER_0 and
then advances through HOLDOVER_1, HOLDOVER_2, HOLDOVER_3 as time
passes (the holdover tiers,
Holdover and Alarm Escalation).
holdover_level is -1 when not in holdover and 0..``3`` while in it.
dpll-mgr also protects against sources that appear present but are no
longer being maintained. An electrical 1PPS signal can continue to arrive on a
pin even after the service responsible for disciplining it has failed. Without
additional health checks, the DPLL would remain locked to the signal and
continue tracking a reference that is silently degrading.
the GNSS
ts2phcinstance stops or becomes unresponsive (detected within about 10 seconds);the backhaul
ptp4linstance stops or becomes unresponsive (detected within about a minute; about 75 seconds in the worst case);the upstream grandmaster disappears from the backhaul (port in
LISTENING) while the node is locked to the backhaul.
A grandmaster that is present but degraded (for example it has lost its own GNSS and advertises a worse clockClass) is still a valid source: the node stays locked to the backhaul and relays the degraded quality downstream.
clockClass on the Fronthaul¶
The node advertises a clockClass - together with the clock accuracy and variance - to its downstream clients on the fronthaul. The value depends on the source the node is using:
Node state |
clockClass advertised on the fronthaul |
|---|---|
Locked to GNSS |
6 (primary reference). A degraded upstream grandmaster does not change it while GNSS is the active source. |
Locked to the backhaul (healthy) |
The upstream grandmaster’s own clockClass, accuracy and variance, passed on together so the advertised quality is always consistent (normally 6). If the upstream grandmaster degrades but is still present, the degraded class is passed on (for example 7, then 140). |
Holdover |
135 then 165, or 7 then 140, depending on the node’s
configuration and state. The class changes from the first value to the
second when |
Free-running (no source and no stable holdover, never locked, or the instance is stopped), or holdover considered unstable |
248 |
The holdover window can be changed with holdover_seconds
(Operational Controls).