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 F39E4C2BB3F for ; Thu, 16 Nov 2023 02:11:58 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gDuR0yGtD8Mb1muMdQpwlLh44FBlhGdutgA8Qm28pgQ=; b=oF8LioUcQ976qB IA+m+EqmtFwTfeydCwBzwkGF8+MAcvzIynZOUyJp2PKuY4R8EymYSJ5JPVBUaApGzA3RsK7TwIWzH eW9OCutt6SUeMw3bTJo3iPCVNV9tSIA2EeKsYZXcswTaurbLsx/c5mbVCVlcNL/hAaIE6cOziBZZq 8nsSY+q1KMLJmHKWhijhFxu540YxZJbmqGXt3B1zS4hTyckVWB1mEoturQxIPhGPiWKWaNCYiU/dN L78fZht3zIxpZ3Plsc5itakAA00tkuVqISrSzjbkjkCScZS/G85WSIwdJ1G1Kk3xoXq87rCMebW78 TSDLWcJqJK3DU/yB1t2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3Rqv-002DC4-0v; Thu, 16 Nov 2023 02:11:33 +0000 Received: from fd01.gateway.ufhost.com ([61.152.239.71]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3Rqq-002D7D-2r for linux-arm-kernel@lists.infradead.org; Thu, 16 Nov 2023 02:11:31 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_181129_298461_89117809 X-CRM114-Status: GOOD ( 31.05 ) 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 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 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel