From nobody Sun Oct 5 09:10:00 2025 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 61652244E8C; Wed, 6 Aug 2025 10:27:22 +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=1754476044; cv=none; b=oajD6i3iL5X6QVtEqtKc7Mu1nwVOp26KRPW+oP+9vnrB3kIcR5wqusp6K+cH4Ey2WTQhbwPak9c3Q5s4llQWS1g+MFlvGvj17/c0v0G3LA8mexTwNcGqEyib27DSYMCcPvpE4cgmCY0faoFDuwC/4EeAd5+x7Ipkxynvvw3aeIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754476044; c=relaxed/simple; bh=zMDa6geO1E8x6J2DZtJkG1wc7SVhQBTS/4MwrcT0/TI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ipIz2cOk6ywSrBUeZuvRIepdPFWU7kfdC1dN9VkdhwMyyDG4JRMNa7CuVd5t3cEVpdGqi5SeCsbCcofq/Q0gSx7XW5QEdP4kFFSy3fZXjMvfLBEWR5akHdS3HSTEv2QpDPWjdpoahDRd1n8o+xP1b1Edl14f1rQiDv+Iq0i0LqQ= 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=m33GbMQL; arc=none smtp.client-ip=205.220.180.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="m33GbMQL" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5769ekJG032246; Wed, 6 Aug 2025 10:27:13 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= Qwm+UjEPRIZ0qNK/Yj6Iuy4ylM15S97DIRgqe5a+wRc=; b=m33GbMQLKnXxSDiA INxSyYnf9Hw/0NxJk6zfQKrzyLbOtNUy/B+4lFAzC+JsWBBE0n1BapJgmP3s87xv VEwFpqmq8MiQu5Uan21WkAUmEwrROeD0hb5W946xYdifrbKuV5tr3+rudYH4flJn M6GczgqW4ceJFn2Di/qAfQQom19wR8vlvpxaHp7qF+PU6zZoXj/Rkh1lLablPEI6 h1Ew/XrNZ3J/Rk8e/l3G2g7dXZ3a+umJLjtsK5gdzkWDpUhQxyYrMd32TJZqtMNC 8hgktM6IFp+Xlb9Km5PTEKcEJWaaKh8P+34gaDA5NGHunjHaUtVhMU5oC6075/7k JuVyTQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48bpw2tf5q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 10:27:12 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 576ARBPf012436 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 6 Aug 2025 10:27:11 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.1748.10; Wed, 6 Aug 2025 03:27:11 -0700 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , "Bjorn Andersson" , Konrad Dybcio CC: Mao Jinlong , , , , , , "Krzysztof Kozlowski" Subject: [PATCH v10 1/2] dt-bindings: arm: Add label in the coresight components Date: Wed, 6 Aug 2025 03:26:57 -0700 Message-ID: <20250806102658.536683-2-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250806102658.536683-1-quic_jinlmao@quicinc.com> References: <20250806102658.536683-1-quic_jinlmao@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Authority-Analysis: v=2.4 cv=Vbz3PEp9 c=1 sm=1 tr=0 ts=68932e00 cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=3H110R4YSZwA:10 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=lttKXCBnEA6mHFaSAm4A:9 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: hdxJwik6Slo3pGl-FT5ZiAL5eyt-dMYI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDAwOCBTYWx0ZWRfX1o/uvGxBEzHQ HkxuagS0ArCPQerGWy2YCjvS3cn7VAHuuavA/ifMBmQN+/iOXIBZQAJNeNUMmr+R/AahpGEh+vb AXYy3zKAPrWewkH7jERSJ7EdJSv4XYQFyOHV1GyrZ08rzW+PqA9uEawIPljYZ/oYt4BhSMHbgH5 KLVsBiyMgoQdCdeRNEDpBH3oJOi7+oH/9tNst3wkcIiETA8cIlL0nt+p7W87l2CLvQTdKr0Vn3K Xu7gk9ebg3Zj6Yv1gFBOeSDBRaMKRWAjQnwzYKcAZe6Sr3Y4fqbC5F7ocohFPgq/ViDdL0yIQaC eteVGiaMH5t5H14NFXF7vZKlyv+hG2DGwNOJQMuJETAAMarSJ17Y3XfjE/gEeb2eQbPFsZ9v0To 6Q8Xqwd6 X-Proofpoint-GUID: hdxJwik6Slo3pGl-FT5ZiAL5eyt-dMYI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_02,2025-08-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 priorityscore=1501 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060008 Content-Type: text/plain; charset="utf-8" Current name of coresight component's folder consists of prefix of the device and the id in the device list. When run 'ls' command, we can get the register address of the device. Take CTI for example, if we want to set the config for modem CTI, but we can't know which CTI is modem CTI from all current information. cti_sys0 -> ../../../devices/platform/soc@0/138f0000.cti/cti_sys0 cti_sys1 -> ../../../devices/platform/soc@0/13900000.cti/cti_sys1 Add label to show hardware context information of each coresight device. There will be a sysfs node label in each device folder. cat /sys/bus/coresight/devices/cti_sys0/label Signed-off-by: Mao Jinlong Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mike Leach --- Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml | 4 ++++ .../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml | 4 ++++ .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 4 ++++ .../devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml | 4 ++++ .../bindings/arm/arm,coresight-dynamic-replicator.yaml | 4 ++++ .../devicetree/bindings/arm/arm,coresight-etb10.yaml | 4 ++++ Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml | 4 ++++ .../devicetree/bindings/arm/arm,coresight-static-funnel.yaml | 4 ++++ .../bindings/arm/arm,coresight-static-replicator.yaml | 4 ++++ Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml | 4 ++++ Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml | 4 ++++ .../devicetree/bindings/arm/qcom,coresight-ctcu.yaml | 4 ++++ .../devicetree/bindings/arm/qcom,coresight-remote-etm.yaml | 4 ++++ .../devicetree/bindings/arm/qcom,coresight-tpda.yaml | 4 ++++ .../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 4 ++++ 15 files changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b= /Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml index 2d5545a2b49c..2a91670ccb8c 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml @@ -98,6 +98,10 @@ properties: power-domains: maxItems: 1 =20 + label: + description: + Description of a coresight device. + arm,cti-ctm-id: $ref: /schemas/types.yaml#/definitions/uint32 description: diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink= .yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml index 08b89b62c505..ed091dc0c10a 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml @@ -39,6 +39,10 @@ properties: enum: - arm,coresight-dummy-sink =20 + label: + description: + Description of a coresight device. + in-ports: $ref: /schemas/graph.yaml#/properties/ports =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sour= ce.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.= yaml index 742dc4e25d3b..78337be42b55 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml @@ -38,6 +38,10 @@ properties: enum: - arm,coresight-dummy-source =20 + label: + description: + Description of a coresight device. + arm,static-trace-id: description: If dummy source needs static id support, use this to set = trace id. $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-fu= nnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-fun= nel.yaml index 44a1041cb0fc..b74db15e5f8a 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.ya= ml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.ya= ml @@ -57,6 +57,10 @@ properties: power-domains: maxItems: 1 =20 + label: + description: + Description of a coresight device. + in-ports: $ref: /schemas/graph.yaml#/properties/ports =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-re= plicator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic= -replicator.yaml index 03792e9bd97a..17ea936b796f 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicato= r.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicato= r.yaml @@ -54,6 +54,10 @@ properties: - const: apb_pclk - const: atclk =20 + label: + description: + Description of a coresight device. + power-domains: maxItems: 1 =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml= b/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml index 90679788e0bf..892df7aca1ac 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-etb10.yaml @@ -54,6 +54,10 @@ properties: - const: apb_pclk - const: atclk =20 + label: + description: + Description of a coresight device. + power-domains: maxItems: 1 =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml b= /Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml index 01200f67504a..71f2e1ed27e5 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-etm.yaml @@ -85,6 +85,10 @@ properties: CPU powers down the coresight component also powers down and loses i= ts context. =20 + label: + description: + Description of a coresight device. + arm,cp14: type: boolean description: diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-static-fun= nel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-static-funne= l.yaml index cc8c3baa79b4..9598a3d0a95b 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml @@ -30,6 +30,10 @@ properties: power-domains: maxItems: 1 =20 + label: + description: + Description of a coresight device. + in-ports: $ref: /schemas/graph.yaml#/properties/ports =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-static-rep= licator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-static-r= eplicator.yaml index 0c1017affbad..b81851b26c74 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator= .yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator= .yaml @@ -43,6 +43,10 @@ properties: - const: dbg_trc - const: dbg_apb =20 + label: + description: + Description of a coresight device. + in-ports: $ref: /schemas/graph.yaml#/properties/ports additionalProperties: false diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml b= /Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml index 4787d7c6bac2..96dd5b5f771a 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml @@ -55,6 +55,10 @@ properties: - const: apb_pclk - const: atclk =20 + label: + description: + Description of a coresight device. + iommus: maxItems: 1 =20 diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml = b/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml index 61a0cdc27745..a207f6899e67 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tpiu.yaml @@ -54,6 +54,10 @@ properties: - const: apb_pclk - const: atclk =20 + label: + description: + Description of a coresight device. + power-domains: maxItems: 1 =20 diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-ctcu.yaml= b/Documentation/devicetree/bindings/arm/qcom,coresight-ctcu.yaml index 843b52eaf872..c969c16c21ef 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-ctcu.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-ctcu.yaml @@ -39,6 +39,10 @@ properties: items: - const: apb =20 + label: + description: + Description of a coresight device. + in-ports: $ref: /schemas/graph.yaml#/properties/ports =20 diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-remote-et= m.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.ya= ml index 4fd5752978cd..ffe613efeabe 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml @@ -20,6 +20,10 @@ properties: compatible: const: qcom,coresight-remote-etm =20 + label: + description: + Description of a coresight device. + out-ports: $ref: /schemas/graph.yaml#/properties/ports additionalProperties: false diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml= b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml index 5ed40f21b8eb..a48c9ac3eaa9 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml @@ -64,6 +64,10 @@ properties: items: - const: apb_pclk =20 + label: + description: + Description of a coresight device. + in-ports: description: | Input connections from TPDM to TPDA diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml= b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml index 07d21a3617f5..4edc47483851 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml @@ -76,6 +76,10 @@ properties: minimum: 0 maximum: 32 =20 + label: + description: + Description of a coresight device. + clocks: maxItems: 1 =20 --=20 2.25.1 From nobody Sun Oct 5 09:10:00 2025 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 1F73E207A22; Wed, 6 Aug 2025 10:27: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=1754476044; cv=none; b=kMV/hGMwEeL3UKKxGIBRjd8Wy/HMem4MHwIYChYb16wxj0LrdOFTJ+Xbz0hY1MCtV4zZIlFIg0HBQztxYWEWS5mNwgN7fewfsR6b73rJB0RbZ7wSCWhdqFholJjpohnnlSugbIhQ6UnkIs+YNY42NqUsNZZFjdqKNNJh9bYFDwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754476044; c=relaxed/simple; bh=KXEnvsIQlch7RC78IC1IuKVaEmZv7AKY/z7oswIZZcA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X1PldUvu9o13ZlWnG7ExLmwGxIz19pBdMvywvRrXrm09oaTJAGJfuoHXO+0cDvhohU4QMvbFiT7vBGtlsfw9e5np1vC7tAmtH33ZcI8jmoyK+ylkDsRpvJoTlXlmEeynpvJflsa8xslZ1zknUCtzSVmTdGZZmsjx7+MreLdZKVQ= 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=jM2LmUUR; arc=none smtp.client-ip=205.220.180.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="jM2LmUUR" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5769ekJH032246; Wed, 6 Aug 2025 10:27:13 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= DW4b37uIH7FvakOuSRW4Gj04OfaHZK+d6mA+RJ87dAA=; b=jM2LmUURWYXHXyI9 Hh5fdgs3w6erBv4tUtgg4inQ9APJzXJk/wBGo0oC9Ll76ntBNsDrFZaNFzBmRvA0 gHWGZYhfeOOwJS4K+F/230g9EVjHgOMRWRjdGQwv1I1N3Dz37oh+J3vwz11kgVQB KDL46gURQBTJZzqjHeetke+YjjLA7Qk0cyPKy0QopqtIiCcLgW5iS9y0P1W8xthn ZWVVdsj/csGe5DnRgg2QW/73v1AJN5/FCEhv8Z8mu4j6WZkc4Ot0py5KAJoOlXDc 533YYxOdptOLnWCSHl1ddFe/3QY4ouTeCGF+8FV8YQ0N9VBJDhsfVa2gehCzDEPB Y8wEtQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48bpw2tf5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Aug 2025 10:27:13 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 576ARCnY008346 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 6 Aug 2025 10:27:12 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.1748.10; Wed, 6 Aug 2025 03:27:11 -0700 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , "Bjorn Andersson" , Konrad Dybcio CC: Mao Jinlong , , , , , Subject: [PATCH v10 2/2] coresight: Add label sysfs node support Date: Wed, 6 Aug 2025 03:26:58 -0700 Message-ID: <20250806102658.536683-3-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250806102658.536683-1-quic_jinlmao@quicinc.com> References: <20250806102658.536683-1-quic_jinlmao@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Authority-Analysis: v=2.4 cv=Vbz3PEp9 c=1 sm=1 tr=0 ts=68932e01 cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=3H110R4YSZwA:10 a=2OwXVqhp2XgA:10 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=7CQSdrXTAAAA:8 a=TYLdrY_46NNtcs5PGGUA:9 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-ORIG-GUID: pyjaQ6l-TGUmGu5MGwA5swW56i376AO5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA2MDAwOCBTYWx0ZWRfXwssf7RSmzttW nXyTgf7/mq1Kqw+j70ZeEBnBq6c20B1WfXVvL5oJjXiOIKAuD0Z+DGRhvz0FUhcOkALo6GQsU/C fsLE5nM0JQnrN31JDx3zqlHsS9+2LUFq6yMkkE3rNvH/MmX9EbXlQ9dGQM1Tnl1cQ2igHdsE5RL /Ir8gLfEKWs2vRaTx1mcVo0e7vAsTHuVqtxYJvRaYQrhRwZIXg4w0CP0UE41sf4qKeI1+vxfWOn 4OVxGkPdRJLfkNJPLA8s3gtDFMdDfD37Vg3VMj3Emwwo1uAGw1ASHlonAxn14Zc66G75CZJD2EZ ZeTR0sqXmycpUP4T/hEZfFz8CzCe3zI9XX3Ru+hjZHi+ZgpGLIsaC59AsoNMSVzvMjLdVfw62kP 5Wvfcl4T X-Proofpoint-GUID: pyjaQ6l-TGUmGu5MGwA5swW56i376AO5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-06_02,2025-08-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 priorityscore=1501 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508060008 Content-Type: text/plain; charset="utf-8" For some coresight components like CTI and TPDM, there could be numerous of them. From the node name, we can only get the type and register address of the component. We can't identify the HW or the system the component belongs to. Add label sysfs node support for showing the intuitive name of the device. Signed-off-by: Mao Jinlong Reviewed-by: Mike Leach --- .../testing/sysfs-bus-coresight-devices-cti | 6 ++ .../sysfs-bus-coresight-devices-dummy-source | 6 ++ .../testing/sysfs-bus-coresight-devices-etb10 | 6 ++ .../testing/sysfs-bus-coresight-devices-etm3x | 6 ++ .../testing/sysfs-bus-coresight-devices-etm4x | 6 ++ .../sysfs-bus-coresight-devices-funnel | 6 ++ .../testing/sysfs-bus-coresight-devices-stm | 6 ++ .../testing/sysfs-bus-coresight-devices-tmc | 6 ++ .../testing/sysfs-bus-coresight-devices-tpdm | 6 ++ .../testing/sysfs-bus-coresight-devices-trbe | 6 ++ drivers/hwtracing/coresight/coresight-sysfs.c | 71 ++++++++++++++++++- 11 files changed, 129 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti b/Do= cumentation/ABI/testing/sysfs-bus-coresight-devices-cti index a97b70f588da..5f609c0f50c6 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti @@ -239,3 +239,9 @@ Date: March 2020 KernelVersion: 5.7 Contact: Mike Leach or Mathieu Poirier Description: (Write) Clear all channel / trigger programming. + +What: /sys/bus/coresight/devices//label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-so= urce b/Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source index 0830661ef656..46c091f5951b 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source @@ -13,3 +13,9 @@ KernelVersion: 6.14 Contact: Mao Jinlong Description: (R) Show the trace ID that will appear in the trace stream coming from this trace entity. + +What: /sys/bus/coresight/devices/dummy_source/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 b/= Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 index 9a383f6a74eb..ff2143558044 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etb10 @@ -19,6 +19,12 @@ Description: (RW) Disables write access to the Trace RAM= by stopping the into the Trace RAM following the trigger event is equal to the value stored in this register+1 (from ARM ETB-TRM). =20 +What: /sys/bus/coresight/devices/.etb/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. + What: /sys/bus/coresight/devices/.etb/mgmt/rdp Date: March 2016 KernelVersion: 4.7 diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x b/= Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x index 271b57c571aa..bcd804085306 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x @@ -251,6 +251,12 @@ KernelVersion: 4.4 Contact: Mathieu Poirier Description: (RO) Holds the cpu number this tracer is affined to. =20 +What: /sys/bus/coresight/devices/.[etm|ptm]/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. + What: /sys/bus/coresight/devices/.[etm|ptm]/mgmt/etmccr Date: September 2015 KernelVersion: 4.4 diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x b/= Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x index a0425d70d009..4af7d5e1754e 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x @@ -329,6 +329,12 @@ Contact: Mathieu Poirier Description: (RW) Access the selected single show PE comparator control register. =20 +What: /sys/bus/coresight/devices/etm/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. + What: /sys/bus/coresight/devices/etm/mgmt/trcoslsr Date: April 2015 KernelVersion: 4.01 diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel b= /Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel index d75acda5e1b3..e77c1fb9e795 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel @@ -10,3 +10,9 @@ Date: November 2014 KernelVersion: 3.19 Contact: Mathieu Poirier Description: (RW) Defines input port priority order. + +What: /sys/bus/coresight/devices/.funnel/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-stm b/Do= cumentation/ABI/testing/sysfs-bus-coresight-devices-stm index 53e1f4815d64..10e9410cfe38 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-stm +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-stm @@ -51,3 +51,9 @@ KernelVersion: 4.7 Contact: Mathieu Poirier Description: (RW) Holds the trace ID that will appear in the trace stream coming from this trace entity. + +What: /sys/bus/coresight/devices/.stm/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc b/Do= cumentation/ABI/testing/sysfs-bus-coresight-devices-tmc index 339cec3b2f1a..d270174d9bb2 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc @@ -107,3 +107,9 @@ Contact: Anshuman Khandual Description: (RW) Current Coresight TMC-ETR buffer mode selected. But user= could only provide a mode which is supported for a given ETR device. This file is available only for TMC ETR devices. + +What: /sys/bus/coresight/devices/.tmc/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm b/D= ocumentation/ABI/testing/sysfs-bus-coresight-devices-tpdm index a341b08ae70b..b0eae1fcff7d 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm @@ -272,3 +272,9 @@ KernelVersion 6.15 Contact: Jinlong Mao (QUIC) , Tao Zhang (QUIC) <= quic_taozha@quicinc.com> Description: (RW) Set/Get the enablement of the individual lane. + +What: /sys/bus/coresight/devices//label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe b/D= ocumentation/ABI/testing/sysfs-bus-coresight-devices-trbe index ad3bbc6fa751..3c0bc754576f 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-trbe @@ -12,3 +12,9 @@ Contact: Anshuman Khandual Description: (Read) Shows if TRBE updates in the memory are with access and dirty flag updates as well. This value is fetched from the TRBIDR register. + +What: /sys/bus/coresight/devices/trbe/label +Date: Aug 2025 +KernelVersion 6.17 +Contact: Mao Jinlong +Description: (Read) Show hardware context information of device. diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtrac= ing/coresight/coresight-sysfs.c index feadaf065b53..5e52324aa9ac 100644 --- a/drivers/hwtracing/coresight/coresight-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-sysfs.c @@ -7,6 +7,7 @@ #include #include #include +#include =20 #include "coresight-priv.h" #include "coresight-trace-id.h" @@ -371,17 +372,81 @@ static ssize_t enable_source_store(struct device *dev, } static DEVICE_ATTR_RW(enable_source); =20 +static ssize_t label_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + + const char *str; + int ret; + + ret =3D fwnode_property_read_string(dev_fwnode(dev), "label", &str); + if (ret =3D=3D 0) + return sysfs_emit(buf, "%s\n", str); + else + return ret; +} +static DEVICE_ATTR_RO(label); + +static umode_t label_is_visible(struct kobject *kobj, + struct attribute *attr, int n) +{ + struct device *dev =3D kobj_to_dev(kobj); + + if (attr =3D=3D &dev_attr_label.attr) { + if (fwnode_property_present(dev_fwnode(dev), "label")) + return attr->mode; + else + return 0; + } + + return attr->mode; +} + static struct attribute *coresight_sink_attrs[] =3D { &dev_attr_enable_sink.attr, + &dev_attr_label.attr, NULL, }; -ATTRIBUTE_GROUPS(coresight_sink); + +static struct attribute_group coresight_sink_group =3D { + .attrs =3D coresight_sink_attrs, + .is_visible =3D label_is_visible, +}; +__ATTRIBUTE_GROUPS(coresight_sink); =20 static struct attribute *coresight_source_attrs[] =3D { &dev_attr_enable_source.attr, + &dev_attr_label.attr, NULL, }; -ATTRIBUTE_GROUPS(coresight_source); + +static struct attribute_group coresight_source_group =3D { + .attrs =3D coresight_source_attrs, + .is_visible =3D label_is_visible, +}; +__ATTRIBUTE_GROUPS(coresight_source); + +static struct attribute *coresight_link_attrs[] =3D { + &dev_attr_label.attr, + NULL, +}; + +static struct attribute_group coresight_link_group =3D { + .attrs =3D coresight_link_attrs, + .is_visible =3D label_is_visible, +}; +__ATTRIBUTE_GROUPS(coresight_link); + +static struct attribute *coresight_helper_attrs[] =3D { + &dev_attr_label.attr, + NULL, +}; + +static struct attribute_group coresight_helper_group =3D { + .attrs =3D coresight_helper_attrs, + .is_visible =3D label_is_visible, +}; +__ATTRIBUTE_GROUPS(coresight_helper); =20 const struct device_type coresight_dev_type[] =3D { [CORESIGHT_DEV_TYPE_SINK] =3D { @@ -390,6 +455,7 @@ const struct device_type coresight_dev_type[] =3D { }, [CORESIGHT_DEV_TYPE_LINK] =3D { .name =3D "link", + .groups =3D coresight_link_groups, }, [CORESIGHT_DEV_TYPE_LINKSINK] =3D { .name =3D "linksink", @@ -401,6 +467,7 @@ const struct device_type coresight_dev_type[] =3D { }, [CORESIGHT_DEV_TYPE_HELPER] =3D { .name =3D "helper", + .groups =3D coresight_helper_groups, } }; /* Ensure the enum matches the names and groups */ --=20 2.25.1