xref: /freebsd/sys/contrib/device-tree/Bindings/timestamp/nvidia,tegra194-hte.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/timestamp/nvidia,tegra194-hte.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7*fac71e4eSEmmanuel Vadottitle: Tegra on chip generic hardware timestamping engine (HTE) provider
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Dipen Patel <dipenp@nvidia.com>
11d5b0e70fSEmmanuel Vadot
12d5b0e70fSEmmanuel Vadotdescription:
13d5b0e70fSEmmanuel Vadot  Tegra SoC has two instances of generic hardware timestamping engines (GTE)
14d5b0e70fSEmmanuel Vadot  known as GTE GPIO and GTE IRQ, which can monitor subset of GPIO and on chip
15d5b0e70fSEmmanuel Vadot  IRQ lines for the state change respectively, upon detection it will record
16d5b0e70fSEmmanuel Vadot  timestamp (taken from system counter) in its internal hardware FIFO. It has
17d5b0e70fSEmmanuel Vadot  a bitmap array arranged in 32bit slices where each bit represent signal/line
18d5b0e70fSEmmanuel Vadot  to enable or disable for the hardware timestamping. The GTE GPIO monitors
19d5b0e70fSEmmanuel Vadot  GPIO lines from the AON (always on) GPIO controller.
20d5b0e70fSEmmanuel Vadot
21d5b0e70fSEmmanuel Vadotproperties:
22d5b0e70fSEmmanuel Vadot  compatible:
23d5b0e70fSEmmanuel Vadot    enum:
24d5b0e70fSEmmanuel Vadot      - nvidia,tegra194-gte-aon
25d5b0e70fSEmmanuel Vadot      - nvidia,tegra194-gte-lic
26*fac71e4eSEmmanuel Vadot      - nvidia,tegra234-gte-aon
27*fac71e4eSEmmanuel Vadot      - nvidia,tegra234-gte-lic
28d5b0e70fSEmmanuel Vadot
29d5b0e70fSEmmanuel Vadot  reg:
30d5b0e70fSEmmanuel Vadot    maxItems: 1
31d5b0e70fSEmmanuel Vadot
32d5b0e70fSEmmanuel Vadot  interrupts:
33d5b0e70fSEmmanuel Vadot    maxItems: 1
34d5b0e70fSEmmanuel Vadot
35d5b0e70fSEmmanuel Vadot  nvidia,int-threshold:
36d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
37d5b0e70fSEmmanuel Vadot    description:
38d5b0e70fSEmmanuel Vadot      HTE device generates its interrupt based on this u32 FIFO threshold
39d5b0e70fSEmmanuel Vadot      value. The recommended value is 1.
40d5b0e70fSEmmanuel Vadot    minimum: 1
41d5b0e70fSEmmanuel Vadot    maximum: 256
42d5b0e70fSEmmanuel Vadot
43d5b0e70fSEmmanuel Vadot  nvidia,slices:
44d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
45*fac71e4eSEmmanuel Vadot    deprecated: true
46d5b0e70fSEmmanuel Vadot    description:
47d5b0e70fSEmmanuel Vadot      HTE lines are arranged in 32 bit slice where each bit represents different
48d5b0e70fSEmmanuel Vadot      line/signal that it can enable/configure for the timestamp. It is u32
49*fac71e4eSEmmanuel Vadot      property and the value depends on the HTE instance in the chip. The AON
50*fac71e4eSEmmanuel Vadot      GTE instances for both Tegra194 and Tegra234 has 3 slices. The Tegra194
51*fac71e4eSEmmanuel Vadot      LIC instance has 11 slices and Tegra234 LIC has 17 slices.
52*fac71e4eSEmmanuel Vadot    enum: [3, 11, 17]
53*fac71e4eSEmmanuel Vadot
54*fac71e4eSEmmanuel Vadot  nvidia,gpio-controller:
55*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
56*fac71e4eSEmmanuel Vadot    description:
57*fac71e4eSEmmanuel Vadot      The phandle to AON gpio controller instance. This is required to handle
58*fac71e4eSEmmanuel Vadot      namespace conversion between GPIO and GTE.
59d5b0e70fSEmmanuel Vadot
60d5b0e70fSEmmanuel Vadot  '#timestamp-cells':
61d5b0e70fSEmmanuel Vadot    description:
62d5b0e70fSEmmanuel Vadot      This represents number of line id arguments as specified by the
63d5b0e70fSEmmanuel Vadot      consumers. For the GTE IRQ, this is IRQ number as mentioned in the
64d5b0e70fSEmmanuel Vadot      SoC technical reference manual. For the GTE GPIO, its value is same as
65d5b0e70fSEmmanuel Vadot      mentioned in the nvidia GPIO device tree binding document.
66d5b0e70fSEmmanuel Vadot    const: 1
67d5b0e70fSEmmanuel Vadot
68d5b0e70fSEmmanuel Vadotrequired:
69d5b0e70fSEmmanuel Vadot  - compatible
70d5b0e70fSEmmanuel Vadot  - reg
71d5b0e70fSEmmanuel Vadot  - interrupts
72d5b0e70fSEmmanuel Vadot  - "#timestamp-cells"
73d5b0e70fSEmmanuel Vadot
74*fac71e4eSEmmanuel VadotallOf:
75*fac71e4eSEmmanuel Vadot  - if:
76*fac71e4eSEmmanuel Vadot      properties:
77*fac71e4eSEmmanuel Vadot        compatible:
78*fac71e4eSEmmanuel Vadot          contains:
79*fac71e4eSEmmanuel Vadot            enum:
80*fac71e4eSEmmanuel Vadot              - nvidia,tegra194-gte-aon
81*fac71e4eSEmmanuel Vadot              - nvidia,tegra234-gte-aon
82*fac71e4eSEmmanuel Vadot    then:
83*fac71e4eSEmmanuel Vadot      properties:
84*fac71e4eSEmmanuel Vadot        nvidia,slices:
85*fac71e4eSEmmanuel Vadot          const: 3
86*fac71e4eSEmmanuel Vadot
87*fac71e4eSEmmanuel Vadot  - if:
88*fac71e4eSEmmanuel Vadot      properties:
89*fac71e4eSEmmanuel Vadot        compatible:
90*fac71e4eSEmmanuel Vadot          contains:
91*fac71e4eSEmmanuel Vadot            enum:
92*fac71e4eSEmmanuel Vadot              - nvidia,tegra194-gte-lic
93*fac71e4eSEmmanuel Vadot    then:
94*fac71e4eSEmmanuel Vadot      properties:
95*fac71e4eSEmmanuel Vadot        nvidia,slices:
96*fac71e4eSEmmanuel Vadot          const: 11
97*fac71e4eSEmmanuel Vadot
98*fac71e4eSEmmanuel Vadot  - if:
99*fac71e4eSEmmanuel Vadot      properties:
100*fac71e4eSEmmanuel Vadot        compatible:
101*fac71e4eSEmmanuel Vadot          contains:
102*fac71e4eSEmmanuel Vadot            enum:
103*fac71e4eSEmmanuel Vadot              - nvidia,tegra234-gte-lic
104*fac71e4eSEmmanuel Vadot    then:
105*fac71e4eSEmmanuel Vadot      properties:
106*fac71e4eSEmmanuel Vadot        nvidia,slices:
107*fac71e4eSEmmanuel Vadot          const: 17
108*fac71e4eSEmmanuel Vadot
109*fac71e4eSEmmanuel Vadot  - if:
110*fac71e4eSEmmanuel Vadot      properties:
111*fac71e4eSEmmanuel Vadot        compatible:
112*fac71e4eSEmmanuel Vadot          contains:
113*fac71e4eSEmmanuel Vadot            enum:
114*fac71e4eSEmmanuel Vadot              - nvidia,tegra234-gte-aon
115*fac71e4eSEmmanuel Vadot    then:
116*fac71e4eSEmmanuel Vadot      required:
117*fac71e4eSEmmanuel Vadot        - nvidia,gpio-controller
118*fac71e4eSEmmanuel Vadot
119d5b0e70fSEmmanuel VadotadditionalProperties: false
120d5b0e70fSEmmanuel Vadot
121d5b0e70fSEmmanuel Vadotexamples:
122d5b0e70fSEmmanuel Vadot  - |
123d5b0e70fSEmmanuel Vadot    tegra_hte_aon: timestamp@c1e0000 {
124d5b0e70fSEmmanuel Vadot              compatible = "nvidia,tegra194-gte-aon";
125d5b0e70fSEmmanuel Vadot              reg = <0xc1e0000 0x10000>;
126d5b0e70fSEmmanuel Vadot              interrupts = <0 13 0x4>;
127d5b0e70fSEmmanuel Vadot              nvidia,int-threshold = <1>;
128d5b0e70fSEmmanuel Vadot              #timestamp-cells = <1>;
129d5b0e70fSEmmanuel Vadot    };
130d5b0e70fSEmmanuel Vadot
131d5b0e70fSEmmanuel Vadot  - |
132d5b0e70fSEmmanuel Vadot    tegra_hte_lic: timestamp@3aa0000 {
133d5b0e70fSEmmanuel Vadot              compatible = "nvidia,tegra194-gte-lic";
134d5b0e70fSEmmanuel Vadot              reg = <0x3aa0000 0x10000>;
135d5b0e70fSEmmanuel Vadot              interrupts = <0 11 0x4>;
136d5b0e70fSEmmanuel Vadot              nvidia,int-threshold = <1>;
137d5b0e70fSEmmanuel Vadot              #timestamp-cells = <1>;
138d5b0e70fSEmmanuel Vadot    };
139d5b0e70fSEmmanuel Vadot
140d5b0e70fSEmmanuel Vadot...
141