16e87ac74SGrygorii Strashko# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 26e87ac74SGrygorii Strashko%YAML 1.2 36e87ac74SGrygorii Strashko--- 4b38eb47fSGrygorii Strashko$id: http://devicetree.org/schemas/net/ti,k3-am654-cpts.yaml# 56e87ac74SGrygorii Strashko$schema: http://devicetree.org/meta-schemas/core.yaml# 66e87ac74SGrygorii Strashko 7dd3cb467SAndrew Lunntitle: The TI AM654x/J721E Common Platform Time Sync (CPTS) module 86e87ac74SGrygorii Strashko 96e87ac74SGrygorii Strashkomaintainers: 106e87ac74SGrygorii Strashko - Grygorii Strashko <grygorii.strashko@ti.com> 116e87ac74SGrygorii Strashko - Sekhar Nori <nsekhar@ti.com> 126e87ac74SGrygorii Strashko 136e87ac74SGrygorii Strashkodescription: |+ 146e87ac74SGrygorii Strashko The TI AM654x/J721E CPTS module is used to facilitate host control of time 156e87ac74SGrygorii Strashko sync operations. 166e87ac74SGrygorii Strashko Main features of CPTS module are 176e87ac74SGrygorii Strashko - selection of multiple external clock sources 186e87ac74SGrygorii Strashko - Software control of time sync events via interrupt or polling 196e87ac74SGrygorii Strashko - 64-bit timestamp mode in ns with PPM and nudge adjustment. 206e87ac74SGrygorii Strashko - hardware timestamp push inputs (HWx_TS_PUSH) 216e87ac74SGrygorii Strashko - timestamp counter compare output (TS_COMP) 226e87ac74SGrygorii Strashko - timestamp counter bit output (TS_SYNC) 236e87ac74SGrygorii Strashko - periodic Generator function outputs (TS_GENFx) 246e87ac74SGrygorii Strashko - Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN) 256e87ac74SGrygorii Strashko - external hardware timestamp push inputs (HWx_TS_PUSH) timestamping 266e87ac74SGrygorii Strashko 276e87ac74SGrygorii Strashko Depending on integration it enables compliance with the IEEE 1588-2008 286e87ac74SGrygorii Strashko standard for a precision clock synchronization protocol, Ethernet Enhanced 296e87ac74SGrygorii Strashko Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time 306e87ac74SGrygorii Strashko Measurement (PTM). 316e87ac74SGrygorii Strashko 326e87ac74SGrygorii Strashko TI AM654x/J721E SoCs has several similar CPTS modules integrated into the 336e87ac74SGrygorii Strashko different parts of the system which could be synchronized with each other 346e87ac74SGrygorii Strashko - Main CPTS 356e87ac74SGrygorii Strashko - MCU CPSW CPTS with IEEE 1588-2008 support 366e87ac74SGrygorii Strashko - PCIe subsystem CPTS for PTM support 376e87ac74SGrygorii Strashko 386e87ac74SGrygorii Strashko Depending on CPTS module integration and when CPTS is integral part of 396e87ac74SGrygorii Strashko another module (MCU CPSW for example) "compatible" and "reg" can 406e87ac74SGrygorii Strashko be omitted - parent module is fully responsible for CPTS enabling and 416e87ac74SGrygorii Strashko configuration. 426e87ac74SGrygorii Strashko 436e87ac74SGrygorii Strashkoproperties: 446e87ac74SGrygorii Strashko $nodename: 454786f4a0SGrygorii Strashko pattern: "^cpts@[0-9a-f]+$" 466e87ac74SGrygorii Strashko 476e87ac74SGrygorii Strashko compatible: 481c3ac086SRob Herring enum: 491c3ac086SRob Herring - ti,am65-cpts 501c3ac086SRob Herring - ti,j721e-cpts 516e87ac74SGrygorii Strashko 526e87ac74SGrygorii Strashko reg: 536e87ac74SGrygorii Strashko maxItems: 1 546e87ac74SGrygorii Strashko description: 556e87ac74SGrygorii Strashko The physical base address and size of CPTS IO range 566e87ac74SGrygorii Strashko 576e87ac74SGrygorii Strashko reg-names: 586e87ac74SGrygorii Strashko items: 596e87ac74SGrygorii Strashko - const: cpts 606e87ac74SGrygorii Strashko 616e87ac74SGrygorii Strashko clocks: 620499220dSRob Herring maxItems: 1 636e87ac74SGrygorii Strashko description: CPTS reference clock 646e87ac74SGrygorii Strashko 656e87ac74SGrygorii Strashko clock-names: 666e87ac74SGrygorii Strashko items: 676e87ac74SGrygorii Strashko - const: cpts 686e87ac74SGrygorii Strashko 694786f4a0SGrygorii Strashko interrupts: 706e87ac74SGrygorii Strashko items: 716e87ac74SGrygorii Strashko - description: CPTS events interrupt 726e87ac74SGrygorii Strashko 736e87ac74SGrygorii Strashko interrupt-names: 746e87ac74SGrygorii Strashko items: 754786f4a0SGrygorii Strashko - const: cpts 766e87ac74SGrygorii Strashko 77b3228c74SGrygorii Strashko assigned-clock-parents: true 78b3228c74SGrygorii Strashko 79b3228c74SGrygorii Strashko assigned-clocks: true 80b3228c74SGrygorii Strashko 81b3228c74SGrygorii Strashko power-domains: 82b3228c74SGrygorii Strashko maxItems: 1 83b3228c74SGrygorii Strashko 846e87ac74SGrygorii Strashko ti,cpts-ext-ts-inputs: 85086e9074SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 866e87ac74SGrygorii Strashko maximum: 8 876e87ac74SGrygorii Strashko description: 886e87ac74SGrygorii Strashko Number of hardware timestamp push inputs (HWx_TS_PUSH) 896e87ac74SGrygorii Strashko 906e87ac74SGrygorii Strashko ti,cpts-periodic-outputs: 91086e9074SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 926e87ac74SGrygorii Strashko maximum: 8 936e87ac74SGrygorii Strashko description: 946e87ac74SGrygorii Strashko Number of timestamp Generator function outputs (TS_GENFx) 956e87ac74SGrygorii Strashko 96*2b76af68SGrygorii Strashko ti,pps: 97*2b76af68SGrygorii Strashko $ref: /schemas/types.yaml#/definitions/uint32-array 98*2b76af68SGrygorii Strashko minItems: 2 99*2b76af68SGrygorii Strashko maxItems: 2 100*2b76af68SGrygorii Strashko description: | 101*2b76af68SGrygorii Strashko The pair of HWx_TS_PUSH input and TS_GENFy output indexes used for 102*2b76af68SGrygorii Strashko PPS events generation. Platform/board specific. 103*2b76af68SGrygorii Strashko 1046e87ac74SGrygorii Strashko refclk-mux: 1056e87ac74SGrygorii Strashko type: object 106057062adSRob Herring additionalProperties: false 1076e87ac74SGrygorii Strashko description: CPTS reference clock multiplexer clock 1086e87ac74SGrygorii Strashko properties: 1096e87ac74SGrygorii Strashko '#clock-cells': 1106e87ac74SGrygorii Strashko const: 0 1116e87ac74SGrygorii Strashko 1126e87ac74SGrygorii Strashko clocks: 1136e87ac74SGrygorii Strashko maxItems: 8 1146e87ac74SGrygorii Strashko 1156e87ac74SGrygorii Strashko required: 1166e87ac74SGrygorii Strashko - clocks 1176e87ac74SGrygorii Strashko 1186e87ac74SGrygorii Strashkorequired: 1194786f4a0SGrygorii Strashko - compatible 1204786f4a0SGrygorii Strashko - reg 1216e87ac74SGrygorii Strashko - clocks 1226e87ac74SGrygorii Strashko - clock-names 1234786f4a0SGrygorii Strashko - interrupts 1246e87ac74SGrygorii Strashko - interrupt-names 1256e87ac74SGrygorii Strashko 1266e87ac74SGrygorii StrashkoadditionalProperties: false 1276e87ac74SGrygorii Strashko 1286e87ac74SGrygorii Strashkoexamples: 1296e87ac74SGrygorii Strashko - | 1306e87ac74SGrygorii Strashko #include <dt-bindings/interrupt-controller/irq.h> 1316e87ac74SGrygorii Strashko #include <dt-bindings/interrupt-controller/arm-gic.h> 1326e87ac74SGrygorii Strashko 1336e87ac74SGrygorii Strashko cpts@310d0000 { 1346e87ac74SGrygorii Strashko compatible = "ti,am65-cpts"; 1350db958b6SRob Herring reg = <0x310d0000 0x400>; 1366e87ac74SGrygorii Strashko reg-names = "cpts"; 1376e87ac74SGrygorii Strashko clocks = <&main_cpts_mux>; 1386e87ac74SGrygorii Strashko clock-names = "cpts"; 1396e87ac74SGrygorii Strashko interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>; 1406e87ac74SGrygorii Strashko interrupt-names = "cpts"; 1416e87ac74SGrygorii Strashko ti,cpts-periodic-outputs = <6>; 1426e87ac74SGrygorii Strashko ti,cpts-ext-ts-inputs = <8>; 1436e87ac74SGrygorii Strashko 1446e87ac74SGrygorii Strashko main_cpts_mux: refclk-mux { 1456e87ac74SGrygorii Strashko #clock-cells = <0>; 1466e87ac74SGrygorii Strashko clocks = <&k3_clks 118 5>, <&k3_clks 118 11>, 1476e87ac74SGrygorii Strashko <&k3_clks 157 91>, <&k3_clks 157 77>, 1486e87ac74SGrygorii Strashko <&k3_clks 157 102>, <&k3_clks 157 80>, 1496e87ac74SGrygorii Strashko <&k3_clks 120 3>, <&k3_clks 121 3>; 1506e87ac74SGrygorii Strashko assigned-clocks = <&main_cpts_mux>; 1516e87ac74SGrygorii Strashko assigned-clock-parents = <&k3_clks 118 11>; 1526e87ac74SGrygorii Strashko }; 1536e87ac74SGrygorii Strashko }; 154