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