All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Add support to configure TPDM DSB subunit
@ 2023-01-19  7:41 ` Tao Zhang
  0 siblings, 0 replies; 56+ messages in thread
From: Tao Zhang @ 2023-01-19  7:41 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Konrad Dybcio, Mike Leach, Rob Herring, Krzysztof Kozlowski
  Cc: Tao Zhang, Jinlong Mao, Leo Yan, Greg Kroah-Hartman, coresight,
	linux-arm-kernel, linux-kernel, devicetree, Tingwei Zhang,
	Yuanfang Zhang, Tao Zhang, Trilok Soni, Hao Zhang, linux-arm-msm,
	bjorn.andersson

From: Tao Zhang <taozha@qti.qualcomm.com>

Introduction of TPDM DSB subunit
DSB subunit is responsible for creating a dataset element, and is also
optionally responsible for packing it to fit multiple elements on a
single ATB transfer if possible in the configuration. The TPDM Core
Datapath requests timestamps be stored by the TPDA and then delivering
ATB sized data (depending on ATB width and element size, this could
be smaller or larger than a dataset element) to the ATB Mast FSM.

The DSB subunit must be configured prior to enablement. This series
adds support for TPDM to configure the configure DSB subunit.

Once this series patches are applied properly, the new tpdm nodes for
should be observed at the tpdm path /sys/bus/coresight/devices/tpdm*
which supports DSB subunit.
e.g.
/sys/devices/platform/soc@0/69d0000.tpdm/tpdm0#ls -l | grep dsb
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_edge_ctrl
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_edge_ctrl_mask
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_mode
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_patt_mask
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_patt_ts
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_patt_type
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_patt_val
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_trig_patt_mask
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_trig_patt_val
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_trig_ts
-rw-r--r--    1 root     root      4096 Jan  1 00:01 dsb_trig_type

We can use the commands are similar to the below to configure the
TPDMs which support DSB subunit. Enable coresight sink first.
echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 > /sys/bus/coresight/devices/tpdm0/reset
echo 0x3 0x3 0x1 > /sys/bus/coresight/devices/tpdm0/dsb_edge_ctrl_mask
echo 0x6d 0x6d 0 > /sys/bus/coresight/devices/tpdm0/dsb_edge_ctrl
echo 1 > /sys/bus/coresight/devices/tpdm0/dsb_patt_ts
echo 1 > /sys/bus/coresight/devices/tpdm0/dsb_patt_type
echo 0 > /sys/bus/coresight/devices/tpdm0/dsb_trig_ts
echo 0 0xFFFFFFFF > /sys/bus/coresight/devices/tpdm0/dsb_patt_mask
echo 0 0xFFFFFFFF > /sys/bus/coresight/devices/tpdm0/dsb_trig_patt_val

This patch series depends on patch series "[v17,0/9] Coresight: Add
support for TPDM and TPDA"
https://patchwork.kernel.org/project/linux-arm-msm/cover/20230117145708.16739-1-quic_jinlmao@quicinc.com/

TPDM_DSB commit tree:
https://git.codelinaro.org/clo/linux-kernel/coresight/-/tree/tpdm-dsb-v2
https://git.codelinaro.org/clo/linux-kernel/coresight/-/commits/tpdm-dsb-v2

Changes in V2:
1. Change the name of the property "qcom,dsb-elem-size" to
"qcom,dsb-element-size" -- Suzuki K Poulose
2. Update the TPDA yaml file for the item "qcom,dsb-elem-size".
-- Krzysztof Kozlowski
3. Add the full name of DSB in the description of the item
"qcom,dsb-elem-size". -- Rob Herring

Changes in V1:
1. Change the definition of the property "qcom,dsb-elem-size" from
"uint32-array" to "uint32-matrix". -- Krzysztof Kozlowski
2. Add the full name of DSB. -- Rob Herring
3. Deal with 2 entries in an iteration in TPDA driver. -- Suzuki K Poulose
4. Divide the function "tpdm_datasets_alloc" into two functions,
"tpdm_datasets_setup" and "tpdm_datasets_alloc".
5. Detecte the input string with the conventional semantics automatically,
and constrain the size of the input value. -- Suzuki K Poulose
6. Use the hook function "is_visible()" to hide the DSB related knobs if
the data sets are missing. -- Suzuki K Poulose
7. Use the macros "FIELD_GET" and "FIELD_PREP" to set the values.
-- Suzuki K Poulose
8. Update the definition of the macros in TPDM driver.
9. Update the comments of the values for the nodes which are for DSB
element creation and onfigure pattern match output. -- Suzuki K Poulose
10. Use API "sysfs_emit" to "replace scnprintf". -- Suzuki K Poulose

Tao Zhang (9):
  dt-bindings: arm: Add support for DSB element
  coresight-tpda: Add DSB dataset support
  coresight-tpdm: Initialize DSB subunit configuration
  coresight-tpdm: Add reset node to TPDM node
  coresight-tpdm: Add nodes to set trigger timestamp and type
  coresight-tpdm: Add node to set dsb programming mode
  coresight-tpdm: Add nodes for dsb element creation
  coresight-tpdm: Add nodes to configure pattern match output
  coresight-tpdm: Add nodes for timestamp request

 .../bindings/arm/qcom,coresight-tpda.yaml          |  22 +
 drivers/hwtracing/coresight/coresight-tpda.c       |  62 ++
 drivers/hwtracing/coresight/coresight-tpda.h       |   4 +
 drivers/hwtracing/coresight/coresight-tpdm.c       | 630 ++++++++++++++++++++-
 drivers/hwtracing/coresight/coresight-tpdm.h       |  65 +++
 5 files changed, 778 insertions(+), 5 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2023-03-01  8:28 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19  7:41 [PATCH v2 0/9] Add support to configure TPDM DSB subunit Tao Zhang
2023-01-19  7:41 ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 1/9] dt-bindings: arm: Add support for DSB element Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-01-19 10:44   ` Krzysztof Kozlowski
2023-01-19 10:44     ` Krzysztof Kozlowski
2023-01-31  3:23     ` Tao Zhang
2023-01-31  3:23       ` Tao Zhang
2023-02-21 18:11   ` Suzuki K Poulose
2023-02-21 18:11     ` Suzuki K Poulose
2023-02-27  3:07     ` Tao Zhang
2023-02-27  3:07       ` Tao Zhang
2023-02-27 10:44       ` Suzuki K Poulose
2023-02-27 10:44         ` Suzuki K Poulose
2023-02-22 11:56   ` Suzuki K Poulose
2023-02-22 11:56     ` Suzuki K Poulose
2023-01-19  7:41 ` [PATCH v2 2/9] coresight-tpda: Add DSB dataset support Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-02-22 12:46   ` Suzuki K Poulose
2023-02-22 12:46     ` Suzuki K Poulose
2023-02-27  2:41     ` Tao Zhang
2023-02-27  2:41       ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 3/9] coresight-tpdm: Initialize DSB subunit configuration Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-02-28 11:16   ` Suzuki K Poulose
2023-02-28 11:16     ` Suzuki K Poulose
2023-03-01  5:57     ` Tao Zhang
2023-03-01  5:57       ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 4/9] coresight-tpdm: Add reset node to TPDM node Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-02-28 11:22   ` Suzuki K Poulose
2023-02-28 11:22     ` Suzuki K Poulose
2023-03-01  6:35     ` Tao Zhang
2023-03-01  6:35       ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 5/9] coresight-tpdm: Add nodes to set trigger timestamp and type Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-02-28 11:29   ` Suzuki K Poulose
2023-02-28 11:29     ` Suzuki K Poulose
2023-03-01  7:39     ` Tao Zhang
2023-03-01  7:39       ` Tao Zhang
2023-02-28 11:32   ` Suzuki K Poulose
2023-02-28 11:32     ` Suzuki K Poulose
2023-03-01  7:45     ` Tao Zhang
2023-03-01  7:45       ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 6/9] coresight-tpdm: Add node to set dsb programming mode Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-02-28 11:35   ` Suzuki K Poulose
2023-02-28 11:35     ` Suzuki K Poulose
2023-03-01  8:27     ` Tao Zhang
2023-03-01  8:27       ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 7/9] coresight-tpdm: Add nodes for dsb element creation Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 8/9] coresight-tpdm: Add nodes to configure pattern match output Tao Zhang
2023-01-19  7:41   ` Tao Zhang
2023-01-19  7:41 ` [PATCH v2 9/9] coresight-tpdm: Add nodes for timestamp request Tao Zhang
2023-01-19  7:41   ` Tao Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.