From nobody Wed Oct 8 00:44:45 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 750A42E62DF; Thu, 3 Jul 2025 13:05:32 +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=1751547934; cv=none; b=upJB5j0XVTlPwZxjTQNw1mwQXa4RBzpTikcT2OvgVpUOS1tVlZW59oEpKgA94XvAODXMVLYMckBVzjhJMIGtJBIJIEe+fOrHhelxbn+j83z+1+9lIKt8hHYAk8YvXdA82sRIZezVc0h8Z5xgKaJBzIw2gqVeOSyYYGdzmlfjt+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751547934; c=relaxed/simple; bh=ENwYM3GT8rtXMdRl+Kcz8VKX1m6WvfmHEE7+B7zlxZ8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dxAHi8Tw84zvNv6ZmFFj/S9JvibOiFgChM/6oBIh6s3qo6XGw6MC7fx0yYOnfmpu7F6uVUkq2LjW4bnqraFVaKuqKbvksmeymQ4vg9YZfTc7vKGI6qYv+fCsWmsyebqYb5ZdHLzoG3plQjS6hi/83GRkatDeq2l3WumOMjDYyHI= 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=L1GwJ2aT; 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="L1GwJ2aT" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5637e4Ho024769; Thu, 3 Jul 2025 13:05:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=wqAISnYaodB/zxGpiVkzt2OK xktYuPv1mTd83UKa5iE=; b=L1GwJ2aTwNBxnNwNDhLEyYPchyowEU+qUnzJ5/0I UEaoahIXI6pqEUDd7Y85m4b4pBbMAPLQTRVJW8FD26HD8MS6arfk2lu45XuN9PM6 roKrywPQmFI1jqRQAQQPfU3OZZQiDpWcy5rKQJAzUy9gAb0cn3HcuK8qnMpzUkz1 Xy+SNe+hGIl+zM7mjLlulPKG0w5++EQQEHfkAnIUxqS8U++0eZGdTfIXVyNgWA8i loFrvgz6M6B60P0/gsXqgkCuHS/3S4+JvH5WXzeyc/F0eonWA98PuMIRYt0mIiLU 6Gpat3qWIRXQZfF/2HF7g6pvWP7fCDEEaINXVxObR+HVVQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j8s9rhxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Jul 2025 13:05:21 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 563D5G1S014509 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Jul 2025 13:05:16 GMT Received: from jinlmao-gv.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.1748.10; Thu, 3 Jul 2025 06:05:13 -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 v8 1/2] dt-bindings: arm: Add label in the coresight components Date: Thu, 3 Jul 2025 21:04:52 +0800 Message-ID: <20250703130453.4265-2-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250703130453.4265-1-quic_jinlmao@quicinc.com> References: <20250703130453.4265-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 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-Authority-Analysis: v=2.4 cv=H/Pbw/Yi c=1 sm=1 tr=0 ts=68668012 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=krfrvTQUIteJPxDwGS8A:9 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: zL0e70W3XM2JWbRrgBAMsplHmBZ35qzY X-Proofpoint-GUID: zL0e70W3XM2JWbRrgBAMsplHmBZ35qzY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAzMDExMCBTYWx0ZWRfX6h2RrPYf6awz sjY5AzSFDPIeuQSPK3r/yRaXQ/9B9ctIHnXZh6WXtF1G5qEuOEHnpMx2JP6ZBxIQ6fH+3AyjuNU qrKoUWG5o3JoJYr5XuVpPsCPAuiSKsb3OHtSmwwUKnpaXuq3ZJElySRYXUTHvLrviCPjMW4CHhk SceO0Jai+8uUo5oWwx9jHGFARsRwjonyD1/Q1/dKVtaIAKFV03KHo+cQtbppRqGmP3jyziNS5MX TrXHWebSp2RMHeTuix2pw91nQLWMj+ed8KFNN+2NSjTil1esa9kDNTGiGyklBFHMQCegaJaBpSv N6bXf8Bj9PQ7JPWdcPLw7RVO7tT9ec4a2vhS7GNv/gltg9hg4ja36Hzj9u9v2++82bblEBS56/f HCeGb+299WY33TSBZ5gK2xu4iY0SU4bKL/HDHzwx/c2rgT6w4c3LXMsjvMBggvksCvOngjE1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-03_03,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1011 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507030110 Content-Transfer-Encoding: quoted-printable 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 --- .../devicetree/bindings/arm/arm,coresight-cti.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 6 ++++++ .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 6 ++++++ .../bindings/arm/arm,coresight-dynamic-replicator.yaml | 6 ++++++ .../bindings/arm/arm,coresight-static-funnel.yaml | 6 ++++++ .../bindings/arm/arm,coresight-static-replicator.yaml | 6 ++++++ .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 6 ++++++ .../devicetree/bindings/arm/qcom,coresight-tpda.yaml | 6 ++++++ .../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 6 ++++++ 10 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..5ca6d3d313a3 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml @@ -98,6 +98,12 @@ properties: power-domains: maxItems: 1 =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..bc82cd1f3595 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml @@ -39,6 +39,12 @@ properties: enum: - arm,coresight-dummy-sink =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..3010055d5ad6 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml @@ -38,6 +38,12 @@ properties: enum: - arm,coresight-dummy-source =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..30776610d4b4 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,12 @@ properties: power-domains: maxItems: 1 =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..178a3861ee29 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,12 @@ properties: - const: apb_pclk - const: atclk =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + power-domains: maxItems: 1 =20 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..39b291909cc4 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-funnel.yaml @@ -30,6 +30,12 @@ properties: power-domains: maxItems: 1 =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..a3e8a105b2ae 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator= .yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator= .yaml @@ -43,6 +43,12 @@ properties: - const: dbg_trc - const: dbg_apb =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..6a37ebaf474b 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml +++ b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml @@ -55,6 +55,12 @@ properties: - const: apb_pclk - const: atclk =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + iommus: maxItems: 1 =20 diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml= b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml index 5ed40f21b8eb..f42ecb4e8539 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml @@ -64,6 +64,12 @@ properties: items: - const: apb_pclk =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + 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..5e758476ad7f 100644 --- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml @@ -76,6 +76,12 @@ properties: minimum: 0 maximum: 32 =20 + label: + $ref: /schemas/types.yaml#/definitions/string + description: + Define the label which can describe what kind of HW or system the + coresight device belongs to. + clocks: maxItems: 1 =20 --=20 2.17.1 From nobody Wed Oct 8 00:44:45 2025 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 B1D10B67A; Thu, 3 Jul 2025 13:05:30 +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=1751547932; cv=none; b=s6kaqVmzjxvyWmlseN/Rf967446b24HfPgBP/LDStc4lVqhfQytuGbDZj3VyMDTTsi0q11k+NJ7TPnc81VZT62TWXXegJpBHviYyRC5yav71N5Gulf6R/9IMahpMQVVAZ+CyJKddcWV+k6LxGy4A3UTmrFiQGM+Qgz8haVCDg70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751547932; c=relaxed/simple; bh=KWQWe/2rOMqjWmggideruA2h1ff7EC5EYkhc2XTmOi0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=htkw7Bl6yG6nuuIvoJBC7LRd4khAFDKxWP2p75J2WaQsON9M1mcqs8VlX87wXWI8s8zatfYKLMWlVFrAOIWg1alWNm9LyhtT4LG4i3Bv9cStl/MOGWgDHVzmExoIEmF95CzH9+Hk1Y8vt4bdOi95oU5F8SUY0lqfjZ625Icj2f8= 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=iJYARejf; 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="iJYARejf" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5637ZEWF028430; Thu, 3 Jul 2025 13:05:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=OQLVnRvv+YGw1jFayOnumqym NCBejpVtWN727o3J2xc=; b=iJYARejfuOe+aaFoELolVcKyldstFRMkVnQLOaQF STCqg7cpv7NHR+h/oB+djgTm42M+7e9yVsH0dTanevfE3DuyAz2lrwuBm3bRLI6w +jskPcmPjwlqYWSC3yUc/BJ/+RkSRx8Exn7LDIMPgwVeeCcMcoax8lODXQYSPL+Y r5fYz7tRKyQ6x/Uuv3+NzQy70y50dqUxP5CSdWDwtR8CTi4Q5zdC/Mt//9nDe7XY RjU7nVMH3Uo/NPn7roYROiAphEJ9QXzbSZBbwVJnyWltaUj0v73lRHVlumdBoPuk LrBh/pSUngKfvHZ1fkEdn4EI+LRNPMs6QWtOcCXwqtaE4w== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j7bw0nnj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Jul 2025 13:05:21 +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 563D5KHe000970 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 3 Jul 2025 13:05:20 GMT Received: from jinlmao-gv.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.1748.10; Thu, 3 Jul 2025 06:05:16 -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 v8 2/2] coresight: Add label sysfs node support Date: Thu, 3 Jul 2025 21:04:53 +0800 Message-ID: <20250703130453.4265-3-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250703130453.4265-1-quic_jinlmao@quicinc.com> References: <20250703130453.4265-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 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: yKGtCAjpT3fr4cKy89wmWtXVnIoNdt3N X-Authority-Analysis: v=2.4 cv=RJCzH5i+ c=1 sm=1 tr=0 ts=68668011 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=3OtES_ux56hhsM0WwqAA:9 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: yKGtCAjpT3fr4cKy89wmWtXVnIoNdt3N X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAzMDExMCBTYWx0ZWRfXyZ+a5XOXdK1X ywTR60Xx8YDbpSqXbEnpP57s2OFkZV3RVcOP+EMW37e+xlVxrYfcmizK/TaOlNO6ta2yj/Atubh jxs5M9HCV9gso1W91FA82WzfngW4drALkbGpmWA9NBHeVkam5ew9qdHgEwPNdT4YzmDZ9Cmn/9s lfKOgcPdMGuE4Sze4gOgoHj5iFAyDZmVUSFKF3a5/H+50HHjAQteHp32jckXhZhlkhrsZN6QE+v ig7MjplqeMdwrt6mE28K2jRFxVz+OUStgTrBuU2eG3sit7y1n7BDm2pkBS0SiKV3NWwNGmBFj/M 0oY5WUMAKA0SLDQ9VbKtaUJUVdM4xDeuhH/N7WlI7MG6NYdza9o6L0eg+f0Mo+GsW+5NbqcJZen y7+c1kWYYFn/0n7GcBTUK8te+q/m/vzap1iQs7WR41iQv96OMyr//I44Xay+T7sa5c4B/073 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-03_03,2025-07-02_04,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507030110 Content-Transfer-Encoding: quoted-printable 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-funnel | 6 ++++ .../testing/sysfs-bus-coresight-devices-tpdm | 6 ++++ drivers/hwtracing/coresight/coresight-sysfs.c | 32 +++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-cti b/Do= cumentation/ABI/testing/sysfs-bus-coresight-devices-cti index a97b70f588da..55367bbc696f 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: Jul 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-funnel b= /Documentation/ABI/testing/sysfs-bus-coresight-devices-funnel index d75acda5e1b3..5578fa5f6f02 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: Jul 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..e6d935e83042 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: Jul 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..e3d21c49814d 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,18 +372,47 @@ 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 =3D 0; + + ret =3D fwnode_property_read_string(dev_fwnode(dev), "label", &str); + if (ret =3D=3D 0) + return scnprintf(buf, PAGE_SIZE, "%s\n", str); + else + return ret; +} +static DEVICE_ATTR_RO(label); + static struct attribute *coresight_sink_attrs[] =3D { &dev_attr_enable_sink.attr, + &dev_attr_label.attr, NULL, }; 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); =20 +static struct attribute *coresight_link_attrs[] =3D { + &dev_attr_label.attr, + NULL, +}; +ATTRIBUTE_GROUPS(coresight_link); + +static struct attribute *coresight_helper_attrs[] =3D { + &dev_attr_label.attr, + NULL, +}; +ATTRIBUTE_GROUPS(coresight_helper); + const struct device_type coresight_dev_type[] =3D { [CORESIGHT_DEV_TYPE_SINK] =3D { .name =3D "sink", @@ -390,6 +420,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 +432,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.17.1