Peios Learn
Documentation

Peios

Peios Peios Kernel Universal Directory Project

Developer Tools

Trail Acta Provium clackatoo CAF GCSL Pekit

Applications

Framewright

Standards and Conventions

Standards and Conventions Peios Specifications
Peios Kernel

Ptp bindings

Single-page view · as markdown

Virtual Machine Clock

Peios Kernel / Hardware and drivers / Device-tree binding reference / Ptp bindings

Schema identifier ($id): "http://devicetree.org/schemas/ptp/amazon,vmclock.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "David Woodhouse <dwmw2@infradead.org>"

The vmclock device provides a precise clock source and allows for accurate timekeeping across live migration and snapshot/restore operations. The full specification of the shared data structure is available at https://uapi-group.org/specifications/specs/vmclock/

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "amazon,vmclock"

reg — required here #

Specifies the shared memory region containing the vmclock_abi structure.

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Interrupt used to notify when the contents of the vmclock_abi structure have been updated.

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
ptp@80000000 {
  compatible = "amazon,vmclock";
  reg = <0x80000000 0x1000>;
  interrupts = <GIC_SPI 36 IRQ_TYPE_EDGE_RISING>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Freescale QorIQ 1588 timer based PTP clock

Peios Kernel / Hardware and drivers / Device-tree binding reference / Ptp bindings

Schema identifier ($id): "http://devicetree.org/schemas/ptp/fsl,ptp.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Frank Li <Frank.Li@nxp.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "fsl,etsec-ptp", "fsl,fman-ptp-timer", "fsl,dpaa2-ptp"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "pci1957,ee02"

Item 2

Exact value (const): "fsl,enetc-ptp"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Maximum number of items (maxItems): 1

fsl,cksel — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Timer reference clock source.

Reference clock source is determined by the value, which is holded in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the value, which will be directly written in those bits, that is why, according to reference manual, the next clock sources can be used:

For eTSEC,
<0> - external high precision timer reference clock (TSEC_TMR_CLK
      input is used for this purpose);
<1> - eTSEC system clock;
<2> - eTSEC1 transmit clock;
<3> - RTC clock input.

For DPAA FMan, <0> - external high precision timer reference clock (TMR_1588_CLK) <1> - MAC system clock (1/2 FMan clock) <2> - reserved <3> - RTC clock oscillator

fsl,tclk-period — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Timer reference clock period in nanoseconds.

fsl,tmr-prsc — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Prescaler, divides the output clock.

fsl,tmr-add — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Frequency compensation value.

fsl,tmr-fiper1 — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Fixed interval period pulse generator.

fsl,tmr-fiper2 — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Fixed interval period pulse generator.

fsl,tmr-fiper3 — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Fixed interval period pulse generator. Supported only on DPAA2 and ENETC hardware.

fsl,max-adj — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Maximum frequency adjustment in parts per billion.

These properties set the operational parameters for the PTP clock. You must choose these carefully for the clock to work right. Here is how to figure good values:

TimerOsc = selected reference clock MHz tclk_period = desired clock period nanoseconds NominalFreq = 1000 / tclk_period MHz FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) tmr_add = ceil(2^32 / FreqDivRatio) OutputClock = NominalFreq / tmr_prsc MHz PulseWidth = 1 / OutputClock microseconds FiperFreq1 = desired frequency in Hz FiperDiv1 = 1000000 * OutputClock / FiperFreq1 tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1

The calculation for tmr_fiper2 is the same as for tmr_fiper1. The driver expects that tmr_fiper1 will be correctly set to produce a 1 Pulse Per Second (PPS) signal, since this will be offered to the PPS subsystem to synchronize the Linux clock.

When this attribute is not used, the IEEE 1588 timer reference clock will use the eTSEC system clock (for Gianfar) or the MAC system clock (for DPAA).

fsl,extts-fifo — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

The presence of this property indicates hardware support for the external trigger stamp FIFO

little-endian — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

The presence of this property indicates the 1588 timer support for the external trigger stamp FIFO. IP block is little-endian mode. The default endian mode is big-endian.

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "fsl,enetc-ptp"

When the condition matches (then) #

