From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 AC5011C863B for ; Wed, 23 Apr 2025 06:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745389622; cv=none; b=JmMXvS2S8PWOQ678xKdx9GwIpiuA4BGUucyN8lDxmy1FIjTk+sfSnKIpjY3DjldyNGdEjxBcRLSVsELXj4KCvYeImcVdFXX5wnqytpxt3mRONJGDy1HCShEbn0s5WSgZv+LU5O1ETB+So90nrYTZsP0JD4Hm/2PAP+O9HFmgr3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745389622; c=relaxed/simple; bh=yqGpH2aThU+nKQjs8KC1mOaWJu2iC3pxpZchxfCBqVQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=HM/t5xJv+CPpgCrRLplVL59z4D/naLLFR9hlQMFgvbsGVy2yYYrAf8WiO0srK+xyFG/kmNFcmgQuQgTU/dSzgRlUl5lh4+7UmDbaAL2/cSQ3XSMn4CDfonn7CSsheJRQgu0YqxUW2pe1vNR4lvNEY8PZseHBsUkTT/HdvzdAfdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EAFOk2g5; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EAFOk2g5" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53N0i7NA022433 for ; Wed, 23 Apr 2025 06:27:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= mnpdyBHgKacwIPDCZR87HPu6qkrnPCIn4xlRJ7d0MkA=; b=EAFOk2g5TWuITPb6 naghTCqSrwUYzrKQRwfQ2QmUUDq/3OQm3PNQ8PyR4FgL0vOQ3i6isQdLL6Av2BqZ 0/Ut1UgiWNkGmATxwTCONYpS2Ia0uCjp0AbO308G69O6Ze1bij6wkP/7hvuAHs2H tmHbwkG8RQVwGxp0R9VW0KIv6hy+/BP95J8phbm05W9u1ZQF6GmG0xnuGel8U9sr bSp8UalCg9YOrEpaUHEK0MBmddiBuM3T51wAjpF2CfeBlhL0Bmf721rpRU/GXLTa YVa2kv67iGMBmu42ve5eFG/GqoFVnlrYRX6jCVIny7MY6qpJFgToFlfmPmOx6jhv 8Mrnhg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 466jh2931c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Apr 2025 06:26:59 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 53N6QxNf028840 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Apr 2025 06:26:59 GMT Received: from ap-cloud-sh02-lnx.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 22 Apr 2025 23:26:58 -0700 From: Songwei Chai Date: Wed, 23 Apr 2025 14:26:45 +0800 Subject: [PATCH v4 1/7] dt-bindings: arm: Add support for Coresight TGU trace Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20250423-tgu_patch-v4-1-92bbca66c766@quicinc.com> References: <20250423-tgu_patch-v4-0-92bbca66c766@quicinc.com> In-Reply-To: <20250423-tgu_patch-v4-0-92bbca66c766@quicinc.com> To: CC: X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745389616; l=5873; i=quic_songchai@quicinc.com; s=20250423; h=from:subject:message-id; bh=yqGpH2aThU+nKQjs8KC1mOaWJu2iC3pxpZchxfCBqVQ=; b=mpjzXWAtx+64nA+MULh3ya68sCk9M5xHLuSbCVN9vTfFkULgBHXatXTnLBWzwUeo2MZknQpBM TUw1uJLuxfXCogv9ywDRBU55NgYWNVG0DoaR+y9bepcU3wRXayRrDHs X-Developer-Key: i=quic_songchai@quicinc.com; a=ed25519; pk=uPEL8tAga6UMzd+eo6u4Mmg7ctrdZe8b/sjFJqJYEHA= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 8MftsQEUxuKD0IGqHfAiS34nzv2SVc6- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNDIzMDA0MiBTYWx0ZWRfX48Ow2W9qogme ipofCPV4W4BHIus2UypSCRSFYOGNxx1bqIsSuccXXNeGMCVhnUaIhl3e5Dq+pd1AE+ZgA5HJYOh h1nprsH6lYWfZxv3CaVK8JqxtHDhcV6pEuoEBJtcVcITGD4IvQNOGm+o+2vmHzuYT5sA1Q6RFkm 7G/W2vf0AgDdyqOM0xOz61X4iBfBw69ZKqI6ZZ5/44LdSQYAetafNznRD4xYEiPcHzv3JgAgVL4 8C2Dbsnvdwq508CQAn/cCG1lFICil3ABQ6Zjk1P14sNhqvSWEYEU2J7cVA3zEo/2CCvgzWB1wSe YWjOzGncF7TsZHYhiueIZ/KTFF5MmsrI6MtuAC8fcFWT8AEVRIubbQ7LT3/Ug7KuvrIaD9qch9k osRhmjQxt2LhXG3CdJv85jqcW2UTOh07jiNAFkZU/4pIHo71ygT1HOgVmKrb2iHRf77wu7+4 X-Authority-Analysis: v=2.4 cv=Tu/mhCXh c=1 sm=1 tr=0 ts=68088833 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=gEfo2CItAAAA:8 a=COk6AnOGAAAA:8 a=N3VNWiZ0WD7Ir0aJMQYA:9 a=QEXdDO2ut3YA:10 a=sptkURWiP4Gy88Gu7hUp:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: 8MftsQEUxuKD0IGqHfAiS34nzv2SVc6- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-23_05,2025-04-22_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2504230042 The Trigger Generation Unit (TGU) is designed to detect patterns or sequences within a specific region of the System on Chip (SoC). Once configured and activated, it monitors sense inputs and can detect a pre-programmed state or sequence across clock cycles, subsequently producing a trigger. TGU configuration space offset table x-------------------------x | | | | | | Step configuration | | space layout | coresight management | x-------------x | registers | |---> | | | | | | reserve | | | | | | |-------------------------| | |-------------| | | | | priority[3] | | step[7] |<-- | |-------------| |-------------------------| | | | priority[2] | | | | | |-------------| | ... | |Steps region | | priority[1] | | | | | |-------------| |-------------------------| | | | priority[0] | | |<-- | |-------------| | step[0] |--------------------> | | |-------------------------| | condition | | | | | | control and status | x-------------x | space | | | x-------------------------x |Timer/Counter| | | x-------------x TGU Configuration in Hardware The TGU provides a step region for user configuration, similar to a flow chart. Each step region consists of three register clusters: 1.Priority Region: Sets the required signals with priority. 2.Condition Region: Defines specific requirements (e.g., signal A reaches three times) and the subsequent action once the requirement is met. 3.Timer/Counter (Optional): Provides timing or counting functionality. Add a new coresight-tgu.yaml file to describe the bindings required to define the TGU in the device trees. Signed-off-by: Songwei Chai --- .../bindings/arm/qcom,coresight-tgu.yaml | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tgu.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tgu.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3576d38711261806522295f8b3d8eadb1559ed41 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tgu.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +# Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/qcom,coresight-tgu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Trigger Generation Unit - TGU + +description: | + The Trigger Generation Unit (TGU) is a Data Engine which can be utilized + to sense a plurality of signals and create a trigger into the CTI or + generate interrupts to processors. The TGU is like the trigger circuit + of a Logic Analyzer. The corresponding trigger logic can be realized by + configuring the conditions for each step after sensing the signal. + Once setup and enabled, it will observe sense inputs and based upon + the activity of those inputs, even over clock cycles, may detect a + preprogrammed state/sequence and then produce a trigger or interrupt. + + The primary use case of the TGU is to detect patterns or sequences on a + given set of signals within some region to indentify the issue in time + once there is abnormal behavior in the subsystem. + +maintainers: + - Mao Jinlong + - Sam Chai + +# Need a custom select here or 'arm,primecell' will match on lots of nodes +select: + properties: + compatible: + contains: + enum: + - qcom,coresight-tgu + required: + - compatible + +properties: + compatible: + items: + - const: qcom,coresight-tgu + - const: arm,primecell + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: apb_pclk + + in-ports: + $ref: /schemas/graph.yaml#/properties/ports + additionalProperties: false + + properties: + port: + description: + The port mechanism here ensures the relationship between TGU and + TPDM, as TPDM is one of the inputs for TGU. It will allow TGU to + function as TPDM's helper and enable TGU when the connected + TPDM is enabled. + $ref: /schemas/graph.yaml#/properties/port + +required: + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + tgu@10b0e000 { + compatible = "qcom,coresight-tgu", "arm,primecell"; + reg = <0x10b0e000 0x1000>; + + clocks = <&aoss_qmp>; + clock-names = "apb_pclk"; + + in-ports { + port { + tgu_in_tpdm_swao: endpoint{ + remote-endpoint = <&tpdm_swao_out_tgu>; + }; + }; + }; + }; +... -- 2.34.1