From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EEA0DEE4996 for ; Mon, 21 Aug 2023 17:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8HJNWj6sGilMRNIgkCZvJvi0iI0TNJxXIHq5xlYDShk=; b=wIhZSax/kQ2DRY 6Bmc93+UKeB72eUVlrvlbt7MKIa/KKjHyvX/Dd/bWncvNysG0xl7OruhHDuTf1HUB8XrHU62mcwNv pIdCi1q6MaUXYBsak5YxN3qFVzctXX9Re8GNBrAA5YV/19WROKXjiZjg9uotL/sd8Q8i4PiwRzCiB LxaLp0FsFSZQG6zRp7rNHmLw/wYMB1ipTncCp76Y/YJ9DPue+dE1VlrgNKZAXz6PtW0zGmrtPh6vh f2LDVyRCSxlFbmXPn7FSlvTe29Z6hGwv3SnQyIrqAUH3l3q7lEa/R930lRp4UYDhMY9XIVl3LnMq8 OJLfaI1k3IZ4F4Tn/znw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qY96c-00EUBJ-3C; Mon, 21 Aug 2023 17:54:22 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qY96a-00EUAr-0k for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2023 17:54:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 889FB615A2; Mon, 21 Aug 2023 17:54:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23B92C433C7; Mon, 21 Aug 2023 17:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692640458; bh=eULPeh9pcpIpgr9n3QKkncPC16Bdlg+o+kHreVFr5n0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BrWbWRtDp0sKSJrWAQKeLiEyMgEDfDNX+CoCjIBPnfX7kGpxJEE06KMQcoejyh4QK aKusKDihtP0LLZTsTTQBS2j5qoD+vPZ5+NkeV/CSllzz1eqbbRxSpaMTd0bZ6ZRFwh 1TaxiCkDS9+9SECz+5oseNL4WIBL/+J5Tye+3JvagXwCL7J5nrw5fhIGzh4sOB8aE/ sjkkaGyuV/BqVh2ZhVQuAcpt5D2rgOXhUqaIDOdaFiG0F0R2HKsb//iGrBV+DShDqS MK9qdGWdzqx78Lj4PwSgMSNxWOKEcs0MltNv1aXfl/OFH9XYSUTakgcj4rM4gtqKdd oD3GjxRJVZo3A== Received: (nullmailer pid 2032613 invoked by uid 1000); Mon, 21 Aug 2023 17:54:16 -0000 Date: Mon, 21 Aug 2023 12:54:16 -0500 From: Rob Herring To: Mao Jinlong Cc: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin , Andy Gross , Bjorn Andersson , Konrad Dybcio , Krzysztof Kozlowski , Conor Dooley , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Yuanfang Zhang , Tao Zhang , Hao Zhang Subject: Re: [PATCH v2 2/3] dt-bindings: arm: Adds CoreSight CSR hardware definitions Message-ID: <20230821175416.GA2022808-robh@kernel.org> References: <20230813151253.38128-1-quic_jinlmao@quicinc.com> <20230813151253.38128-3-quic_jinlmao@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230813151253.38128-3-quic_jinlmao@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230821_105420_351515_2ACBA08E X-CRM114-Status: GOOD ( 29.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Aug 13, 2023 at 11:12:52PM +0800, Mao Jinlong wrote: > Adds new coresight-csr.yaml file describing the bindings required > to define csr in the device trees. Why? What is CSR? Control & Status Registers in my book. > > Signed-off-by: Mao Jinlong > --- > .../bindings/arm/qcom,coresight-csr.yaml | 130 ++++++++++++++++++ > MAINTAINERS | 2 +- > include/dt-bindings/arm/coresight-csr-dt.h | 12 ++ > 3 files changed, 143 insertions(+), 1 deletion(-) > create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml > create mode 100644 include/dt-bindings/arm/coresight-csr-dt.h > > diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml > new file mode 100644 > index 000000000000..de4baa335fdb > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-csr.yaml > @@ -0,0 +1,130 @@ > +# 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-csr.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: CoreSight Slave Register - CSR > + > +description: | Don't need '|' > + CoreSight Slave Register block hosts miscellaneous configuration registers. > + Those configuration registers can be used to control, various coresight > + configurations. I still have no idea what this block does other than something related to Coresight. > + > +maintainers: > + - Mao Jinlong > + - Hao Zhang > + > +properties: > + $nodename: > + pattern: "^csr(@[0-9a-f]+)$" > + compatible: > + items: > + - const: qcom,coresight-csr > + > + reg: > + minItems: 1 > + maxItems: 2 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + items: > + - const: apb_pclk > + > + # size cells and address cells required if assoc_device node present. > + "#size-cells": > + const: 0 > + > + "#address-cells": > + const: 1 > + > +patternProperties: > + '^assoc_device@([0-9]+)$': Unit-addresses are typically hex. > + type: object > + description: > + A assocated device child node which describes the required configs > + between this CSR and another hardware device. This device may be ETR or > + TPDM device. > + > + properties: > + reg: > + maxItems: 1 I don't understand what 'reg' signifies here. > + > + arm,cs-dev-assoc: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + defines a phandle reference to an associated CoreSight trace device. > + When the associated trace device is enabled, then the respective CSR > + will be enabled. If the associated device has not been registered > + then the node name will be stored as the assocated name for later > + resolution. registered? Sounds like a OS detail that doesn't belong in DT. > + > + qcom,cs-dev-type: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Device type of the Assocated device. Types are in coresight-csr-dt.h. Constraints? > + > + qcom,csr-bytecntr-offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + The ETR irqctrl register offset. If the assocated device is ETR > + device and there are more than one ETR devices, this property need > + to be added. You should know the register offset based on the ETR compatible. > + > + interrupts: > + minItems: 1 > + > + interrupt-names: > + minItems: 1 > + > + required: > + - reg > + - qcom,cs-dev-type > + - qcom,cs-dev-assoc > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + > +additionalProperties: false > + > +examples: > + # minimum CSR definition. > + - | > + csr@10001000 { > + compatible = "qcom,coresight-csr"; > + reg = <0 0x10001000 0 0x1000>; > + > + clocks = <&aoss_qmp>; > + clock-names = "apb_pclk"; > + }; > + # Assocated with ETR device > + - | > + #include > + #include > + > + csr@10001000 { > + compatible = "qcom,coresight-csr"; > + reg = <0 0x10001000 0 0x1000>; > + > + clocks = <&aoss_qmp>; > + clock-names = "apb_pclk"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + assoc_device@0 { > + reg = <0>; > + qcom,cs-dev-type = ; > + qcom,cs-dev-assoc = <&tmc_etr>; > + qcom,csr-bytecntr-offset = <0x6c>; > + interrupts = ; > + interrupt-names = "byte-cntr-irq"; > + }; > + }; > +... > + > diff --git a/MAINTAINERS b/MAINTAINERS > index d516295978a4..3ed81a8fd1d0 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2042,7 +2042,7 @@ F: Documentation/devicetree/bindings/arm/arm,trace-buffer-extension.yaml > F: Documentation/devicetree/bindings/arm/qcom,coresight-*.yaml > F: Documentation/trace/coresight/* > F: drivers/hwtracing/coresight/* > -F: include/dt-bindings/arm/coresight-cti-dt.h > +F: include/dt-bindings/arm/coresight-*.h > F: include/linux/coresight* > F: samples/coresight/* > F: tools/perf/arch/arm/util/auxtrace.c > diff --git a/include/dt-bindings/arm/coresight-csr-dt.h b/include/dt-bindings/arm/coresight-csr-dt.h > new file mode 100644 > index 000000000000..804b9bbeb2bd > --- /dev/null > +++ b/include/dt-bindings/arm/coresight-csr-dt.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ > +/* > + * This header provides constants for the defined device > + * types on CoreSight CSR. > + */ > + > +#ifndef _DT_BINDINGS_ARM_CORESIGHT_CSR_DT_H > +#define _DT_BINDINGS_ARM_CORESIGHT_CSR_DT_H > + > +#define CSR_ASSOC_DEV_ETR 1 > + > +#endif /*_DT_BINDINGS_ARM_CORESIGHT_CSR_DT_H */ > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel