Configure Hybrid Timing

This chapter configures a node with GNSS and a PTP backhaul using the system CLI. The same instances serve every scenario; Changes per Scenario lists the changes per scenario. All commands are run as an administrator after you source the admin user environment source /etc/platform/openrc.

Note

Interface names (eno8703, eno8503, eno8403, enp108s0f0) and the serial device (/dev/ttyACM0) are examples from a reference system. Identify the right ports on your hardware first (system host-if-list, system host-port-list) and substitute them.

Multi-host systems. Each host is timed independently, from its own GNSS receiver and its own connection to your upstream network grandmaster. Hosts do not synchronize time with one another, and no time relationship exists between them that requires configuration. On a system with more than one such host (for example AIO-DX), repeat the procedure in this chapter on each host, against that host’s own sources. Instance and interface names are unique across the system, so give each host’s instances different names (for example, add a host prefix such as c1-) and use that host’s name in every host-*-assign command. A swact (controller switchover) does not disturb the clock discipline of either host.

Prerequisites

Check the following before you create any instance:

Instance Model

Instance

Service

Interface (name -> port)

Notes

clock0

clock

clock0if1 -> E825 base port; clock0if2 -> E830 port

Configures the SDP pins.

ts1

ts2phc

ts1if1 -> E825 base port

GNSS source; serial device for NMEA. Gearshift channel ts2_0.

ts2

ts2phc

ts2if1 -> E830 port

-s generic: E825 PHC -> E830 PHC. Gearshift channel ts2_1. Omit if there is no E830.

ptp01fh

ptp4l

ptp01fhif1 -> E825 fronthaul port

Fronthaul grandmaster (E825).

ptp02fh

ptp4l

ptp02fhif1 -> E830 port

Fronthaul grandmaster (E830). Omit if there is no E830.

phc1

phc2sys

none

Aligns the system clock with the E825 PHC.

ptp01bh

ptp4l

ptp01bhif1 -> backhaul port

Servoing backhaul client. Gearshift channel ptp_bh.

dpll-mgr1

dpll-mgr

none (a dpll-mgr instance takes no PTP interface)

The manager.

The instance names are your choice, but dpll-mgr1 must reference the backhaul ptp4l instance and the ts2phc instances by name (dpll-mgr Configuration Reference).

Procedure

