| 1 |
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause |
| 2 |
# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. |
| 3 |
%YAML 1.2 |
| 4 |
--- |
| 5 |
$id: http://devicetree.org/schemas/arm/qcom,coresight-tpda.yaml# |
| 6 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 7 |
|
| 8 |
title: Trace, Profiling and Diagnostics Aggregator - TPDA |
| 9 |
|
| 10 |
description: | |
| 11 |
TPDAs are responsible for packetization and timestamping of data sets |
| 12 |
utilizing the MIPI STPv2 packet protocol. Pulling data sets from one or |
| 13 |
more attached TPDM and pushing the resultant (packetized) data out a |
| 14 |
master ATB interface. Performing an arbitrated ATB interleaving (funneling) |
| 15 |
task for free-flowing data from TPDM (i.e. CMB and DSB data set flows). |
| 16 |
|
| 17 |
There is no strict binding between TPDM and TPDA. TPDA can have multiple |
| 18 |
TPDMs connect to it. But There must be only one TPDA in the path from the |
| 19 |
TPDM source to TMC sink. TPDM can directly connect to TPDA's inport or |
| 20 |
connect to funnel which will connect to TPDA's inport. |
| 21 |
|
| 22 |
We can use the commands are similar to the below to validate TPDMs. |
| 23 |
Enable coresight sink first. |
| 24 |
|
| 25 |
echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink |
| 26 |
echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source |
| 27 |
echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test |
| 28 |
echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test |
| 29 |
|
| 30 |
The test data will be collected in the coresight sink which is enabled. |
| 31 |
If rwp register of the sink is keeping updating when do integration_test |
| 32 |
(by cat tmc_etf0/mgmt/rwp), it means there is data generated from TPDM |
| 33 |
to sink. |
| 34 |
|
| 35 |
maintainers: |
| 36 |
- Mao Jinlong <[email protected]> |
| 37 |
- Tao Zhang <[email protected]> |
| 38 |
|
| 39 |
# Need a custom select here or 'arm,primecell' will match on lots of nodes |
| 40 |
select: |
| 41 |
properties: |
| 42 |
compatible: |
| 43 |
contains: |
| 44 |
enum: |
| 45 |
- qcom,coresight-tpda |
| 46 |
required: |
| 47 |
- compatible |
| 48 |
|
| 49 |
properties: |
| 50 |
$nodename: |
| 51 |
pattern: "^tpda(@[0-9a-f]+)$" |
| 52 |
compatible: |
| 53 |
items: |
| 54 |
- const: qcom,coresight-tpda |
| 55 |
- const: arm,primecell |
| 56 |
|
| 57 |
reg: |
| 58 |
maxItems: 1 |
| 59 |
|
| 60 |
clocks: |
| 61 |
maxItems: 1 |
| 62 |
|
| 63 |
clock-names: |
| 64 |
items: |
| 65 |
- const: apb_pclk |
| 66 |
|
| 67 |
label: |
| 68 |
description: |
| 69 |
Description of a coresight device. |
| 70 |
|
| 71 |
in-ports: |
| 72 |
description: | |
| 73 |
Input connections from TPDM to TPDA |
| 74 |
$ref: /schemas/graph.yaml#/properties/ports |
| 75 |
|
| 76 |
out-ports: |
| 77 |
description: | |
| 78 |
Output connections from the TPDA to legacy CoreSight trace bus. |
| 79 |
$ref: /schemas/graph.yaml#/properties/ports |
| 80 |
|
| 81 |
properties: |
| 82 |
port: |
| 83 |
description: |
| 84 |
Output connection from the TPDA to legacy CoreSight Trace bus. |
| 85 |
$ref: /schemas/graph.yaml#/properties/port |
| 86 |
|
| 87 |
required: |
| 88 |
- compatible |
| 89 |
- reg |
| 90 |
- clocks |
| 91 |
- clock-names |
| 92 |
- in-ports |
| 93 |
- out-ports |
| 94 |
|
| 95 |
additionalProperties: false |
| 96 |
|
| 97 |
examples: |
| 98 |
# minimum tpda definition. |
| 99 |
- | |
| 100 |
tpda@6004000 { |
| 101 |
compatible = "qcom,coresight-tpda", "arm,primecell"; |
| 102 |
reg = <0x6004000 0x1000>; |
| 103 |
|
| 104 |
clocks = <&aoss_qmp>; |
| 105 |
clock-names = "apb_pclk"; |
| 106 |
|
| 107 |
in-ports { |
| 108 |
#address-cells = <1>; |
| 109 |
#size-cells = <0>; |
| 110 |
|
| 111 |
port@0 { |
| 112 |
reg = <0>; |
| 113 |
tpda_qdss_0_in_tpdm_dcc: endpoint { |
| 114 |
remote-endpoint = <&tpdm_dcc_out_tpda_qdss_0>; |
| 115 |
}; |
| 116 |
}; |
| 117 |
}; |
| 118 |
|
| 119 |
out-ports { |
| 120 |
port { |
| 121 |
tpda_qdss_out_funnel_in0: endpoint { |
| 122 |
remote-endpoint = <&funnel_in0_in_tpda_qdss>; |
| 123 |
}; |
| 124 |
}; |
| 125 |
}; |
| 126 |
}; |
| 127 |
|
| 128 |
... |