Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-amba-devices-tgu
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
What: /sys/bus/amba/devices/<tgu-name>/enable_tgu
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the enable/disable status of TGU
Accepts only one of the 2 values - 0 or 1.
0 : disable TGU.
1 : enable TGU.

What: /sys/bus/amba/devices/<tgu-name>/step[0:7]_priority[0:3]/reg[0:17]
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the sensed signal with specific step and priority for TGU.

What: /sys/bus/amba/devices/<tgu-name>/step[0:7]_condition_decode/reg[0:3]
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the decode mode with specific step for TGU.

What: /sys/bus/amba/devices/<tgu-name>/step[0:7]_condition_select/reg[0:3]
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the next action with specific step for TGU.

What: /sys/bus/amba/devices/<tgu-name>/step[0:7]_timer/reg[0:1]
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the timer value with specific step for TGU.

What: /sys/bus/amba/devices/<tgu-name>/step[0:7]_counter/reg[0:1]
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(RW) Set/Get the counter value with specific step for TGU.

What: /sys/bus/amba/devices/<tgu-name>/reset_tgu
Date: April 2026
KernelVersion: 7.1
Contact: Jinlong Mao <jinlong.mao@oss.qualcomm.com>, Songwei Chai <songwei.chai@oss.qualcomm.com>
Description:
(Write) Write 1 to reset the dataset for TGU.
51 changes: 0 additions & 51 deletions Documentation/ABI/testing/sysfs-bus-coresight-devices-tgu

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/qcom,coresight-tgu.yaml#
$id: http://devicetree.org/schemas/arm/qcom,tgu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Trigger Generation Unit - TGU
Expand All @@ -18,27 +18,27 @@ description: |
preprogrammed state/sequence and then produce a trigger or interrupt.

The primary use case of the TGU is to detect patterns or sequences on a
given set of signals within some region to indentify the issue in time
given set of signals within some region to identify the issue in time
once there is abnormal behavior in the subsystem.

maintainers:
- Mao Jinlong <quic_jinlmao@quicinc.com>
- Sam Chai <quic_songchai@quicinc.com>
- Mao Jinlong <jinlong.mao@oss.qualcomm.com>
- Songwei Chai <songwei.chai@oss.qualcomm.com>

# Need a custom select here or 'arm,primecell' will match on lots of nodes
select:
properties:
compatible:
contains:
enum:
- qcom,coresight-tgu
- qcom,tgu
required:
- compatible

properties:
compatible:
items:
- const: qcom,coresight-tgu
- const: qcom,tgu
- const: arm,primecell

reg:
Expand All @@ -51,19 +51,6 @@ properties:
items:
- const: apb_pclk

in-ports:
$ref: /schemas/graph.yaml#/properties/ports
additionalProperties: false

properties:
port:
description:
The port mechanism here ensures the relationship between TGU and
TPDM, as TPDM is one of the inputs for TGU. It will allow TGU to
function as TPDM's helper and enable TGU when the connected
TPDM is enabled.
$ref: /schemas/graph.yaml#/properties/port

required:
- compatible
- reg
Expand All @@ -75,18 +62,10 @@ additionalProperties: false
examples:
- |
tgu@10b0e000 {
compatible = "qcom,coresight-tgu", "arm,primecell";
compatible = "qcom,tgu", "arm,primecell";
reg = <0x10b0e000 0x1000>;

clocks = <&aoss_qmp>;
clock-names = "apb_pclk";

in-ports {
port {
tgu_in_tpdm_swao: endpoint{
remote-endpoint = <&tpdm_swao_out_tgu>;
};
};
};
};
...
2 changes: 1 addition & 1 deletion arch/arm64/configs/qcom.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CONFIG_CORESIGHT_CORESIGHT_TNOC=m
CONFIG_CORESIGHT_CTCU=m
CONFIG_CORESIGHT_DUMMY=m
CONFIG_CORESIGHT_SOURCE_ETM4X=m
CONFIG_CORESIGHT_TGU=m
CONFIG_QCOM_TGU=m
CONFIG_CORESIGHT_TPDM=m
CONFIG_CPU_IDLE_THERMAL=y
# CONFIG_DEBUG_INFO_REDUCED is not set
Expand Down
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ obj-$(CONFIG_RAS) += ras/
obj-$(CONFIG_USB4) += thunderbolt/
obj-$(CONFIG_CORESIGHT) += hwtracing/coresight/
obj-y += hwtracing/intel_th/
obj-y += hwtracing/qcom/
obj-$(CONFIG_STM) += hwtracing/stm/
obj-$(CONFIG_HISI_PTT) += hwtracing/ptt/
obj-y += android/
Expand Down
2 changes: 2 additions & 0 deletions drivers/hwtracing/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ source "drivers/hwtracing/intel_th/Kconfig"

source "drivers/hwtracing/ptt/Kconfig"

source "drivers/hwtracing/qcom/Kconfig"

endmenu
11 changes: 0 additions & 11 deletions drivers/hwtracing/coresight/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ menuconfig CORESIGHT
module will be called coresight.

if CORESIGHT
config CORESIGHT_TGU
tristate "CoreSight Trigger Generation Unit driver"
help
This driver provides support for Trigger Generation Unit that is
used to detect patterns or sequences on a given set of signals.
TGU is used to monitor a particular bus within a given region to
detect illegal transaction sequences or slave responses. It is also
used to monitor a data stream to detect protocol violations and to
provide a trigger point for centering data around a specific event
within the trace data buffer.

config CORESIGHT_LINKS_AND_SINKS
tristate "CoreSight Link and Sink drivers"
help
Expand Down
1 change: 0 additions & 1 deletion drivers/hwtracing/coresight/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ coresight-cti-y := coresight-cti-core.o coresight-cti-platform.o \
coresight-cti-sysfs.o
obj-$(CONFIG_ULTRASOC_SMB) += ultrasoc-smb.o
obj-$(CONFIG_CORESIGHT_DUMMY) += coresight-dummy.o
obj-$(CONFIG_CORESIGHT_TGU) += coresight-tgu.o
obj-$(CONFIG_CORESIGHT_CTCU) += coresight-ctcu.o
coresight-ctcu-y := coresight-ctcu-core.o coresight-ctcu-byte-cntr.o
obj-$(CONFIG_CORESIGHT_KUNIT_TESTS) += coresight-kunit-tests.o
Loading