Skip to content

Commit 2166c7a

Browse files
Songwei Chaijiegan0107
authored andcommitted
FROMLIST: dt-bindings: arm: Add support for Coresight TGU trace
The Trigger Generation Unit (TGU) is designed to detect patterns or sequences within a specific region of the System on Chip (SoC). Once configured and activated, it monitors sense inputs and can detect a pre-programmed state or sequence across clock cycles, subsequently producing a trigger. TGU configuration space offset table x-------------------------x | | | | | | Step configuration | | space layout | coresight management | x-------------x | registers | |---> | | | | | | reserve | | | | | | |-------------------------| | |-------------| | | | | priority[3] | | step[7] |<-- | |-------------| |-------------------------| | | | priority[2] | | | | | |-------------| | ... | |Steps region | | priority[1] | | | | | |-------------| |-------------------------| | | | priority[0] | | |<-- | |-------------| | step[0] |--------------------> | | |-------------------------| | condition | | | | | | control and status | x-------------x | space | | | x-------------------------x |Timer/Counter| | | x-------------x TGU Configuration in Hardware The TGU provides a step region for user configuration, similar to a flow chart. Each step region consists of three register clusters: 1.Priority Region: Sets the required signals with priority. 2.Condition Region: Defines specific requirements (e.g., signal A reaches three times) and the subsequent action once the requirement is met. 3.Timer/Counter (Optional): Provides timing or counting functionality. Add a new coresight-tgu.yaml file to describe the bindings required to define the TGU in the device trees. Link: https://lore.kernel.org/all/20250423-tgu_patch-v5-1-3b52c105cc63@quicinc.com/ Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
1 parent df83755 commit 2166c7a

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
# Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/arm/qcom,coresight-tgu.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Trigger Generation Unit - TGU
9+
10+
description: |
11+
The Trigger Generation Unit (TGU) is a Data Engine which can be utilized
12+
to sense a plurality of signals and create a trigger into the CTI or
13+
generate interrupts to processors. The TGU is like the trigger circuit
14+
of a Logic Analyzer. The corresponding trigger logic can be realized by
15+
configuring the conditions for each step after sensing the signal.
16+
Once setup and enabled, it will observe sense inputs and based upon
17+
the activity of those inputs, even over clock cycles, may detect a
18+
preprogrammed state/sequence and then produce a trigger or interrupt.
19+
20+
The primary use case of the TGU is to detect patterns or sequences on a
21+
given set of signals within some region to indentify the issue in time
22+
once there is abnormal behavior in the subsystem.
23+
24+
maintainers:
25+
- Mao Jinlong <quic_jinlmao@quicinc.com>
26+
- Sam Chai <quic_songchai@quicinc.com>
27+
28+
# Need a custom select here or 'arm,primecell' will match on lots of nodes
29+
select:
30+
properties:
31+
compatible:
32+
contains:
33+
enum:
34+
- qcom,coresight-tgu
35+
required:
36+
- compatible
37+
38+
properties:
39+
compatible:
40+
items:
41+
- const: qcom,coresight-tgu
42+
- const: arm,primecell
43+
44+
reg:
45+
maxItems: 1
46+
47+
clocks:
48+
maxItems: 1
49+
50+
clock-names:
51+
items:
52+
- const: apb_pclk
53+
54+
in-ports:
55+
$ref: /schemas/graph.yaml#/properties/ports
56+
additionalProperties: false
57+
58+
properties:
59+
port:
60+
description:
61+
The port mechanism here ensures the relationship between TGU and
62+
TPDM, as TPDM is one of the inputs for TGU. It will allow TGU to
63+
function as TPDM's helper and enable TGU when the connected
64+
TPDM is enabled.
65+
$ref: /schemas/graph.yaml#/properties/port
66+
67+
required:
68+
- compatible
69+
- reg
70+
- clocks
71+
- clock-names
72+
73+
additionalProperties: false
74+
75+
examples:
76+
- |
77+
tgu@10b0e000 {
78+
compatible = "qcom,coresight-tgu", "arm,primecell";
79+
reg = <0x10b0e000 0x1000>;
80+
81+
clocks = <&aoss_qmp>;
82+
clock-names = "apb_pclk";
83+
84+
in-ports {
85+
port {
86+
tgu_in_tpdm_swao: endpoint{
87+
remote-endpoint = <&tpdm_swao_out_tgu>;
88+
};
89+
};
90+
};
91+
};
92+
...

0 commit comments

Comments
 (0)