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 X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63614C43464 for ; Sat, 19 Sep 2020 00:26:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA75121D20 for ; Sat, 19 Sep 2020 00:26:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p0GS/KP1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA75121D20 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u0mkIk6IMQxJbiQHXr7G/P/gtzxh2cr5KGZCyHnaN6c=; b=p0GS/KP1ZZ5MlhQG8hiGDHnZV XPZhbs6yD5ekM7PPO3Dg0qtWLISYIsYywOI2Z6xVNr7Z1a/kLY56cPORxJdx7kdG++kxdNrGoHAx8 scUcLeLrUsHychKyn34foixPV9QFc1liGn2AucxStysPGy4h7foVjjW7GERFO7XVmkUQXEj0wXJMz gDbve+Q4CcOooBmuWtXTsP4468lGntQ4kA3cVfkHr0v/hT63IQ8LZrUl0LlseKJT32oc4OBCdb3hH T9AS5ufXxWSEjw9RWNNopxvHmN4jH6kokt+YQmx07cZ46yu33LgDDCEn5RXyxN4tzceVRxEkD2eDZ wRWn4CMXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJQfU-0008L8-9T; Sat, 19 Sep 2020 00:23:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJQfS-0008KQ-CT for linux-arm-kernel@lists.infradead.org; Sat, 19 Sep 2020 00:23:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 168F01045; Fri, 18 Sep 2020 17:23:51 -0700 (PDT) Received: from [10.57.37.232] (unknown [10.57.37.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8BA433F718; Fri, 18 Sep 2020 17:23:48 -0700 (PDT) Subject: Re: [PATCH v2.1 1/3] perf: Add Arm CMN-600 DT binding To: Rob Herring References: <3647765303e8936d45a69fe7c1f92b8d1b45de4b.1600452762.git.robin.murphy@arm.com> From: Robin Murphy Message-ID: <152e2d42-9ace-f78b-145a-5882ce936c3e@arm.com> Date: Sat, 19 Sep 2020 01:23:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_202354_514673_4CB93F1B X-CRM114-Status: GOOD ( 26.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, patrik.berglund@arm.com, tuanphan@os.amperecomputing.com, tsahee@amazon.com, harb@amperecomputing.com, linux-arm-kernel , james.yang@arm.com, Will Deacon , "Saidi, Ali" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-09-18 19:54, Rob Herring wrote: > On Fri, Sep 18, 2020 at 12:24 PM Robin Murphy wrote: >> >> Document the requirements for the CMN-600 DT binding. The internal >> topology is almost entirely discoverable by walking a tree of ID >> registers, but sadly both the starting point for that walk and the >> exact format of those registers are configuration-dependent and not >> discoverable from some sane fixed location. Oh well. >> >> Signed-off-by: Robin Murphy >> --- >> >> fix up $id as well, oops... >> >> .../devicetree/bindings/perf/arm,cmn.yaml | 57 +++++++++++++++++++ >> 1 file changed, 57 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/perf/arm,cmn.yaml > > Do you expect this to cover more than cmn-600? If not, use the > compatible string for the file name. As far as I'm aware, future CMN products will maintain the same general PMU design, but with enough subtle differences to deserve their own compatible strings. >> diff --git a/Documentation/devicetree/bindings/perf/arm,cmn.yaml b/Documentation/devicetree/bindings/perf/arm,cmn.yaml >> new file mode 100644 >> index 000000000000..e4fcc0de25e2 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/perf/arm,cmn.yaml >> @@ -0,0 +1,57 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +# Copyright 2020 Arm Ltd. >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/perf/arm,cmn.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Arm CMN (Coherent Mesh Network) Performance Monitors >> + >> +maintainers: >> + - Robin Murphy >> + >> +properties: >> + compatible: >> + const: arm,cmn-600 >> + >> + reg: >> + items: >> + - description: Physical address of the base (PERIPHBASE) and >> + size (up to 64MB) of the configuration address space. >> + >> + interrupts: >> + minItems: 1 >> + maxItems: 4 >> + items: >> + - description: Overflow interrupt for DTC0 >> + - description: Overflow interrupt for DTC1 >> + - description: Overflow interrupt for DTC2 >> + - description: Overflow interrupt for DTC3 >> + description: One interrupt for each DTC domain implemented must >> + be specified, in order. DTC0 is always present. > > What's DTC? Debug and Trace Controller. I figure it's one of those situations where if someone knows enough about a CMN configuration to be able to write something to this binding, they're probably going to be familiar with the abbreviation. In CMN terminology, "DT" is all over the place meaning "Debug and Trace". Only now do I suddenly realise that discussing this in the context of Device Tree is pretty much the worst-case scenario for confusion :) >> + >> + arm,root-node: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + description: Offset from PERIPHBASE of the configuration >> + discovery node (see TRM definition of ROOTNODEBASE). > > You can enforce some alignment: > > multipleOf: 0x4000 That's one of the things that may vary in future, so I'm doubtful if it would really be worth the bother. There's only one correct value for a given configuration, and still hundreds of appropriately-aligned wrong ones, so ultimately either it's right and it works, or it's not and it won't (any sensible driver should do a bit of sanity-checking during discovery anyway). Robin. >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - arm,root-node >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + #include >> + pmu@50000000 { >> + compatible = "arm,cmn-600"; >> + reg = <0x50000000 0x4000000>; >> + /* 4x2 mesh with one DTC, and CFG node at 0,1,1,0 */ >> + interrupts = ; >> + arm,root-node = <0x104000>; >> + }; >> +... >> -- >> 2.28.0.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel