[PATCH RFC 5/6] dt-bindings: arm: qcom: add QDCP TMC ETR sink
From: Jie Gan
Date: Thu Nov 19 2026 - 04:03:03 EST
Document the Qualcomm QDCP-backed CoreSight TMC-ETR sink, a Trace
Memory Controller (TMC) configured as an Embedded Trace Router (ETR).
Linux owns the ETR trace buffer allocation and sysfs lifetime as usual;
only the TMC control registers are owned by Qualcomm Embedded
Co-Processor (QECP) firmware. The qcom,qdcp phandle identifies the
Qualcomm Debug Control Protocol (QDCP) firmware provider used for
buffer handoff and TMC enable/disable, and qcom,qdcp-tmc-id identifies
this TMC instance in QDCP transactions.
Firmware also controls the block's clocks and power, so the binding has
no clocks or power-domains properties. The input port must have an
endpoint so the sink can be connected to a trace source.
Signed-off-by: Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
---
.../bindings/arm/qcom,coresight-tmc-qdcp.yaml | 102 +++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tmc-qdcp.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tmc-qdcp.yaml
new file mode 100644
index 000000000000..03a9dc18f13b
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tmc-qdcp.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-tmc-qdcp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QDCP-backed CoreSight TMC-ETR sink
+
+maintainers:
+ - Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
+
+description: |
+ On Qualcomm platforms where a Trace Memory Controller configured as an
+ Embedded Trace Router (TMC-ETR) is owned by QECP firmware, the AP cannot
+ map or program the TMC control registers directly. This binding describes
+ such a firmware-owned TMC-ETR sink.
+
+ Linux still allocates and owns the ETR trace buffer using the normal
+ CoreSight sysfs buffer lifetime. The allocated buffer address and size are
+ handed off to QECP firmware over the Qualcomm Debug Control Protocol
+ (QDCP), referenced through the "qcom,qdcp" phandle, which enables and
+ disables the firmware-owned TMC and synchronizes read/write pointers.
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: qcom,coresight-tmc-qdcp
+ required:
+ - compatible
+
+properties:
+ compatible:
+ const: qcom,coresight-tmc-qdcp
+
+ qcom,qdcp:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the specific "connection-N" child node of the QDCP
+ provider (see qcom,qdcp.yaml) that owns this TMC-ETR's control
+ registers and services the firmware buffer handoff and enable/disable
+ transactions. This must reference the connection child node
+ directly, not the top-level QDCP provider node itself.
+
+ qcom,qdcp-tmc-id:
+ $ref: /schemas/types.yaml#/definitions/uint64
+ description:
+ QECP firmware identifier for this TMC-ETR, used to address it in QDCP
+ transactions.
+
+ arm,scatter-gather:
+ type: boolean
+ description:
+ Indicates that the TMC-ETR can safely use the SG mode on this system.
+
+ arm,max-burst-size:
+ description:
+ The maximum burst size initiated by TMC on the AXI master interface.
+ The burst size can be in the range [0..15], the setting supports one
+ data transfer per burst up to a maximum of 16 data transfers per burst.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maximum: 15
+
+ 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:
+ - endpoint
+
+ required:
+ - port
+
+required:
+ - compatible
+ - qcom,qdcp
+ - qcom,qdcp-tmc-id
+ - in-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ etr_qdcp: etr-qdcp {
+ compatible = "qcom,coresight-tmc-qdcp";
+
+ qcom,qdcp = <&qdcp_coresight>;
+ qcom,qdcp-tmc-id = /bits/ 64 <0>;
+
+ in-ports {
+ port {
+ etr_qdcp_in_stm: endpoint {
+ remote-endpoint = <&stm_out_etr_qdcp>;
+ };
+ };
+ };
+ };
+...
--
2.34.1