-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-binding: ti: am65x: document common platform time sync cpts module
Document device tree bindings for TI AM654/J721E SoC The Common Platform Time Sync (CPTS) module. The CPTS module is used to facilitate host control of time sync operations. Main features of CPTS module are: - selection of multiple external clock sources - 64-bit timestamp mode in ns with ppm and nudge adjustment. - control of time sync events via interrupt or polling - hardware timestamp of ext. events (HWx_TS_PUSH) - periodic generator function outputs (TS_GENFx) - PPS in combination with timesync router - Depending on integration it enables compliance with the IEEE 1588-2008 standard for a precision clock synchronization protocol, Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time Measurement (PTM). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Grygorii Strashko
authored and
David S. Miller
committed
May 4, 2020
1 parent
1248dc0
commit 6e87ac7
Showing
2 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/ti,am654-cpts.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: The TI AM654x/J721E Common Platform Time Sync (CPTS) module Device Tree Bindings | ||
|
||
maintainers: | ||
- Grygorii Strashko <grygorii.strashko@ti.com> | ||
- Sekhar Nori <nsekhar@ti.com> | ||
|
||
description: |+ | ||
The TI AM654x/J721E CPTS module is used to facilitate host control of time | ||
sync operations. | ||
Main features of CPTS module are | ||
- selection of multiple external clock sources | ||
- Software control of time sync events via interrupt or polling | ||
- 64-bit timestamp mode in ns with PPM and nudge adjustment. | ||
- hardware timestamp push inputs (HWx_TS_PUSH) | ||
- timestamp counter compare output (TS_COMP) | ||
- timestamp counter bit output (TS_SYNC) | ||
- periodic Generator function outputs (TS_GENFx) | ||
- Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN) | ||
- external hardware timestamp push inputs (HWx_TS_PUSH) timestamping | ||
Depending on integration it enables compliance with the IEEE 1588-2008 | ||
standard for a precision clock synchronization protocol, Ethernet Enhanced | ||
Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time | ||
Measurement (PTM). | ||
TI AM654x/J721E SoCs has several similar CPTS modules integrated into the | ||
different parts of the system which could be synchronized with each other | ||
- Main CPTS | ||
- MCU CPSW CPTS with IEEE 1588-2008 support | ||
- PCIe subsystem CPTS for PTM support | ||
Depending on CPTS module integration and when CPTS is integral part of | ||
another module (MCU CPSW for example) "compatible" and "reg" can | ||
be omitted - parent module is fully responsible for CPTS enabling and | ||
configuration. | ||
properties: | ||
$nodename: | ||
pattern: "^cpts(@.*|-[0-9a-f])*$" | ||
|
||
compatible: | ||
oneOf: | ||
- const: ti,am65-cpts | ||
- const: ti,j721e-cpts | ||
|
||
reg: | ||
maxItems: 1 | ||
description: | ||
The physical base address and size of CPTS IO range | ||
|
||
reg-names: | ||
items: | ||
- const: cpts | ||
|
||
clocks: | ||
description: CPTS reference clock | ||
|
||
clock-names: | ||
items: | ||
- const: cpts | ||
|
||
interrupts-extended: | ||
items: | ||
- description: CPTS events interrupt | ||
|
||
interrupt-names: | ||
items: | ||
- const: "cpts" | ||
|
||
ti,cpts-ext-ts-inputs: | ||
allOf: | ||
- $ref: /schemas/types.yaml#/definitions/uint32 | ||
maximum: 8 | ||
description: | ||
Number of hardware timestamp push inputs (HWx_TS_PUSH) | ||
|
||
ti,cpts-periodic-outputs: | ||
allOf: | ||
- $ref: /schemas/types.yaml#/definitions/uint32 | ||
maximum: 8 | ||
description: | ||
Number of timestamp Generator function outputs (TS_GENFx) | ||
|
||
refclk-mux: | ||
type: object | ||
description: CPTS reference clock multiplexer clock | ||
properties: | ||
'#clock-cells': | ||
const: 0 | ||
|
||
clocks: | ||
maxItems: 8 | ||
|
||
assigned-clocks: | ||
maxItems: 1 | ||
|
||
assigned-clocks-parents: | ||
maxItems: 1 | ||
|
||
required: | ||
- clocks | ||
|
||
required: | ||
- clocks | ||
- clock-names | ||
- interrupts-extended | ||
- interrupt-names | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
cpts@310d0000 { | ||
compatible = "ti,am65-cpts"; | ||
reg = <0x0 0x310d0000 0x0 0x400>; | ||
reg-names = "cpts"; | ||
clocks = <&main_cpts_mux>; | ||
clock-names = "cpts"; | ||
interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-names = "cpts"; | ||
ti,cpts-periodic-outputs = <6>; | ||
ti,cpts-ext-ts-inputs = <8>; | ||
main_cpts_mux: refclk-mux { | ||
#clock-cells = <0>; | ||
clocks = <&k3_clks 118 5>, <&k3_clks 118 11>, | ||
<&k3_clks 157 91>, <&k3_clks 157 77>, | ||
<&k3_clks 157 102>, <&k3_clks 157 80>, | ||
<&k3_clks 120 3>, <&k3_clks 121 3>; | ||
assigned-clocks = <&main_cpts_mux>; | ||
assigned-clock-parents = <&k3_clks 118 11>; | ||
}; | ||
}; | ||
- | | ||
cpts { | ||
clocks = <&k3_clks 18 2>; | ||
clock-names = "cpts"; | ||
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-names = "cpts"; | ||
ti,cpts-ext-ts-inputs = <4>; | ||
ti,cpts-periodic-outputs = <2>; | ||
}; |