[PATCH v2 7/8] dt-bindings: arm: qcom: add QECP owned CoreSight TMC
From: Jie Gan
Date: Mon Nov 30 2026 - 02:13:03 EST
On the Qualcomm Hawi and Maili SoCs, a CoreSight TMC is owned by the
Qualcomm Embedded Co-Processor (QECP). Its registers are only accessible
from the QECP, which configures, enables and disables the TMC on request
of the operating system. For a TMC configured as an ETR, the trace
buffer is provided by the operating system.
Add a binding for this TMC. The register region is described as for any
other TMC, even though it is only accessible from the QECP, whose
firmware identifies the TMC by its base address. The firmware service
used to control the TMC is fixed for each SoC, so it is implied by the
SoC specific compatible rather than described in the devicetree.
The Maili TMC is compatible with the Hawi one and uses the Hawi
compatible as fallback.
Signed-off-by: Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
---
.../bindings/arm/qcom,coresight-qecp-tmc.yaml | 83 ++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-tmc.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-tmc.yaml
new file mode 100644
index 000000000000..4d353c6cbaee
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-tmc.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-qecp-tmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QECP owned CoreSight TMC
+
+maintainers:
+ - Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
+
+description: |
+ The CoreSight Trace Memory Controller (TMC) can be configured as an
+ Embedded Trace Router (ETR), writing trace data into a buffer in system
+ memory, or as an Embedded Trace FIFO (ETF) or Buffer (ETB).
+
+ On some Qualcomm SoCs a TMC is owned by the Qualcomm Embedded
+ Co-Processor (QECP). Its registers are only accessible from the QECP,
+ which configures, enables and disables the TMC on request of the
+ operating system. For an ETR, the trace buffer is provided by the
+ operating system.
+
+properties:
+ compatible:
+ oneOf:
+ - const: qcom,hawi-qecp-tmc
+ - items:
+ - enum:
+ - qcom,maili-qecp-tmc
+ - const: qcom,hawi-qecp-tmc
+
+ reg:
+ description:
+ TMC register region. The registers are only accessible from the QECP.
+ maxItems: 1
+
+ iommus:
+ maxItems: 1
+
+ arm,buffer-size:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Size of the contiguous buffer space for a TMC configured as an ETR,
+ in bytes.
+
+ arm,scatter-gather:
+ type: boolean
+ description:
+ The TMC ETR can safely use its scatter-gather mode on this system.
+
+ in-ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ additionalProperties: false
+
+ properties:
+ port:
+ description: Input connection from the CoreSight trace bus.
+ $ref: /schemas/graph.yaml#/properties/port
+
+required:
+ - compatible
+ - reg
+ - in-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ etr@10048000 {
+ compatible = "qcom,hawi-qecp-tmc";
+ reg = <0x10048000 0x1000>;
+ iommus = <&apps_smmu 0x04c0 0x0>;
+ arm,scatter-gather;
+
+ in-ports {
+ port {
+ endpoint {
+ remote-endpoint = <&stm_out_etr>;
+ };
+ };
+ };
+ };
+...
--
2.34.1