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 76e87ac74SGrygorii Strashkotitle: The TI AM654x/J721E Common Platform Time Sync (CPTS) module Device Tree Bindings 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: 486e87ac74SGrygorii Strashko oneOf: 496e87ac74SGrygorii Strashko - const: ti,am65-cpts 506e87ac74SGrygorii Strashko - const: 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: 626e87ac74SGrygorii Strashko description: CPTS reference clock 636e87ac74SGrygorii Strashko 646e87ac74SGrygorii Strashko clock-names: 656e87ac74SGrygorii Strashko items: 666e87ac74SGrygorii Strashko - const: cpts 676e87ac74SGrygorii Strashko 684786f4a0SGrygorii Strashko interrupts: 696e87ac74SGrygorii Strashko items: 706e87ac74SGrygorii Strashko - description: CPTS events interrupt 716e87ac74SGrygorii Strashko 726e87ac74SGrygorii Strashko interrupt-names: 736e87ac74SGrygorii Strashko items: 744786f4a0SGrygorii Strashko - const: cpts 756e87ac74SGrygorii Strashko 76*b3228c74SGrygorii Strashko assigned-clock-parents: true 77*b3228c74SGrygorii Strashko 78*b3228c74SGrygorii Strashko assigned-clocks: true 79*b3228c74SGrygorii Strashko 80*b3228c74SGrygorii Strashko power-domains: 81*b3228c74SGrygorii Strashko maxItems: 1 82*b3228c74SGrygorii Strashko 836e87ac74SGrygorii Strashko ti,cpts-ext-ts-inputs: 84086e9074SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 856e87ac74SGrygorii Strashko maximum: 8 866e87ac74SGrygorii Strashko description: 876e87ac74SGrygorii Strashko Number of hardware timestamp push inputs (HWx_TS_PUSH) 886e87ac74SGrygorii Strashko 896e87ac74SGrygorii Strashko ti,cpts-periodic-outputs: 90086e9074SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 916e87ac74SGrygorii Strashko maximum: 8 926e87ac74SGrygorii Strashko description: 936e87ac74SGrygorii Strashko Number of timestamp Generator function outputs (TS_GENFx) 946e87ac74SGrygorii Strashko 956e87ac74SGrygorii Strashko refclk-mux: 966e87ac74SGrygorii Strashko type: object 976e87ac74SGrygorii Strashko description: CPTS reference clock multiplexer clock 986e87ac74SGrygorii Strashko properties: 996e87ac74SGrygorii Strashko '#clock-cells': 1006e87ac74SGrygorii Strashko const: 0 1016e87ac74SGrygorii Strashko 1026e87ac74SGrygorii Strashko clocks: 1036e87ac74SGrygorii Strashko maxItems: 8 1046e87ac74SGrygorii Strashko 1056e87ac74SGrygorii Strashko assigned-clocks: 1066e87ac74SGrygorii Strashko maxItems: 1 1076e87ac74SGrygorii Strashko 1086e87ac74SGrygorii Strashko assigned-clocks-parents: 1096e87ac74SGrygorii Strashko maxItems: 1 1106e87ac74SGrygorii Strashko 1116e87ac74SGrygorii Strashko required: 1126e87ac74SGrygorii Strashko - clocks 1136e87ac74SGrygorii Strashko 1146e87ac74SGrygorii Strashkorequired: 1154786f4a0SGrygorii Strashko - compatible 1164786f4a0SGrygorii Strashko - reg 1176e87ac74SGrygorii Strashko - clocks 1186e87ac74SGrygorii Strashko - clock-names 1194786f4a0SGrygorii Strashko - interrupts 1206e87ac74SGrygorii Strashko - interrupt-names 1216e87ac74SGrygorii Strashko 1226e87ac74SGrygorii StrashkoadditionalProperties: false 1236e87ac74SGrygorii Strashko 1246e87ac74SGrygorii Strashkoexamples: 1256e87ac74SGrygorii Strashko - | 1266e87ac74SGrygorii Strashko #include <dt-bindings/interrupt-controller/irq.h> 1276e87ac74SGrygorii Strashko #include <dt-bindings/interrupt-controller/arm-gic.h> 1286e87ac74SGrygorii Strashko 1296e87ac74SGrygorii Strashko cpts@310d0000 { 1306e87ac74SGrygorii Strashko compatible = "ti,am65-cpts"; 1310db958b6SRob Herring reg = <0x310d0000 0x400>; 1326e87ac74SGrygorii Strashko reg-names = "cpts"; 1336e87ac74SGrygorii Strashko clocks = <&main_cpts_mux>; 1346e87ac74SGrygorii Strashko clock-names = "cpts"; 1356e87ac74SGrygorii Strashko interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>; 1366e87ac74SGrygorii Strashko interrupt-names = "cpts"; 1376e87ac74SGrygorii Strashko ti,cpts-periodic-outputs = <6>; 1386e87ac74SGrygorii Strashko ti,cpts-ext-ts-inputs = <8>; 1396e87ac74SGrygorii Strashko 1406e87ac74SGrygorii Strashko main_cpts_mux: refclk-mux { 1416e87ac74SGrygorii Strashko #clock-cells = <0>; 1426e87ac74SGrygorii Strashko clocks = <&k3_clks 118 5>, <&k3_clks 118 11>, 1436e87ac74SGrygorii Strashko <&k3_clks 157 91>, <&k3_clks 157 77>, 1446e87ac74SGrygorii Strashko <&k3_clks 157 102>, <&k3_clks 157 80>, 1456e87ac74SGrygorii Strashko <&k3_clks 120 3>, <&k3_clks 121 3>; 1466e87ac74SGrygorii Strashko assigned-clocks = <&main_cpts_mux>; 1476e87ac74SGrygorii Strashko assigned-clock-parents = <&k3_clks 118 11>; 1486e87ac74SGrygorii Strashko }; 1496e87ac74SGrygorii Strashko }; 1506e87ac74SGrygorii Strashko 151