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