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