From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E39B3FB7E3; Wed, 29 Apr 2026 12:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777467145; cv=none; b=W45CSB7UIYjDsPQh+pIsOgNNuqXS5qRZ6GubyNHYiXOdHeoV3WC/kLdfCHHvguYXPVTaqP+ODqVHTEtYglL9she7Cy8+VS83SqlIWpnDUzaepeirK+7UWFhjVI3R56a9K1QWpkS/JAN3Yhwx0Abi18mUba34FqZrnPSUm+TcziU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777467145; c=relaxed/simple; bh=f44O/Uugp01hYZOvnvq9HQzQyqdukwHS5lfoOw7Ue1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iKV238jLXl7wsmY8C/5YXOOOa0u6O8dudt8MEVVA5jq2NYDkfWGgDjdniREaeDyCNqWOXzx5vN6IddioJzj3c85aWLlSan2PULQR1EO2N5DEEYFk8Gps0ORc+Vxygc1zqduLQyeKwwoaayTtLMQjG/kXXcuZr2lSqeZK1P2Eg6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=LSr9jn23; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="LSr9jn23" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63T8ppQX2094110; Wed, 29 Apr 2026 12:51:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=aMr4dNH/MUu z0ffOYJvBodOSH1/WkRI3RDB077bVJDU=; b=LSr9jn23ws9lajZm32KMQ2hCvzg Lqmrp618DUKgA5WHawJnjGT3rz4PGvr9g8BBqBmWZxLos42cbAkXrxanNmuGOECk I0rM2d/QkvppZzSiG3FDWVy/two83hxj5Mn8P9xkyHf9sf79TlPsVljUNTTTNbhO GJUfXmkj6ZtDASRGhpRGisX6sta6EJ6vADw20nYqp2GQ0UGvQaRIHKo/ocJt3GjW /jQRY8SNdg/C9juFvplaPeB5DUW644PyuCFtYZaXgqeeLz155F83uQJAQkn9ybps 1r1S6niP6RUCNUIx20H5E+S84HxmE3Yf2kGATr0ZWMGP9xzNUY1tXv9a82w== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dudh3sb6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2026 12:51:41 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.7/8.18.1.7) with ESMTP id 63TCpb9t010774; Wed, 29 Apr 2026 12:51:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4ds65fvr0v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2026 12:51:37 +0000 (GMT) Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.1.12) with ESMTP id 63TCpbNh010752; Wed, 29 Apr 2026 12:51:37 GMT Received: from hu-devc-blr-u24-a.qualcomm.com (hu-anuppate-blr.qualcomm.com [10.131.36.165]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 63TCpbR8010745 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Apr 2026 12:51:37 +0000 (GMT) Received: by hu-devc-blr-u24-a.qualcomm.com (Postfix, from userid 486687) id B0B0F21528; Wed, 29 Apr 2026 18:21:36 +0530 (+0530) From: Anup Patel To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Greg KH , Alexander Shishkin , Ian Rogers Cc: Alexandre Ghiti , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Jiri Olsa , Adrian Hunter , Mayuresh Chitale , Anup Patel , Atish Patra , Andrew Jones , Sunil V L , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v4 01/12] dt-bindings: Add RISC-V trace component bindings Date: Wed, 29 Apr 2026 18:21:24 +0530 Message-ID: <20260429125135.1983498-2-anup.patel@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260429125135.1983498-1-anup.patel@oss.qualcomm.com> References: <20260429125135.1983498-1-anup.patel@oss.qualcomm.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-GUID: fom-9IEamIzqjHC9QLXaOefEFnMqkAo6 X-Authority-Analysis: v=2.4 cv=A4dc+aWG c=1 sm=1 tr=0 ts=69f1fedd cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=W-_n0kkjAAAA:8 a=N_VqnJttRWTASdLJg5MA:9 a=sptkURWiP4Gy88Gu7hUp:22 a=qeNa2pbTr82C0GpJEZFS:22 X-Proofpoint-ORIG-GUID: fom-9IEamIzqjHC9QLXaOefEFnMqkAo6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDI5MDEzMCBTYWx0ZWRfX8Y+Qt8AQBN9W dUIw4wc/u/ZAac09vLwEUd/q09Wro9vRjp8tAlk8SQTBT25C1PlnTrWLFoFWVJFMOfJD7snB3mR DXqevkNbHUQBvjdGKuaYf082eA0lUEpO+/qwt6UvUuCKWjWMpJe2Bfo3CXLJ9H/V5odPwjLCy0Z vtTEYZ/5F12pv1qrdZwh1gBDBfUFDw8bNPwLNmgxxCE1c8eRyRe3fNB6FO9WyjvHKUMHpgCw0Yh ZDxZzjbz+pBYVmI6iNmdjIYlLATQvVBFO9uR/klU+AmvUt64+4pBljgemav+BTfLuMeS6OcFisw HA3099v5GqhPOSalAfk/dWzspEb/7/ainTngnNvficen6VP7haHgZwL4PA5Dv6Z4nF/gcFOa9ya hyOHeDSTkwJfXEU2F4t25sGGWqlrfHHQ7NhEdzmbqVjD5HRzdNNiFDSKoj5U/o+MkmngPqT4bKm 3uzkPg7DflPuKXlHwmQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-28_05,2026-04-28_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 spamscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 bulkscore=0 impostorscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604290130 Add device tree bindings for the memory mapped RISC-V trace components which support both the RISC-V efficient trace (E-trace) protocol and the RISC-V Nexus-based trace (N-trace) protocol. The RISC-V trace components are defined by the RISC-V trace control interface specification. Signed-off-by: Anup Patel --- .../bindings/riscv/riscv,trace-component.yaml | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml diff --git a/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml b/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml new file mode 100644 index 000000000000..bb519bc4a163 --- /dev/null +++ b/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml @@ -0,0 +1,120 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/riscv/riscv,trace-component.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RISC-V Trace Component + +maintainers: + - Anup Patel + +description: + The RISC-V trace control interface specification standard memory mapped + components (or devices) which support both the RISC-V efficient trace + (E-trace) protocol and the RISC-V Nexus-based trace (N-trace) protocol. + The RISC-V trace components have implementation specific directed acyclic + graph style interdependency where output of one component serves as input + to another component and certain components (such as funnel) can take inputs + from multiple components. The type and version of a RISC-V trace component + can be discovered from it's IMPL memory mapped register hence component + specific compatible strings are not needed. + +properties: + compatible: + items: + - enum: + - qemu,trace-component + - const: riscv,trace-component + + reg: + maxItems: 1 + + cpus: + maxItems: 1 + description: + phandle to the cpu to which the RISC-V trace component is bound. + + in-ports: + $ref: /schemas/graph.yaml#/properties/ports + patternProperties: + '^port(@[0-7])?$': + description: Input connections from RISC-V trace component + $ref: /schemas/graph.yaml#/properties/port + + out-ports: + $ref: /schemas/graph.yaml#/properties/ports + patternProperties: + '^port(@[0-7])?$': + description: Output connections from RISC-V trace component + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + +anyOf: + - required: [ in-ports ] + - required: [ out-ports ] + +unevaluatedProperties: false + +examples: + - | + // Example 1 (Per-hart encoder and ramsink components): + + trace@c000000 { + compatible = "qemu,trace-component", "riscv,trace-component"; + reg = <0xc000000 0x1000>; + cpus = <&CPU0>; + + out-ports { + port { + CPU0_ENCODER_OUTPUT: endpoint { + remote-endpoint = <&CPU0_RAMSINK_INPUT>; + }; + }; + }; + }; + + trace@c001000 { + compatible = "qemu,trace-component", "riscv,trace-component"; + reg = <0xc001000 0x1000>; + cpus = <&CPU0>; + + in-ports { + port { + CPU0_RAMSINK_INPUT: endpoint { + }; + }; + }; + }; + + trace@c002000 { + compatible = "qemu,trace-component", "riscv,trace-component"; + reg = <0xc002000 0x1000>; + cpus = <&CPU1>; + + out-ports { + port { + CPU1_ENCODER_OUTPUT: endpoint { + remote-endpoint = <&CPU1_RAMSINK_INPUT>; + }; + }; + }; + }; + + trace@c003000 { + compatible = "qemu,trace-component", "riscv,trace-component"; + reg = <0xc003000 0x1000>; + cpus = <&CPU1>; + + in-ports { + port { + CPU1_RAMSINK_INPUT: endpoint { + }; + }; + }; + }; + +... -- 2.43.0