Shared schema rule ($ref): /schemas/pci/pci-device.yaml

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>

phc@24e00 {
    compatible = "fsl,etsec-ptp";
    reg = <0x24e00 0xb0>;
    interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
    interrupt-parent = <&ipic>;
    fsl,cksel       = <1>;
    fsl,tclk-period = <10>;
    fsl,tmr-prsc    = <100>;
    fsl,tmr-add     = <0x999999a4>;
    fsl,tmr-fiper1  = <0x3b9ac9f6>;
    fsl,tmr-fiper2  = <0x00018696>;
    fsl,max-adj     = <659999998>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

NXP NETC V4 Timer PTP clock

Peios Kernel / Hardware and drivers / Device-tree binding reference / Ptp bindings

Schema identifier ($id): "http://devicetree.org/schemas/ptp/nxp,ptp-netc.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

NETC V4 Timer provides current time with nanosecond resolution, precise periodic pulse, pulse on timeout (alarm), and time capture on external pulse support. And it supports time synchronization as required for IEEE 1588 and IEEE 802.1AS-2020.

Maintainers (maintainers): "Wei Fang <wei.fang@nxp.com>", "Clark Wang <xiaoning.wang@nxp.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "pci1131,ee02"

reg — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Maximum number of items (maxItems): 1

The reference clock of NETC Timer, can be selected between 3 different clock sources using an integrated hardware mux TMR_CTRL[CK_SEL]. The "ccm" means the reference clock comes from CCM of SoC. The "ext" means the reference clock comes from external IO pins. If not present, indicates that the system clock of NETC IP is selected as the reference clock.

clock-names — not listed as required here #

Allowed values (enum): "ccm", "ext"

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/pci/pci-device.yaml

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

pcie {
    #address-cells = <3>;
    #size-cells = <2>;

    ptp-timer@18,0 {
        compatible = "pci1131,ee02";
        reg = <0x00c000 0 0 0 0>;
        clocks = <&scmi_clk 18>;
        clock-names = "ccm";
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

IDT 82P33 PTP Clock

Peios Kernel / Hardware and drivers / Device-tree binding reference / Ptp bindings

Schema identifier ($id): "http://devicetree.org/schemas/ptp/ptp-idt82p33.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

IDT 82P33XXX Synchronization Management Unit (SMU) based PTP clock

Maintainers (maintainers): "Min Li <min.li.xe@renesas.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "idt,82p33810", "idt,82p33813", "idt,82p33814", "idt,82p33831", "idt,82p33910", "idt,82p33913", "idt,82p33914", "idt,82p33931"

reg — required here #

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c {
    #address-cells = <1>;
    #size-cells = <0>;
    phc@51 {
        compatible = "idt,82p33810";
        reg = <0x51>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

IDT ClockMatrix (TM) PTP Clock

Peios Kernel / Hardware and drivers / Device-tree binding reference / Ptp bindings

Schema identifier ($id): "http://devicetree.org/schemas/ptp/ptp-idtcm.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Vincent Cheng <vincent.cheng.xh@renesas.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "idt,8a34000", "idt,8a34001", "idt,8a34002", "idt,8a34003", "idt,8a34004", "idt,8a34005", "idt,8a34006", "idt,8a34007", "idt,8a34008", "idt,8a34009", "idt,8a34010", "idt,8a34011", "idt,8a34012", "idt,8a34013", "idt,8a34014", "idt,8a34015", "idt,8a34016", "idt,8a34017", "idt,8a34018", "idt,8a34019", "idt,8a34040", "idt,8a34041", "idt,8a34042", "idt,8a34043", "idt,8a34044", "idt,8a34045", "idt,8a34046", "idt,8a34047", "idt,8a34048", "idt,8a34049"

reg — required here #

Maximum number of items (maxItems): 1

I2C slave address of the device.

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c {
    #address-cells = <1>;
    #size-cells = <0>;
    phc@5b {
        compatible = "idt,8a34000";
        reg = <0x5b>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Line 15: For System Synchronizer

Line 26: For Port Synchronizer

Line 37: For Universal Frequency Translator (UFT)

Peios Learn — documentation for Peios software.

Built with Trail.