blob: b1c875325776d484f78c6b748f9429cdbac6e582 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/ti,k3-am654-cpts.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: The TI AM654x/J721E Common Platform Time Sync (CPTS) module
8
9maintainers:
Tom Rini6bb92fc2024-05-20 09:54:58 -060010 - Siddharth Vadapalli <s-vadapalli@ti.com>
11 - Ravi Gunasekaran <r-gunasekaran@ti.com>
12 - Roger Quadros <rogerq@kernel.org>
Tom Rini53633a82024-02-29 12:33:36 -050013
14description: |+
15 The TI AM654x/J721E CPTS module is used to facilitate host control of time
16 sync operations.
17 Main features of CPTS module are
18 - selection of multiple external clock sources
19 - Software control of time sync events via interrupt or polling
20 - 64-bit timestamp mode in ns with PPM and nudge adjustment.
21 - hardware timestamp push inputs (HWx_TS_PUSH)
22 - timestamp counter compare output (TS_COMP)
23 - timestamp counter bit output (TS_SYNC)
24 - periodic Generator function outputs (TS_GENFx)
25 - Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN)
26 - external hardware timestamp push inputs (HWx_TS_PUSH) timestamping
27
28 Depending on integration it enables compliance with the IEEE 1588-2008
29 standard for a precision clock synchronization protocol, Ethernet Enhanced
30 Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time
31 Measurement (PTM).
32
33 TI AM654x/J721E SoCs has several similar CPTS modules integrated into the
34 different parts of the system which could be synchronized with each other
35 - Main CPTS
36 - MCU CPSW CPTS with IEEE 1588-2008 support
37 - PCIe subsystem CPTS for PTM support
38
39 Depending on CPTS module integration and when CPTS is integral part of
40 another module (MCU CPSW for example) "compatible" and "reg" can
41 be omitted - parent module is fully responsible for CPTS enabling and
42 configuration.
43
44properties:
45 $nodename:
46 pattern: "^cpts@[0-9a-f]+$"
47
48 compatible:
49 enum:
50 - ti,am65-cpts
51 - ti,j721e-cpts
52
53 reg:
54 maxItems: 1
55 description:
56 The physical base address and size of CPTS IO range
57
58 reg-names:
59 items:
60 - const: cpts
61
62 clocks:
63 maxItems: 1
64 description: CPTS reference clock
65
66 clock-names:
67 items:
68 - const: cpts
69
70 interrupts:
71 items:
72 - description: CPTS events interrupt
73
74 interrupt-names:
75 items:
76 - const: cpts
77
78 assigned-clock-parents: true
79
80 assigned-clocks: true
81
82 power-domains:
83 maxItems: 1
84
85 ti,cpts-ext-ts-inputs:
86 $ref: /schemas/types.yaml#/definitions/uint32
87 maximum: 8
88 description:
89 Number of hardware timestamp push inputs (HWx_TS_PUSH)
90
91 ti,cpts-periodic-outputs:
92 $ref: /schemas/types.yaml#/definitions/uint32
93 maximum: 8
94 description:
95 Number of timestamp Generator function outputs (TS_GENFx)
96
97 ti,pps:
98 $ref: /schemas/types.yaml#/definitions/uint32-array
99 minItems: 2
100 maxItems: 2
101 description: |
102 The pair of HWx_TS_PUSH input and TS_GENFy output indexes used for
103 PPS events generation. Platform/board specific.
104
105 refclk-mux:
106 type: object
107 additionalProperties: false
108 description: CPTS reference clock multiplexer clock
109 properties:
110 '#clock-cells':
111 const: 0
112
113 clocks:
114 maxItems: 8
115
116 required:
117 - clocks
118
119required:
120 - compatible
121 - reg
122 - clocks
123 - clock-names
124 - interrupts
125 - interrupt-names
126
127additionalProperties: false
128
129examples:
130 - |
131 #include <dt-bindings/interrupt-controller/irq.h>
132 #include <dt-bindings/interrupt-controller/arm-gic.h>
133
134 cpts@310d0000 {
135 compatible = "ti,am65-cpts";
136 reg = <0x310d0000 0x400>;
137 reg-names = "cpts";
138 clocks = <&main_cpts_mux>;
139 clock-names = "cpts";
140 interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>;
141 interrupt-names = "cpts";
142 ti,cpts-periodic-outputs = <6>;
143 ti,cpts-ext-ts-inputs = <8>;
144
145 main_cpts_mux: refclk-mux {
146 #clock-cells = <0>;
147 clocks = <&k3_clks 118 5>, <&k3_clks 118 11>,
148 <&k3_clks 157 91>, <&k3_clks 157 77>,
149 <&k3_clks 157 102>, <&k3_clks 157 80>,
150 <&k3_clks 120 3>, <&k3_clks 121 3>;
151 assigned-clocks = <&main_cpts_mux>;
152 assigned-clock-parents = <&k3_clks 118 11>;
153 };
154 };