Add Devicetree bindings for the Timestamp Counter Subsystem (TSCSS) found on Qualcomm SA8775P and QCS8300 SoCs. TSCSS is a time synchronization subsystem composed of two main blocks: Timestamp Counter (TSC) and Event Timestamp Unit (ETU). The TSC block provides a continuously running counter used for timekeeping, while the ETU captures timestamps for external hardware event triggers. Co-developed-by: Taniya Das Signed-off-by: Taniya Das Signed-off-by: Imran Shaik --- .../bindings/ptp/qcom,sa8775p-tscss.yaml | 169 +++++++++++++++++++++ 1 file changed, 169 insertions(+) diff --git a/Documentation/devicetree/bindings/ptp/qcom,sa8775p-tscss.yaml b/Documentation/devicetree/bindings/ptp/qcom,sa8775p-tscss.yaml new file mode 100644 index 000000000000..b3e3a7cd7166 --- /dev/null +++ b/Documentation/devicetree/bindings/ptp/qcom,sa8775p-tscss.yaml @@ -0,0 +1,169 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ptp/qcom,sa8775p-tscss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Timestamp Counter Subsystem (TSCSS) on Qualcomm SA8775P and QCS8300 + +maintainers: + - Imran Shaik + - Taniya Das + +description: | + Qualcomm TSCSS is a time synchronization subsystem composed of two main + blocks - the Timestamp Counter (TSC) and the Event Timestamp Unit (ETU). + + The TSC block is a timestamp generator that maintains a running counter used + for system timekeeping, and is functional with just the AHB and counter + clocks. + The ETU block captures TSC timestamps for external hardware events. Each + ETU slice binds a slice number to an external event selector, and a + single summary interrupt is raised for any ETU slice event. + +properties: + compatible: + oneOf: + - const: qcom,sa8775p-tscss + - items: + - const: qcom,qcs8300-tscss + - const: qcom,sa8775p-tscss + + reg: + minItems: 1 + maxItems: 2 + + reg-names: + minItems: 1 + items: + - const: tsc + - const: etu + + clocks: + items: + - description: TSC AHB configuration clock. + - description: TSC global counter clock. + - description: TSC ETU clock. + + clock-names: + items: + - const: ahb + - const: cntr + - const: etu + + interrupts: + items: + - description: + Summary interrupt raised based on an external event for any + of the ETU slices. + + interrupt-names: + items: + - const: etu_summary + + pinctrl-names: + minItems: 1 + maxItems: 16 + items: + pattern: "^slice[0-9]+$" + + qcom,etu-slice: + description: + ETU slice number for each entry in pinctrl-, pinctrl-names and + qcom,etu-event-sel. + minItems: 1 + maxItems: 16 + $ref: /schemas/types.yaml#/definitions/uint32-array + + qcom,etu-event-sel: + description: + External event selection value for each ETU slice listed in + qcom,etu-slice. + minItems: 1 + maxItems: 16 + $ref: /schemas/types.yaml#/definitions/uint32-array + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + +allOf: + - if: + properties: + reg-names: + contains: + const: etu + then: + properties: + reg: + minItems: 2 + maxItems: 2 + required: + - interrupts + - interrupt-names + - pinctrl-names + - qcom,etu-slice + - qcom,etu-event-sel + +additionalProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + ptp@1c80000 { + compatible = "qcom,sa8775p-tscss"; + reg = <0x0 0x01c80000 0x0 0x2000>; + reg-names = "tsc"; + + clocks = <&gcc GCC_TSCSS_AHB_CLK>, + <&gcc GCC_TSCSS_GLOBAL_CNTR_CLK>, + <&gcc GCC_TSCSS_ETU_CLK>; + clock-names = "ahb", "cntr", "etu"; + + assigned-clocks = <&gcc GCC_TSCSS_GLOBAL_CNTR_CLK>; + assigned-clock-rates = <15625000>; + }; + }; + + - | + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + ptp@1c80000 { + compatible = "qcom,sa8775p-tscss"; + reg = <0x0 0x01c80000 0x0 0x2000>, + <0x0 0x01c90000 0x0 0x10000>; + reg-names = "tsc", "etu"; + + clocks = <&gcc GCC_TSCSS_AHB_CLK>, + <&gcc GCC_TSCSS_GLOBAL_CNTR_CLK>, + <&gcc GCC_TSCSS_ETU_CLK>; + clock-names = "ahb", "cntr", "etu"; + + assigned-clocks = <&gcc GCC_TSCSS_GLOBAL_CNTR_CLK>; + assigned-clock-rates = <15625000>; + + interrupts = ; + interrupt-names = "etu_summary"; + + pinctrl-0 = <&cci_timer0>; + pinctrl-1 = <&cci_timer1>; + pinctrl-names = "slice1", "slice2"; + + qcom,etu-slice = <1 2>; + qcom,etu-event-sel = <1 2>; + }; + }; +... -- 2.34.1