[PATCH v2 5/8] dt-bindings: arm: qcom: add QECP owned CoreSight STM
From: Jie Gan
Date: Mon Nov 30 2026 - 02:12:51 EST
On the Qualcomm Hawi and Maili SoCs, a CoreSight System Trace Macrocell
(STM) is owned by the Qualcomm Embedded Co-Processor (QECP). Its control
registers are only accessible from the QECP, which configures, enables
and disables the STM on request of the operating system. The stimulus
ports remain accessible to the operating system for writing trace data.
Add a binding for this STM. Both the control register region and the
stimulus port region are described, as for the generic CoreSight STM.
The control registers are only accessible from the QECP, whose firmware
identifies the STM by their base address. The firmware service used to
control the STM is fixed for each SoC, so it is implied by the SoC
specific compatible rather than described in the devicetree.
The Maili STM 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-stm.yaml | 76 ++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-stm.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-stm.yaml
new file mode 100644
index 000000000000..1461ee294739
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-qecp-stm.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-qecp-stm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QECP owned CoreSight STM
+
+maintainers:
+ - Jie Gan <jie.gan@xxxxxxxxxxxxxxxx>
+
+description: |
+ The System Trace Macrocell (STM) is a CoreSight trace source for software
+ instrumentation, made up of memory mapped writes to its stimulus ports.
+
+ On some Qualcomm SoCs the STM is owned by the Qualcomm Embedded
+ Co-Processor (QECP). Its control registers are only accessible from the
+ QECP, which configures, enables and disables the STM on request of the
+ operating system. The stimulus ports remain accessible to the operating
+ system for writing trace data.
+
+properties:
+ compatible:
+ oneOf:
+ - const: qcom,hawi-qecp-stm
+ - items:
+ - enum:
+ - qcom,maili-qecp-stm
+ - const: qcom,hawi-qecp-stm
+
+ reg:
+ items:
+ - description:
+ STM control register region. The registers are only accessible
+ from the QECP.
+ - description: STM stimulus port region.
+
+ reg-names:
+ items:
+ - const: stm-base
+ - const: stm-stimulus-base
+
+ 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:
+ - compatible
+ - reg
+ - reg-names
+ - out-ports
+
+additionalProperties: false
+
+examples:
+ - |
+ stm@10002000 {
+ compatible = "qcom,hawi-qecp-stm";
+ reg = <0x10002000 0x1000>,
+ <0x16280000 0x180000>;
+ reg-names = "stm-base", "stm-stimulus-base";
+
+ out-ports {
+ port {
+ endpoint {
+ remote-endpoint = <&etr_in_stm>;
+ };
+ };
+ };
+ };
+...
--
2.34.1