This procedure builds the node as a PTP boundary clock with GNSS primary and an L2 (G.8275.1) backhaul secondary - scenario A. In the examples the host is controller-0.

  1. Create the clock instance and configure the E825 SDP pins.

    ~(keystone_admin)]$ system ptp-instance-add clock0 clock
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 clock0
    ~(keystone_admin)]$ system ptp-interface-add clock0if1 clock0
    ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp1=input tspll_cfg=timeref_156.25
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8703 clock0if1
    

    sdp1=input receives the GNSS 1PPS into the DPLL; tspll_cfg selects the timing-module reference frequency.

  2. Create the GNSS ts2phc instance.

    ~(keystone_admin)]$ system ptp-instance-add ts1 ts2phc
    ~(keystone_admin)]$ system ptp-instance-parameter-add ts1 ts2phc.nmea_serialport=/dev/ttyACM0
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ts1
    ~(keystone_admin)]$ system ptp-interface-add ts1if1 ts1
    ~(keystone_admin)]$ system ptp-interface-parameter-add ts1if1 ts2phc.channel=1 ts2phc.pin_index=1
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8703 ts1if1
    
  3. Create the E825 fronthaul grandmaster.

    ~(keystone_admin)]$ system ptp-instance-add ptp01fh ptp4l
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01fh domainNumber=24 dataset_comparison=G.8275.x
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01fh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01fh
    ~(keystone_admin)]$ system ptp-interface-add ptp01fhif1 ptp01fh
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8503 ptp01fhif1
    
  4. Create the system-clock synchronization instance.

    ~(keystone_admin)]$ system ptp-instance-add phc1 phc2sys
    ~(keystone_admin)]$ system ptp-instance-parameter-add phc1 domainNumber=24 uds_address=/var/run/ptp4l-ptp01fh cmdline_opts='-w -s eno8703'
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 phc1
    
  5. (Optional) Add the E830.

    If the node has an E830 adapter, give it its own ts2phc instance and fronthaul grandmaster. The ts2 instance uses the generic PHC source, so the E830 PHC follows the E825 PHC the source currently controlling it.

    ~(keystone_admin)]$ system ptp-interface-add clock0if2 clock0
    ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if2 sdp1=input
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 clock0if2
    
    ~(keystone_admin)]$ system ptp-instance-add ts2 ts2phc
    ~(keystone_admin)]$ system ptp-instance-parameter-add ts2 cmdline_opts='-s generic'
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ts2
    ~(keystone_admin)]$ system ptp-interface-add ts2if1 ts2
    ~(keystone_admin)]$ system ptp-interface-parameter-add ts2if1 ts2phc.channel=1 ts2phc.pin_index=1
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 ts2if1
    
    ~(keystone_admin)]$ system ptp-instance-add ptp02fh ptp4l
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp02fh domainNumber=24 dataset_comparison=G.8275.x
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp02fh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp02fh
    ~(keystone_admin)]$ system ptp-interface-add ptp02fhif1 ptp02fh
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 enp108s0f0 ptp02fhif1
    
  6. Create the servoing backhaul and export it on SDP0.

    ~(keystone_admin)]$ system ptp-instance-add ptp01bh ptp4l
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh domainNumber=24 tx_timestamp_timeout=700 clientOnly=1
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh free_running=0 servo_offset_threshold=10 servo_num_offset_values=5 gear=P
    ~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh logAnnounceInterval=-3 logSyncInterval=-4 logMinDelayReqInterval=-4
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01bh
    ~(keystone_admin)]$ system ptp-interface-add ptp01bhif1 ptp01bh
    ~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8403 ptp01bhif1
    
    ~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp0=output period_sdp0=1pps
    
    Parameters to create servoing backhaul

    Parameter

    Why it matters here

    clientOnly=1

    The backhaul instance only receives; it never becomes a grandmaster.

    free_running=0

    The servo is enabled, so the backhaul can discipline the PHC when dpll-mgr drives it.

    servo_offset_threshold=10, servo_num_offset_values=5

    Servo lock criteria (nanoseconds / number of consecutive samples).

    gear=P

    The instance starts parked (monitor-only). From then on dpll-mgr sets the gear.

    logAnnounceInterval=-3, logSyncInterval=-4, logMinDelayReqInterval=-4

    Fast message rates. Use the same values on the upstream grandmaster.

    sdp0=output period_sdp0=1pps (on clock0if1)

    Exports the backhaul-disciplined PHC as a 1PPS on SDP0, which feeds the DPLL pin SDP0_REF0N.

  7. Create and configure the dpll-mgr instance.

    ~(keystone_admin)]$ system ptp-instance-add dpll-mgr1 dpll-mgr
    ~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config phc_interface=eno8703 channel_ptp_bh=ptp01bh channel_ts2_0=ts1 channel_ts2_1=ts2
    ~(keystone_admin)]$ system host-ptp-instance-assign controller-0 dpll-mgr1
    

    --section is a flag; the name=value pairs follow it. You supply only the site-specific values. The system fills in the rest (dpll-mgr Configuration Reference): the UDS sockets for the three channels, the PTP domain (taken from ptp01bh), the GNSS-primary pin priorities, and the holdover tiers (30 / 60 / 240 minutes).

    If the node has no E830, omit channel_ts2_1.

  8. Apply the ptp-instance.

    ~(keystone_admin)]$ system ptp-instance-apply
    

    ptp-instance-apply first validates the dpll-mgr configuration. If a required key is missing or a channel names an instance that does not exist on the host or has the wrong service type, the apply is rejected with a message naming the problem and nothing is pushed to the host (Top Issues in Detail, issue 1).

    Services start in dependency order: ptp4l and ts2phc first, then dpll-mgr and phc2sys. dpll-mgr does not need the upstream grandmaster to start: without one, ptp01bh stays in LISTENING (Gearshift: PARK and DRIVE) and dpll-mgr keeps checking for the grandmaster while GNSS remains the source.

  9. Verify the configuration.

    See Verify the Configuration.

Changes per Scenario

The step-by-step procedure above configures the reference deployment, which is scenario A. The other supported scenarios use the same instances and the same procedure. Each one differs only in the settings listed below:

  • Scenario A: GNSS primary, L2 PTP backhaul secondary. This is the reference configuration, and it needs no changes.

  • Scenario B: GNSS primary, PTS (G.8275.2 unicast) backhaul secondary. Only the backhaul instance changes.

  • Scenario C: PTP backhaul primary, GNSS secondary. Only the dpll-mgr pin priority changes.

Scenario A: GNSS Primary, L2 PTP Backhaul Secondary

This is the configuration in Step-by-Step Procedure (Reference Configuration). No pin-priority keys are needed: the shipped defaults are GNSS-primary.

Scenario B: GNSS Primary, PTS (G.8275.2 Unicast) Backhaul Secondary

