From patchwork Tue Jan 17 14:57:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Jinlong X-Patchwork-Id: 44698 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1801987wrn; Tue, 17 Jan 2023 07:01:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXs4AsToAcI6h3sR81hsy0Z9saxcYeAWy/Vuar8UQJLzahCa/74p5AajR+JswWgsLWjH9zkz X-Received: by 2002:a17:906:a0ce:b0:86e:7683:422b with SMTP id bh14-20020a170906a0ce00b0086e7683422bmr2837640ejb.68.1673967689132; Tue, 17 Jan 2023 07:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673967689; cv=none; d=google.com; s=arc-20160816; b=hSBryU0EoId6KyOCsllsSjPDhsVHfCq3iE8gd9k6DK1uois36wmD2prJWjD6lE8wY0 CnR45+Lc+sX5JsSYq6QR/wwsguP35ww061pAF10wxiNnrFyxbXa+vUtNvur9eAoQjjVY eIMFZqCIzDeznnqGi5E/LQV2drm46CteN3r1qdShmAiT1DSM2Y6PNLpbIXaAFtQVnelX CtB8u4QoY5Sy6om4LnMPcEvPRdrnSFRXWlmZMpIp2kRud1i7hoDGAqG5wMuIiOPSxA9q g5tweHBsDcG1dsyrTGNcPyT605azqn21fGseKLxZElXdFPDTyBVbKxxSFzmZrm9mfoL3 Afcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W91GH9dRt9D2/nly/D2+yxH0JODbx+OlF5N1k9ZNh9M=; b=yA8t0Z/oYzbj8YpI8fHtbnSMCdYxn2xQJePVEAL9LQqu5fHqYLEzpJXOMHF3/ILkwU YOTzmEgY3WpNWB1IXr3ujlPnXKdyheRv2CO7JgzN8ylJYbdEK93hJBMNBAU/WeUqAQNV 14wifjlbc6myBEhpAn9Cb+3Rr1o6m2rW8nfGCtfysTbpZqXQEaXCv0+xOz92vEdR5ixo FLm+0bTq4CwRYjl+mrjfaiXSwqi9blQKz96/65XdNr2j5aSa1l0fFYQBPbHlVd3EIXiG Sn8+iCm5hL/UFx7R+0Qhd4YFVRHoAqdszlqHJCB9GXLF7i/ssgB7P75QQ98EfvOdAr2F vGYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=C5raDvdv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wy10-20020a170906fe0a00b0084d37a7d9casi9457459ejb.187.2023.01.17.07.00.57; Tue, 17 Jan 2023 07:01:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=C5raDvdv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232831AbjAQO54 (ORCPT + 99 others); Tue, 17 Jan 2023 09:57:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjAQO5j (ORCPT ); Tue, 17 Jan 2023 09:57:39 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BCEB3E61B; Tue, 17 Jan 2023 06:57:38 -0800 (PST) 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 30HEgcvM010972; Tue, 17 Jan 2023 14:57:23 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 : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=W91GH9dRt9D2/nly/D2+yxH0JODbx+OlF5N1k9ZNh9M=; b=C5raDvdvQ2VmrgrV1fSJspwhNACgDkqox/9gvFTO9Mc4ZwLjCMcUEqWF2ZaOGaUmcw3k 9UY+UzpYmJ9ci8leXP/4vR6tFJQezzsbj9vRLfU/z7rqKYNK3OyPcTvvz+L1kGazU8w2 hvt+hMVDu17qUfXMec1YyB56Z/feYXUP6RI9DrnrOGB+L1R31j4w5U2sN544jxAz0HXm GrZSCv56lL7M4mleDwqDzwHOBR/zAZIZGKjUYLE12vt6ejTeX+8zHZIvo/urRICNaPSk idkgc+WVT4z6dn91QKLCtLslXm/E09+LeZWD713u8iICfFzdOHx6XyKsTkvOv80R8+wJ qQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n5b189p2u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 14:57:23 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30HEvM5T018741 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 14:57:22 GMT Received: from hu-jinlmao-lv.qualcomm.com (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 17 Jan 2023 06:57:21 -0800 From: Mao Jinlong To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski CC: Mao Jinlong , Leo Yan , "Greg Kroah-Hartman" , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang , Trilok Soni , Hao Zhang , , Bjorn Andersson , Rob Herring Subject: [PATCH v17 7/9] dt-bindings: arm: Adds CoreSight TPDA hardware definitions Date: Tue, 17 Jan 2023 06:57:06 -0800 Message-ID: <20230117145708.16739-8-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117145708.16739-1-quic_jinlmao@quicinc.com> References: <20230117145708.16739-1-quic_jinlmao@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: lIpIBA-jJN8cbYRqatlUNgG17iCEcKp8 X-Proofpoint-ORIG-GUID: lIpIBA-jJN8cbYRqatlUNgG17iCEcKp8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_06,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 priorityscore=1501 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170121 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755282343208648518?= X-GMAIL-MSGID: =?utf-8?q?1755282343208648518?= Adds new coresight-tpda.yaml file describing the bindings required to define tpda in the device trees. Acked-by: Suzuki K Poulose Reviewed-by: Rob Herring Reviewed-by: Mike Leach Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong --- .../bindings/arm/qcom,coresight-tpda.yaml | 129 ++++++++++++++++++ MAINTAINERS | 2 +- 2 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml new file mode 100644 index 000000000000..2ec9b5b24d73 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.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-tpda.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Trace, Profiling and Diagnostics Aggregator - TPDA + +description: | + TPDAs are responsible for packetization and timestamping of data sets + utilizing the MIPI STPv2 packet protocol. Pulling data sets from one or + more attached TPDM and pushing the resultant (packetized) data out a + master ATB interface. Performing an arbitrated ATB interleaving (funneling) + task for free-flowing data from TPDM (i.e. CMB and DSB data set flows). + + There is no strict binding between TPDM and TPDA. TPDA can have multiple + TPDMs connect to it. But There must be only one TPDA in the path from the + TPDM source to TMC sink. TPDM can directly connect to TPDA's inport or + connect to funnel which will connect to TPDA's inport. + + We can use the commands are similar to the below to validate TPDMs. + Enable coresight sink first. + + echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink + echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source + echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test + echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test + + The test data will be collected in the coresight sink which is enabled. + If rwp register of the sink is keeping updating when do integration_test + (by cat tmc_etf0/mgmt/rwp), it means there is data generated from TPDM + to sink. + +maintainers: + - Mao Jinlong + - Tao Zhang + +# Need a custom select here or 'arm,primecell' will match on lots of nodes +select: + properties: + compatible: + contains: + enum: + - qcom,coresight-tpda + required: + - compatible + +properties: + $nodename: + pattern: "^tpda(@[0-9a-f]+)$" + compatible: + items: + - const: qcom,coresight-tpda + - const: arm,primecell + + reg: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: apb_pclk + + in-ports: + type: object + description: | + Input connections from TPDM to TPDA + $ref: /schemas/graph.yaml#/properties/ports + + out-ports: + type: object + description: | + Output connections from the TPDA to legacy CoreSight trace bus. + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port: + description: + Output connection from the TPDA to legacy CoreSight Trace bus. + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + - clocks + - clock-names + - in-ports + - out-ports + +additionalProperties: false + +examples: + # minimum tpda definition. + - | + tpda@6004000 { + compatible = "qcom,coresight-tpda", "arm,primecell"; + reg = <0x6004000 0x1000>; + + clocks = <&aoss_qmp>; + clock-names = "apb_pclk"; + + in-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + tpda_qdss_0_in_tpdm_dcc: endpoint { + remote-endpoint = + <&tpdm_dcc_out_tpda_qdss_0>; + }; + }; + }; + + out-ports { + port { + tpda_qdss_out_funnel_in0: endpoint { + remote-endpoint = + <&funnel_in0_in_tpda_qdss>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index b11d0540bb9d..d8343cde1924 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2124,7 +2124,7 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git F: Documentation/ABI/testing/sysfs-bus-coresight-devices-* F: Documentation/devicetree/bindings/arm/arm,coresight-*.yaml -F: Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml +F: Documentation/devicetree/bindings/arm/qcom,coresight-*.yaml F: Documentation/devicetree/bindings/arm/arm,embedded-trace-extension.yaml F: Documentation/devicetree/bindings/arm/arm,trace-buffer-extension.yaml F: Documentation/trace/coresight/*