[PATCH RFC 3/6] dt-bindings: arm: qcom: add QDCP STM source
From: Jie Gan
Date: Thu Nov 19 2026 - 04:02:17 EST
Document the Qualcomm QDCP-backed CoreSight STM (System Trace Macrocell)
source, for platforms where the STM control registers are owned by
Qualcomm Embedded Co-Processor (QECP) firmware instead of the
application processor (AP).
The node describes only the STM stimulus aperture, the MMIO region the
AP writes trace data to. Firmware controls the STM through the Qualcomm
Debug Control Protocol (QDCP) provider referenced by the qcom,qdcp
phandle. Firmware also controls the block's clocks and power, so the
binding has no clocks or power-domains properties.
The output port must have an endpoint so the source can be connected to
a trace sink.
Signed-off-by: Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
---
.../bindings/arm/qcom,coresight-stm-qdcp.yaml | 111 +++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-stm-qdcp.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-stm-qdcp.yaml
new file mode 100644
index 000000000000..f365ce2450ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-stm-qdcp.yaml
@@ -0,0 +1,111 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-stm-qdcp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QDCP-backed CoreSight STM source
+
+maintainers:
+ - Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
+
+description: |
+ The System Trace Macrocell (STM) is a CoreSight trace source designed for
+ high-bandwidth trace of software instrumentation, made up of memory-mapped
+ writes to the STM stimulus aperture.
+
+ On Qualcomm platforms where the STM control registers are owned by QECP
+ firmware, this binding describes an STM whose stimulus aperture is mapped by
+ the application processor for data writes, while enabling and disabling the
+ trace path is delegated to firmware over the Qualcomm Debug Control Protocol
+ (QDCP). It references a QDCP provider through the "qcom,qdcp" phandle rather
+ than exposing the STM programming registers directly.
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: qcom,coresight-stm-qdcp
+ required:
+ - compatible
+
+properties:
+ $nodename:
+ pattern: "^stm(@[0-9a-f]+)$"
+
+ compatible:
+ const: qcom,coresight-stm-qdcp
+
+ reg:
+ maxItems: 1
+
+ reg-names:
+ items:
+ - const: stm-stimulus-base
+
+ 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 STM's control registers
+ and services the firmware enable/disable transactions. This must
+ reference the connection child node directly, not the top-level
+ QDCP provider node itself.
+
+ qcom,qdcp-source-id:
+ $ref: /schemas/types.yaml#/definitions/uint64
+ description:
+ QECP firmware source identifier for this STM, used to address it in QDCP
+ transactions.
+
+ qcom,num-stimulus-ports:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Number of stimulus ports (channels) exposed by this STM. If absent, the
+ number of ports is derived from the size of the stimulus aperture.
+ minimum: 1
+
+ out-ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ additionalProperties: false
+
+ properties:
+ port:
+ description: Output connection to the CoreSight Trace bus.
+ $ref: /schemas/graph.yaml#/properties/port
+ required:
+ - endpoint
+
+ required:
+ - port
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - qcom,qdcp
+ - qcom,qdcp-source-id
+ - out-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ stm@a06000 {
+ compatible = "qcom,coresight-stm-qdcp";
+ reg = <0x00a06000 0x180000>;
+ reg-names = "stm-stimulus-base";
+
+ qcom,qdcp = <&qdcp_coresight>;
+ qcom,qdcp-source-id = /bits/ 64 <0>;
+ qcom,num-stimulus-ports = <128>;
+
+ out-ports {
+ port {
+ stm_out_funnel_in0: endpoint {
+ remote-endpoint = <&funnel_in0_in_stm>;
+ };
+ };
+ };
+ };
+...
--
2.34.1