Everything is the same as scenario A except the backhaul instance (step to create the servoing backhaul and export it on SDP0 above), which receives PTP over UDPv6 unicast from a configured grandmaster using a unicast master table (see Configure PTP Partial Timing Support). In this example the backhaul uses domain 44:

~(keystone_admin)]$ system ptp-instance-add ptp01bh ptp4l
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section global domainNumber=44 tx_timestamp_timeout=700 clientOnly=1 fault_reset_interval=-2 logAnnounceInterval=-3 logMinDelayReqInterval=-4 logSyncInterval=-4 network_transport=UDPv6
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section global free_running=0 servo_offset_threshold=10 servo_num_offset_values=5 gear=P
~(keystone_admin)]$ system ptp-instance-parameter-add ptp01bh --section unicast_master_table_1 table_id=1 logQueryInterval=1 UDPv6=<grandmaster-address>
~(keystone_admin)]$ system host-ptp-instance-assign controller-0 ptp01bh
~(keystone_admin)]$ system ptp-interface-add ptp01bhif1 ptp01bh
~(keystone_admin)]$ system ptp-interface-parameter-add ptp01bhif1 unicast_master_table=1
~(keystone_admin)]$ system ptp-interface-parameter-add ptp01bhif1 inhibit_announce=1
~(keystone_admin)]$ system host-if-ptp-assign controller-0 eno8403 ptp01bhif1

~(keystone_admin)]$ system ptp-interface-parameter-add clock0if1 sdp0=output period_sdp0=1pps

The dpll-mgr configuration does not change: the PTP domain is derived from the backhaul instance (44 here), so ptp_domain_number is not set.

Scenario C: PTP Backhaul Primary, GNSS Secondary

The instances are identical to scenario A. Add one key to the dpll-mgr configuration so the backhaul pin outranks GNSS on the phase plane see Two DPLL Planes: Frequency and Phase.

~(keystone_admin)]$ system ptp-instance-add dpll-mgr1 dpll-mgr
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config phc_interface=eno8703 channel_ptp_bh=ptp01bh channel_ts2_0=ts1 channel_ts2_1=ts2 dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system host-ptp-instance-assign controller-0 dpll-mgr1
~(keystone_admin)]$ system ptp-instance-apply

Leave dpll0_pin_priority_map at its default: the frequency plane stays on GNSS in both scenarios.

To switch a running system between the two scenarios, change only this key:

# A -> C: make the backhaul primary
~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system ptp-instance-apply

# C -> A: remove the override (reverts to GNSS_REF4P:0, SDP0_REF0N:12)
~(keystone_admin)]$ system ptp-instance-parameter-delete dpll-mgr1 --section config dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0"
~(keystone_admin)]$ system ptp-instance-apply

The apply restarts the PTP services, including dpll-mgr, which reprograms both DPLL devices. A brief HOLDOVER_0 during the re-selection is normal.

dpll-mgr Configuration Reference

Command Surface

dpll-mgr Configuration Commands

Command

Purpose

system ptp-instance-parameter-add <instance> --section config <name=value> ...

Add or replace configuration keys. Re-adding a key replaces its previous value.

system ptp-instance-parameter-delete <instance> --section config <name=value>

Remove a key (by value or by parameter UUID). A key that has a default reverts to it on the next apply.

system ptp-instance-show <instance>

Lists the keys you set.

system ptp-instance-apply

Validates, renders and pushes the configuration, then restarts the PTP services.

The rendered file on the host is /etc/linuxptp/ptpinstance/dpll-mgr-<instance>.json.

dpll-mgr Configuration Keys

dpll-mgr Configuration Keys

Key

Required

Meaning

phc_interface

Yes

The E825 base port whose PHC the DPLL disciplines. Cannot be derived.

channel_ptp_bh

Yes

Name of the backhaul ptp4l instance. The socket /var/run/ptp4l-<name> is derived.

channel_ts2_0

Yes

Name of the GNSS ts2phc instance (/var/run/ts2phc-<name>).

channel_ts2_1

No

Name of the second ts2phc instance, for the E830.

ptp_domain_number

No

Normally derived from the backhaul instance’s domainNumber. Set only to override.

dpll0_pin_priority_map

No

Frequency-plane priorities. Default GNSS_REF4P:0, SDP0_REF0N:15.

dpll1_pin_priority_map

No

Phase-plane priorities (decides the master). Default GNSS_REF4P:0, SDP0_REF0N:12.

ho_0, ho_1, ho_2

No

Holdover tier dwell times in minutes. Defaults 30 / 60 / 240. They only affect when the holdover alarm escalates (Holdover and Alarm Escalation).

Note

The keys that are not listed here are rejected.

