Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3000580rdb; Wed, 15 Nov 2023 18:12:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9kFzDEAYvoQUcoTj4vprtgZEvwF4wJluY9KYeO9zcVzrBh7lAQQxraxr5BtLh1Kdt0FGw X-Received: by 2002:a17:90b:3b8d:b0:283:3f5f:b29b with SMTP id pc13-20020a17090b3b8d00b002833f5fb29bmr12096331pjb.27.1700100724546; Wed, 15 Nov 2023 18:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700100724; cv=none; d=google.com; s=arc-20160816; b=1Lfy0rurUEXpfBZI3F8vkuQz6+WRoNb3iPBeSZoenrBGP1F1HwW+XP+RM6GGuU7P2l ZdMJSq1KSbXLy8WYSQbj7zC7swB5UrLPCrBKGO1yAyE6qrWz3832GY/hnWji/bcdjOnW u6O3YceR01/chmo5sXMDk298yxYjB1J6I4ALJIl8VwCsm7lRXK/TINStgXDur+H0QYVs XvF7LGrQA+QeQdP3ioR8UUgb1+wMHf2S2IP47g0irIPQnE7NGwIBrmq9wd2QyFXt8A5R mYfYgzVpDANjGlAQaGss4+dnLJ4d7YzXMTYuY7GlqDTNUigIySrugHRb27ieyozbWpSc VXkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=i/rXMc5bLtGquiIXLRyx/fx0gv2ZT4kLIUmIg13bo4w=; fh=j90zbBfSV/4iu7szL9W7wo+/VYejF6auJ/2P3VyZ/X8=; b=iIycq9WtKuuXbUK0dUtkbZ41cFp2ARkDk3NWmumpuF7l2e5CyO6877WI0hAtNUU412 9SRvayDnViTNTz9+3YV91urMARr2szfTSPp/du7NU5s7Tm/07dpzhMQVTqXUL6mzT26P 9uLy6us8QO43H1Zgvk43vxZnxImK1PscCMq742i27tRYoNS5QFoltUC1mDckau4l5cgl e/ON1SBk+SEEHxoPWWtyOQcqZgcSaSsXxpvpUu3mZVkP/9h/yZwkhJlxLM83DZBfSnHa 7wjUlTTTlGu8hpBWJBKs4Dyyqk/w2X/rXXFzCg14Z26JE3DGQMI4QjvD2ytSJgeC1SCG goeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m20-20020a17090a7f9400b0027d54b9f379si931090pjl.123.2023.11.15.18.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 18:12:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E1A43802646A; Wed, 15 Nov 2023 18:12:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344454AbjKPCLX convert rfc822-to-8bit (ORCPT + 99 others); Wed, 15 Nov 2023 21:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232310AbjKPCLW (ORCPT ); Wed, 15 Nov 2023 21:11:22 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF2A119E; Wed, 15 Nov 2023 18:11:15 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id BDCAB80BE; Thu, 16 Nov 2023 10:11:01 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 16 Nov 2023 10:11:01 +0800 Received: from localhost.localdomain (202.188.176.82) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 16 Nov 2023 10:10:57 +0800 From: Ji Sheng Teoh To: CC: , , , , , , , , , , , Subject: Re: [PATCH v3 2/2] dt-bindings: perf: starfive: Add StarLink PMU Date: Thu, 16 Nov 2023 10:10:35 +0800 Message-ID: <20231116021035.4043907-1-jisheng.teoh@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231115-landing-earflap-ed11982ac610@squawk> References: <20231115-landing-earflap-ed11982ac610@squawk> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 18:12:02 -0800 (PST) On Wed, 15 Nov 2023 20:03:53 +0000 Conor Dooley wrote: > Yo, > > On Wed, Nov 15, 2023 at 11:36:08AM +0800, Ji Sheng Teoh wrote: > > Add device tree binding for StarFive's StarLink PMU (Performance > > Monitor Unit). > > > > Signed-off-by: Ji Sheng Teoh > > --- > > .../bindings/perf/starfive,starlink-pmu.yaml | 46 > > +++++++++++++++++++ 1 file changed, 46 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > b/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > new file mode 100644 index 000000000000..a9426a7faeae --- /dev/null > > +++ > > b/Documentation/devicetree/bindings/perf/starfive,starlink-pmu.yaml > > > > btw, since you changed the compatible, the filename should have been > changed to match it. The intention to keep the filename generic is to allow addition of new version of StarLink PMU in future if any, similar to what arm,cmn.yaml is doing. Hope that makes sense. > > > @@ -0,0 +1,46 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/perf/starfive,starlink-pmu.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: StarFive StarLink PMU > > + > > +maintainers: > > + - Ji Sheng Teoh > > + > > +description: > > + StarFive's StarLink PMU integrates one or more CPU cores with a > > shared L3 > > + memory system. The PMU support overflow interrupt, up to 16 > > programmable > > + 64bit event counters, and an independent 64bit cycle counter. > > + StarLink PMU is accessed via MMIO. > > + > > +properties: > > + compatible: > > + const: starfive,starlink-500-pmu > > So this is not what I had in mind by a "device". I was looking for a > compatible representing an soc in which this IP had been integrated. > A soc-specific compatible, rather than something generic, is > requirement for devicetree - we don't want various integrations of > this IP to all be using a generic compatible when there may be subtle > (or less subtle) differences between integrations. > > I'm trying to come up with the syntax for enforcing having two > compatibles with your current one as the fallback, but I have yet to > come up with the correct syntax for that that works correctly. > > Hopefully by the time you get some feedback on the driver side of this > submission I will have a concrete suggestion for what to do here. Thanks Conor for the enlightenment. In the meantime, to fit the requirement I would suggest going for "starfive,jh8100-starlink-pmu", making it JH8100 SOC specific if that makes sense. > > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + soc { > > + #address-cells = <2>; > > + #size-cells = <2>; > > + > > + l3_pmu: pmu@12900000 { > > This label here is never used and should be dropped. > > Cheers. > Conor. Noted, will drop it in v4. > > > + compatible = "starfive,starlink-500-pmu"; > > + reg = <0x0 0x12900000 0x0 0x10000>; > > + interrupts = <34>; > > + }; > > + }; > > -- > > 2.25.1 > > >