From nobody Wed Feb 11 09:00:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09923C7618D for ; Thu, 16 Mar 2023 03:26:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjCPD0u (ORCPT ); Wed, 15 Mar 2023 23:26:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjCPD0X (ORCPT ); Wed, 15 Mar 2023 23:26:23 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5809A8832; Wed, 15 Mar 2023 20:24:37 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32G2qaWM030232; Thu, 16 Mar 2023 03:20:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=AZfr8iUqFAQKPj5UxBH4iMO+y0HoGZiTkfSP+9OXdOE=; b=j1Oz52FY2qhtKRCmbaXsYKPGssDamWtTJ0fs48m2qNNzUbbyrUygDv87LL25u/+bl6wG 3b404IMHdIeYA0qkoTCcEUH4X7qwGam9elyfCjGOOqXTZuBZzVxS54/4Ya30UykpskH3 LuhWzHFMkNmGkCQc7ADxeXjKE1fsxxvCbK4PfHh4WkBhZGjIR75lNY2i1WAU4BxDZJ/Z vo4o6pOCWtfPC3EDicl5zXiVdivKX0Pnq9uB3+yaTlxEx15R2is2VNqx8JZ+dypfNatp QHNWZvA3q03XpemowK2HBo/1NibWgYbo97LbeHbNGcsuk9gdyCdkqmplCjyKmi9s9TcT 7A== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pbpyd0gps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Mar 2023 03:20:22 +0000 Received: from pps.filterd (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32G3KI4q006432; Thu, 16 Mar 2023 03:20:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqmenmm-1; Thu, 16 Mar 2023 03:20:18 +0000 Received: from APTAIPPMTA01.qualcomm.com (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32G3KI9j006427; Thu, 16 Mar 2023 03:20:18 GMT Received: from hazha-gv.ap.qualcomm.com (hazha-gv.qualcomm.com [10.239.105.144]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 32G3KIIk006425; Thu, 16 Mar 2023 03:20:18 +0000 Received: by hazha-gv.ap.qualcomm.com (Postfix, from userid 4083943) id 724EB1200077; Thu, 16 Mar 2023 11:20:17 +0800 (CST) From: Hao Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski , Andy Gross , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jonathan Corbet Cc: Hao Zhang , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Jinlong Mao , Yuanfang Zhang , Tao Zhang , Trilok Soni , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-doc@vger.kernel.org Subject: [PATCH v1 1/3] Coresight: Add coresight dummy driver Date: Thu, 16 Mar 2023 11:20:03 +0800 Message-Id: <20230316032005.6509-2-quic_hazha@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230316032005.6509-1-quic_hazha@quicinc.com> References: <20230316032005.6509-1-quic_hazha@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: UmtQsPWuSk_d_bcFzhtl3XWlN__Fj9Y9 X-Proofpoint-ORIG-GUID: UmtQsPWuSk_d_bcFzhtl3XWlN__Fj9Y9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-16_02,2023-03-15_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 priorityscore=1501 phishscore=0 spamscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303160028 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Some Coresight devices that HLOS don't have permission to access or configure. Such as Coresight sink EUD, some TPDMs etc. So there need driver to register dummy devices as Coresight devices. Provide Coresight API for dummy device operations, such as enabling and disabling dummy devices. Build the Coresight path for dummy sink or dummy source for debugging. Signed-off-by: Hao Zhang --- drivers/hwtracing/coresight/Kconfig | 11 ++ drivers/hwtracing/coresight/Makefile | 1 + drivers/hwtracing/coresight/coresight-dummy.c | 176 ++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 drivers/hwtracing/coresight/coresight-dummy.c diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresi= ght/Kconfig index 2b5bbfffbc4f..06f0a7594169 100644 --- a/drivers/hwtracing/coresight/Kconfig +++ b/drivers/hwtracing/coresight/Kconfig @@ -236,4 +236,15 @@ config CORESIGHT_TPDA =20 To compile this driver as a module, choose M here: the module will be called coresight-tpda. + +config CORESIGHT_DUMMY + tristate "Dummy driver support" + help + Enables support for dummy driver. Dummy driver can be used for + CoreSight sources/sinks that are owned and configured by some + other subsystem and use Linux drivers to configure rest of trace + path. + + To compile this driver as a module, choose M here: the module will be + called coresight-dummy. endif diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/cores= ight/Makefile index 33bcc3f7b8ae..995d3b2c76df 100644 --- a/drivers/hwtracing/coresight/Makefile +++ b/drivers/hwtracing/coresight/Makefile @@ -30,3 +30,4 @@ obj-$(CONFIG_CORESIGHT_TPDA) +=3D coresight-tpda.o coresight-cti-y :=3D coresight-cti-core.o coresight-cti-platform.o \ coresight-cti-sysfs.o obj-$(CONFIG_ULTRASOC_SMB) +=3D ultrasoc-smb.o +obj-$(CONFIG_CORESIGHT_DUMMY) +=3D coresight-dummy.o diff --git a/drivers/hwtracing/coresight/coresight-dummy.c b/drivers/hwtrac= ing/coresight/coresight-dummy.c new file mode 100644 index 000000000000..d06baafb77da --- /dev/null +++ b/drivers/hwtracing/coresight/coresight-dummy.c @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include + +#include "coresight-priv.h" +#include "coresight-trace-id.h" + +struct dummy_drvdata { + struct device *dev; + struct coresight_device *csdev; + int traceid; +}; + +DEFINE_CORESIGHT_DEVLIST(dummy_devs, "dummy"); + +static int dummy_source_enable(struct coresight_device *csdev, + struct perf_event *event, u32 mode) +{ + struct dummy_drvdata *drvdata =3D dev_get_drvdata(csdev->dev.parent); + + dev_info(drvdata->dev, "Dummy source enabled\n"); + + return 0; +} + +static void dummy_source_disable(struct coresight_device *csdev, + struct perf_event *event) +{ + struct dummy_drvdata *drvdata =3D dev_get_drvdata(csdev->dev.parent); + + dev_info(drvdata->dev, "Dummy source disabled\n"); +} + +static int dummy_sink_enable(struct coresight_device *csdev, u32 mode, + void *data) +{ + struct dummy_drvdata *drvdata =3D dev_get_drvdata(csdev->dev.parent); + + dev_info(drvdata->dev, "Dummy sink enabled\n"); + + return 0; +} + +static int dummy_sink_disable(struct coresight_device *csdev) +{ + struct dummy_drvdata *drvdata =3D dev_get_drvdata(csdev->dev.parent); + + dev_info(drvdata->dev, "Dummy sink disabled\n"); + + return 0; +} + +static const struct coresight_ops_source dummy_source_ops =3D { + .enable =3D dummy_source_enable, + .disable =3D dummy_source_disable, +}; + +static const struct coresight_ops_sink dummy_sink_ops =3D { + .enable =3D dummy_sink_enable, + .disable =3D dummy_sink_disable, +}; + +static const struct coresight_ops dummy_cs_ops =3D { + .source_ops =3D &dummy_source_ops, + .sink_ops =3D &dummy_sink_ops, +}; + +static int dummy_probe(struct platform_device *pdev) +{ + int ret, trace_id; + struct device *dev =3D &pdev->dev; + struct coresight_platform_data *pdata; + struct dummy_drvdata *drvdata; + struct coresight_desc desc =3D { 0 }; + + desc.name =3D coresight_alloc_device_name(&dummy_devs, dev); + if (!desc.name) + return -ENOMEM; + + pdata =3D coresight_get_platform_data(dev); + if (IS_ERR(pdata)) + return PTR_ERR(pdata); + pdev->dev.platform_data =3D pdata; + + drvdata =3D devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); + if (!drvdata) + return -ENOMEM; + + drvdata->dev =3D &pdev->dev; + platform_set_drvdata(pdev, drvdata); + + if (of_property_read_bool(pdev->dev.of_node, "qcom,dummy-source")) { + desc.type =3D CORESIGHT_DEV_TYPE_SOURCE; + desc.subtype.source_subtype =3D + CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS; + } else if (of_property_read_bool(pdev->dev.of_node, + "qcom,dummy-sink")) { + desc.type =3D CORESIGHT_DEV_TYPE_SINK; + desc.subtype.sink_subtype =3D CORESIGHT_DEV_SUBTYPE_SINK_BUFFER; + } else { + dev_info(dev, "Device type not set\n"); + return -EINVAL; + } + + desc.ops =3D &dummy_cs_ops; + desc.pdata =3D pdev->dev.platform_data; + desc.dev =3D &pdev->dev; + drvdata->csdev =3D coresight_register(&desc); + if (IS_ERR(drvdata->csdev)) + return PTR_ERR(drvdata->csdev); + + trace_id =3D coresight_trace_id_get_system_id(); + if (trace_id < 0) { + ret =3D trace_id; + goto cs_unregister; + } + drvdata->traceid =3D (u8)trace_id; + + pm_runtime_enable(dev); + dev_info(dev, "Dummy device initialized\n"); + + return 0; + +cs_unregister: + coresight_unregister(drvdata->csdev); + + return ret; +} + +static int dummy_remove(struct platform_device *pdev) +{ + struct dummy_drvdata *drvdata =3D platform_get_drvdata(pdev); + struct device *dev =3D &pdev->dev; + + coresight_trace_id_put_system_id(drvdata->traceid); + pm_runtime_disable(dev); + coresight_unregister(drvdata->csdev); + return 0; +} + +static const struct of_device_id dummy_match[] =3D { + {.compatible =3D "qcom,coresight-dummy"}, + {}, +}; + +static struct platform_driver dummy_driver =3D { + .probe =3D dummy_probe, + .remove =3D dummy_remove, + .driver =3D { + .name =3D "coresight-dummy", + .of_match_table =3D dummy_match, + }, +}; + +int __init dummy_init(void) +{ + return platform_driver_register(&dummy_driver); +} +module_init(dummy_init); + +void __exit dummy_exit(void) +{ + platform_driver_unregister(&dummy_driver); +} +module_exit(dummy_exit); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("CoreSight dummy source driver"); --=20 2.17.1 From nobody Wed Feb 11 09:00:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F1CEC6FD1D for ; Thu, 16 Mar 2023 03:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbjCPDY1 (ORCPT ); Wed, 15 Mar 2023 23:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbjCPDX5 (ORCPT ); Wed, 15 Mar 2023 23:23:57 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D523DAB89F; Wed, 15 Mar 2023 20:21:45 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32G23Xqe001850; Thu, 16 Mar 2023 03:20:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=PMqBL/9V7s0s4opFEsX8c/I+d9bptzT5bGjCmlDP49Y=; b=ZcO1IRaOiF28Avqlwr9qKwZE17q7hQXTp7NzCj6yKeWDxyfWIuJiBT6Ja0Wb9I82Ypvw 22zJczWYZ1xmyG4VX4pyhuYHDBBjrWwtNYX5Gu5kWmxzpsoUmgVxOzyHhjpL8dHeEj2u xsluKu/51RZkPN9sp5TMrrf8WxeSqGRMydIaEOlh/ocVwz4Trbjbx3zw8dMqOJ8EmMuY 0tqAleTA4SmNkqw3+Fuja8yBp2bWZdF+JjzEEDTCgA2Hd3GcxDX9d2WPgP3Fcu1uzOIF YUvgDPtBZ6EAaEooMTTyoBRWyuEYQorOdJzf5/UppOyEs9xV+wVc2aDny86l1Le9iR9T dg== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pbpxsghj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Mar 2023 03:20:21 +0000 Received: from pps.filterd (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32G3KJki006443; Thu, 16 Mar 2023 03:20:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqmenms-1; Thu, 16 Mar 2023 03:20:19 +0000 Received: from APTAIPPMTA01.qualcomm.com (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32G3KJ6C006437; Thu, 16 Mar 2023 03:20:19 GMT Received: from hazha-gv.ap.qualcomm.com (hazha-gv.qualcomm.com [10.239.105.144]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 32G3KJQP006433; Thu, 16 Mar 2023 03:20:19 +0000 Received: by hazha-gv.ap.qualcomm.com (Postfix, from userid 4083943) id 3D606120007F; Thu, 16 Mar 2023 11:20:18 +0800 (CST) From: Hao Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski , Andy Gross , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jonathan Corbet Cc: Hao Zhang , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Jinlong Mao , Yuanfang Zhang , Tao Zhang , Trilok Soni , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-doc@vger.kernel.org Subject: [PATCH v1 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema Date: Thu, 16 Mar 2023 11:20:04 +0800 Message-Id: <20230316032005.6509-3-quic_hazha@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230316032005.6509-1-quic_hazha@quicinc.com> References: <20230316032005.6509-1-quic_hazha@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 7Qg1bPsFcW6Si0dAzbjBLksHC2XCD_Dd X-Proofpoint-ORIG-GUID: 7Qg1bPsFcW6Si0dAzbjBLksHC2XCD_Dd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-16_02,2023-03-15_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303160028 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add new coresight-dummy.yaml file describing the bindings required to define coresight dummy trace in the device trees. Signed-off-by: Hao Zhang --- .../bindings/arm/qcom,coresight-dummy.yaml | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-du= mmy.yaml diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yam= l b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml new file mode 100644 index 000000000000..3a7f98df2ee9 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml @@ -0,0 +1,129 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/qcom,coresight-dummy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QCOM Coresight Dummy component + +description: | + The Coresight Dummy component is for the specific devices that HLOS don'= t have + permission to access or configure. Such as Coresight sink EUD, some TPDM= s etc. + So there need driver to register dummy devices as Coresight devices. Pro= vide + Coresight API for dummy device operations, such as enabling and disabling + dummy devices. Build the Coresight path for dummy sink or dummy source f= or + debugging. + + The primary use case of the coresight dummy is to build path for dummy s= ink or + dummy source. + +maintainers: + - Mao Jinlong + - Tao Zhang + - Hao Zhang + +select: + properties: + compatible: + contains: + enum: + - qcom,coresight-dummy + required: + - compatible + +properties: + $nodename: + pattern: "^dummy(@[0-9a-f]+)$" + compatible: + items: + - const: qcom,coresight-dummy + + reg: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: apb_pclk + + qcom,dummy-sink: + type: boolean + description: + Indicates that the type of this coresight node is dummy sink. + + qcom,dummy-source: + type: boolean + description: + Indicates that the type of this coresight node is dummy source. + + out-ports: + description: | + Output connections from the dummy source to Coresight Trace bus. + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port: + description: Output connection from the dummy source to Coresight + Trace bus. + $ref: /schemas/graph.yaml#/properties/port + + in-puts: + description: | + Input connections from the CoreSight Trace bus to dummy sink. + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port: + description: Input connection from the Coresight Trace bus to + dummy sink. + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + - clocks + - clock-names + - oneOf: + - qcom,dummy-sink + - qcom,dummy-source + +additionalProperties: false + +examples: + # minimum dummy sink definition. dummy sink connect to coresight replica= tor. + - | + dummy_eud: dummy_sink { + compatible =3D "qcom,dummy"; + qcom,dummy-sink; + + in-ports { + port { + eud_in_replicator_swao: endpoint { + remote-endpoint =3D + <&replicator_swao_out_eud>; + }; + }; + }; + }; + + # minimum dummy source definition. dummy source connect to coresight fun= nel. + - | + dummy_riscv: dummy_source { + compatible =3D "qcom,dummy"; + qcom,dummy-source; + + out-ports { + port { + dummy_riscv_out_funnel_swao: endpoint { + remote-endpoint =3D + <&funnel_swao_in_dummy_riscv>; + }; + }; + }; + }; + +... --=20 2.17.1 From nobody Wed Feb 11 09:00:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 041EDC6FD1D for ; Thu, 16 Mar 2023 03:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbjCPDYR (ORCPT ); Wed, 15 Mar 2023 23:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjCPDXw (ORCPT ); Wed, 15 Mar 2023 23:23:52 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 444ACAB880; Wed, 15 Mar 2023 20:21:43 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32G242Ka026441; Thu, 16 Mar 2023 03:20:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=XNhxMsKw6ZAe+EYt13fPXlDqqycgBNXXfO0jTrz0x0w=; b=gW9G8XBTj3if7WlOW+L/yimmKoQhdti9K51EsKqThS3aNaI2G32PH1eXTfuGxIAS7AGZ 4Zj8c68I4CXrbZgCS2g165Q3pgjCvr2xYiGr19/ElfzIixsw0CP12DBVQBAbqzC6vi3D Npk5o2q0dKFTywHQSuVEB9RL7CQzUao+F/g5wcJvfrjey25uaLWjw/NgIxSAKMGmkB6t lHdT3Xqt1rK3OSWY3TR+EmIfKDSNmnGf5rAvJ50q2Hf7N+/fubRLdY0FtLv58z7BEok9 H9DVcSAbVfbDeSEOiN7NaSboM/NR1KQUhGuE8w03f8JeJHpm3Ue8xYGEPepfjOeid4te Pw== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pbpxjrhp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Mar 2023 03:20:22 +0000 Received: from pps.filterd (APTAIPPMTA02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32G3KKK4003071; Thu, 16 Mar 2023 03:20:20 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTP id 3p8jqmp091-1; Thu, 16 Mar 2023 03:20:20 +0000 Received: from APTAIPPMTA02.qualcomm.com (APTAIPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32G3KK4P003062; Thu, 16 Mar 2023 03:20:20 GMT Received: from hazha-gv.ap.qualcomm.com (hazha-gv.qualcomm.com [10.239.105.144]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTP id 32G3KJUX003058; Thu, 16 Mar 2023 03:20:20 +0000 Received: by hazha-gv.ap.qualcomm.com (Postfix, from userid 4083943) id 0E8331200071; Thu, 16 Mar 2023 11:20:19 +0800 (CST) From: Hao Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski , Andy Gross , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jonathan Corbet Cc: Hao Zhang , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Jinlong Mao , Yuanfang Zhang , Tao Zhang , Trilok Soni , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-doc@vger.kernel.org Subject: [PATCH v1 3/3] Documentation: trace: Add documentation for Coresight Dummy Trace Date: Thu, 16 Mar 2023 11:20:05 +0800 Message-Id: <20230316032005.6509-4-quic_hazha@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230316032005.6509-1-quic_hazha@quicinc.com> References: <20230316032005.6509-1-quic_hazha@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: gkiyfvKfL9NWFB60ffMpVHMHfwfOY26B X-Proofpoint-ORIG-GUID: gkiyfvKfL9NWFB60ffMpVHMHfwfOY26B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-16_02,2023-03-15_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 phishscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 mlxscore=0 bulkscore=0 clxscore=1015 mlxlogscore=981 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303160028 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add documentation for Coresight Dummy Trace under trace/coresight. Signed-off-by: Hao Zhang --- .../trace/coresight/coresight-dummy.rst | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/trace/coresight/coresight-dummy.rst diff --git a/Documentation/trace/coresight/coresight-dummy.rst b/Documentat= ion/trace/coresight/coresight-dummy.rst new file mode 100644 index 000000000000..819cabab8623 --- /dev/null +++ b/Documentation/trace/coresight/coresight-dummy.rst @@ -0,0 +1,58 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D +Coresight Dummy Trace Module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D + + :Author: Hao Zhang + :Date: March 2023 + +Introduction +--------------------------- + +Coresight Dummy Trace Module is for the specific devices that HLOS don't +have permission to access or configure. Such as Coresight sink EUD, some +TPDMs etc. So there need driver to register dummy devices as Coresight +devices. Provide Coresight API for dummy device operations, such as +enabling and disabling dummy devices. Build the Coresight path for dummy +sink or dummy source for debugging. + +Sysfs files and directories +--------------------------- + +Root: ``/sys/bus/coresight/devices/dummy`` + +---- + +:File: ``enable_source`` (RW) +:Notes: + - > 0 : enable the datasets of dummy source. + + - =3D 0 : disable the datasets of dummy source. + +:Syntax: + ``echo 1 > enable_source`` + +---- + +:File: ``enable_sink`` (RW) +:Notes: + - > 0 : enable the datasets of dummy sink. + + - =3D 0 : disable the datasets of dummy sink. + +:Syntax: + ``echo 1 > enable_sink`` + +---- + +Config details +--------------------------- + +There are two types of nodes, dummy sink and dummy source. The nodes +should be observed at the coresight path +"/sys/bus/coresight/devices". +e.g. +/sys/bus/coresight/devices # ls -l | grep dummy +dummy0 -> ../../../devices/platform/soc@0/soc@0:dummy_source/dummy0 +dummy1 -> ../../../devices/platform/soc@0/soc@0:dummy_sink/dummy1 --=20 2.17.1