Pin Names

A priority map is a comma-separated list of PIN:priority entries, for example "GNSS_REF4P:0, SDP0_REF0N:12". Priorities run from 0 (best) to 14; 15 disconnects the pin. A pin name that the system does not recognize is rejected when you add it, so a typo is caught immediately. This release supports the pins in the table below. You can use the short alias; the stored configuration always contains the canonical name.

Supported DPLL Pins

Pin

Alias

Role

GNSS_REF4P

gnss

GNSS 1PPS (primary GNSS input)

SDP0_REF0N

pps-sdp0

PTP backhaul via SDP0

SDP2_REF0P

pps-sdp2

PTP via SDP2

Verify the Configuration

# Instances and the host assignment
~(keystone_admin)]$ system ptp-instance-list
~(keystone_admin)]$ system host-ptp-instance-list controller-0

# What you set
~(keystone_admin)]$ system ptp-instance-show dpll-mgr1

# On the host
systemctl status dpll-mgr@dpll-mgr1
cat /var/run/dpll_mgr/status.json

A healthy scenario A node shows:

Check

Expected

systemctl status dpll-mgr@dpll-mgr1

active (running)

status.json current_master

GNSS_REF4P

status.json dpll_lock_status

locked_ho_acq (or locked)

status.json in_holdover

false

status.json gearshift

ptp_bh: PARK, ts2_0: DRIVE, ts2_1: DRIVE

Upstream grandmaster clockClass (parent data set of ptp01bh)

6, gmPresent true

Fronthaul clockClass

6

Alarms

No timing alarms (ID 100.119) in fm alarm-list

A healthy scenario C node shows current_master: SDP0_REF0N, gearshift ptp_bh: DRIVE, ts2_0: PARK, ts2_1: DRIVE, ptp01bh port state SLAVE, and the GNSS pin selectable (a healthy standby).

Normal Operating Values

Use these values to tell a healthy node from one that needs attention. The values on your system depend on your environment and network, so use them as a guide to what to expect, not as guarantees.

Note

Values in the tables are results measured in lab testing.

Measurement

Where to read it

Normal value

Backhaul servo offset

master_offset in pmc ... 'GET TIME_STATUS_NP' on ptp01bh

Within 100 ns; about 0 to a few ns once locked

Upstream grandmaster present

gmPresent in the same output

true

Failover from GNSS to the backhaul

current_master in status.json

About 12 s (with a brief HOLDOVER_0)

Return from the backhaul to GNSS

current_master in status.json

About 12 s

Lock to the backhaul after it is restored

current_master in status.json

About 19 s

Entering holdover when both sources are lost

dpll_lock_status in status.json

About 1 s

dpll-mgr decision and gearshift

Sending GEARSHIFT lines in /var/log/user.log

Under 1 ms

Dead GNSS ts2phc detected

dpll-mgr lines in /var/log/user.log

About 10 s

Dead backhaul ptp4l detected

dpll-mgr lines in /var/log/user.log

About 1 minute (up to 75 s)

Alarms and notifications after a transition

fm alarm-list, notifications

Up to 30 to 90 s after the DPLL changes

dpll-mgr resource use

top

About 0.03 % of a CPU core and 14 MB of memory

Looks alarming but is normal:

  • ptp01bh in UNCALIBRATED while GNSS is the active source (the instance is parked).

  • A brief HOLDOVER_0 while the DPLL re-locks during a failover.

  • dpll_lock_status of locked_ho_acq (this is a healthy lock).

  • SDP0_REF0N shown as disconnected on the frequency (eec) side of status.json (Two DPLL Planes: Frequency and Phase).

  • A GNSS signal loss alarm while the node runs on the backhaul.

  • clockClass 135, 165, 7 or 140 on the fronthaul during holdover (clockClass on the Fronthaul).

Check the troubleshooting chapter when:

Monitor and Operate Hybrid Timing shows how to read these values.

Modify or Remove the Configuration

Change a key by adding it again; it replaces the old value. For example, to put the second channel under a different ts2phc instance (ts3 must already exist and be assigned to this host):

~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config channel_ts2_1=ts3
~(keystone_admin)]$ system ptp-instance-apply

To change it back, add the original value in the same way:

~(keystone_admin)]$ system ptp-instance-parameter-add dpll-mgr1 --section config channel_ts2_1=ts2
~(keystone_admin)]$ system ptp-instance-apply

An optional key can also be removed with system ptp-instance-parameter-delete (dpll-mgr Configuration Reference); a key that has a default returns to it.

Remove hybrid timing by unassigning and deleting the instances. See Remove PTP Configurations.