Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1864515rwb; Tue, 29 Nov 2022 21:39:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf63lDkZGMa2j9rR80B6cXjy+wu4BD5JfsEJPrZwsP8apr4X36oZwDuEQFVHDCzt+RVa6wYz X-Received: by 2002:a05:6402:1bc4:b0:46a:342d:dcb3 with SMTP id ch4-20020a0564021bc400b0046a342ddcb3mr31665497edb.227.1669786774149; Tue, 29 Nov 2022 21:39:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669786774; cv=none; d=google.com; s=arc-20160816; b=FTmRLtiUbX8xGmJIox24F8+FOEYmpc+6AxrFpjfyW6fQGL+jXGOcmH/i4qwzSrrRW1 dmgR63Y8ItvuNsMNP8B7DJbQyN7onN7s60n0RC/ayd3wx8deJmdgEmrPPAZaGcZxiL1f Zf4dMaNruPRUlV24XxiuHzmEKN7UDONTB4NBv6Py8Owui0LkI4jDLOpdvmKslNB26vdn ReQBEQPACSmVva7EDbBbAqFue5ienDpAssOJK/o3bWFhJOSnykp0YxjAPsZkAcRzXKm0 4g6Z84vSs+Mej6bVM6mkHghcVpBLJszkwDsRmgacvwYUSmb1RpSJ2d/7TxQwc6ztmmZF NdAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:feedback-id:dkim-signature:dkim-signature; bh=ByC7oIYW2NFxc/BVn9LYGbe9Bh9sYFXXAHsj3pV/Q4I=; b=lwwCx7WiZWMx0pEqc5chZ2Z45VVi9hoi7VaPTOruscC5jDgDFnYvLcIE/vOaGEX5Yw YHBjVwP5rIfGe52c7gQHhkf/605HgwTzuS5yTaUSjz9yJrbr0s0/22U9i1x/YWhK1ybi s7WUnaA0SPIsQ/aQEItWXpCLrwF5PGnlSnb7arn+lVHL8Zgx/4ChEkWZC6vKgPm+oyr+ oAIaJ+cmDT9BXLZqNFhexQ4e6XS3a4+j3wIVx7YgXY4M+Yt6kPyE+Ql8Bh96A0KgCssZ 2uJe1Ft98jZ7hchss4tf/Ad+8cFXIPllcugIvem97SvZyVBOqbdGLWXnG/VxDdrpfSSC e4Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=IOcn3rDG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RxsRMMn2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn9-20020a05640222e900b0046b13a74fa8si529521edb.416.2022.11.29.21.39.14; Tue, 29 Nov 2022 21:39:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=IOcn3rDG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RxsRMMn2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233117AbiK3Ep3 (ORCPT + 84 others); Tue, 29 Nov 2022 23:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbiK3Ep1 (ORCPT ); Tue, 29 Nov 2022 23:45:27 -0500 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A402686B8; Tue, 29 Nov 2022 20:45:26 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id E31D73200961; Tue, 29 Nov 2022 23:45:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 29 Nov 2022 23:45:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669783524; x= 1669869924; bh=ByC7oIYW2NFxc/BVn9LYGbe9Bh9sYFXXAHsj3pV/Q4I=; b=I Ocn3rDGLpO3BkAbPH0tE2Kjo9lSwrpWosOrLZUjjbrnbWkF47KRFACb5CbNqVtxB v5My+Ig/BNn5w4883+103vmyRu+NsGaM1IC/2PARbNmfF3DiM4wQMZsy/2dEs4KT ax7Aqna8eLPB7QWXCAplFpu4D+WITKN5eSJGgXMXl6NTTcIdcVd1HRyf07vSLOAr HCiwzea25LfJEhLGZ0I8Sr+6GI9qYsWXzpEe3ROTFORBuBOwp6RIGej42H6p+AMJ JRrCJmNWSE+niERdD/moTxhI6KLYOexwfZGUvmW3PZGwIsS1VE22C79X3mazHJhA xVnBkLRvxKnfFkKGLAZZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669783524; x= 1669869924; bh=ByC7oIYW2NFxc/BVn9LYGbe9Bh9sYFXXAHsj3pV/Q4I=; b=R xsRMMn2nTjKNW+dCgX06kiTo4jbgwmH7aWXRWKBfKBxtKgCnzsngu3MijaPclnOm ly1u+RDNKkPGuQGhkuO57ZnN92ncUlr0LcAqfVSVE6jBPo06shic6vHtBuaggsB4 QRm+w221YfeEEC/gLZ8uZE7G1zPRtcXvxYypAQo3WCxg3nDydYkFP5i7Yi5gAcAV brs6M3edvU1qfBnA0vtW1FMJ8C/iFZbQOOwIhitmVEuiAWmnrwPyYHBjmHPrvtR2 C0ImFt33oBGNNCxHfDX24PAG4zsC/mj0BDYiTncSHrEhdqLX/Var9A+yIzwAye8n kCVr5lg9/P8Bw9Jbx6JWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtddvgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfvvehfhffujggtgfesthejredttdefjeenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepgeetkeevhfeghffgieegjeffjedvieehvdefgfetvdejieduteet iefhfffguefgnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhh ohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Nov 2022 23:45:23 -0500 (EST) Message-ID: <174d93be-bedf-bf8c-4a66-284931a997b3@sholland.org> Date: Tue, 29 Nov 2022 22:45:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux ppc64le; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: Anup Patel , Rob Herring , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Daniel Lezcano , Thomas Gleixner Cc: Andrew Jones , Atish Patra , Conor Dooley , Anup Patel , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221129140313.886192-1-apatel@ventanamicro.com> <20221129140313.886192-3-apatel@ventanamicro.com> From: Samuel Holland Subject: Re: [PATCH v4 2/3] dt-bindings: timer: Add bindings for the RISC-V timer device In-Reply-To: <20221129140313.886192-3-apatel@ventanamicro.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/22 08:03, Anup Patel wrote: > We add DT bindings for a separate RISC-V timer DT node which can > be used to describe implementation specific behaviour (such as > timer interrupt not triggered during non-retentive suspend). > > Signed-off-by: Anup Patel > Reviewed-by: Conor Dooley > --- > .../bindings/timer/riscv,timer.yaml | 52 +++++++++++++++++++ > 1 file changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/timer/riscv,timer.yaml > > diff --git a/Documentation/devicetree/bindings/timer/riscv,timer.yaml b/Documentation/devicetree/bindings/timer/riscv,timer.yaml > new file mode 100644 > index 000000000000..cf53dfff90bc > --- /dev/null > +++ b/Documentation/devicetree/bindings/timer/riscv,timer.yaml > @@ -0,0 +1,52 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/timer/riscv,timer.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: RISC-V timer > + > +maintainers: > + - Anup Patel > + > +description: |+ > + RISC-V platforms always have a RISC-V timer device for the supervisor-mode > + based on the time CSR defined by the RISC-V privileged specification. The > + timer interrupts of this device are configured using the RISC-V SBI Time > + extension or the RISC-V Sstc extension. > + > + The clock frequency of RISC-V timer device is specified via the > + "timebase-frequency" DT property of "/cpus" DT node which is described > + in Documentation/devicetree/bindings/riscv/cpus.yaml > + > +properties: > + compatible: > + enum: > + - riscv,timer > + > + interrupts-extended: > + minItems: 1 > + maxItems: 4096 # Should be enough? > + > + riscv,timer-cant-wake-cpu: I don't want to derail getting this merged, but if you do end up sending another version, could you please spell out the word "cannot" here and in the code? The missing apostrophe makes this jarring (and an entirely different word). > + type: boolean > + description: > + If present, the timer interrupt can't wake up the CPU from > + suspend/idle state. And in that case I would also suggest clarifying this as "one or more suspend/idle states", since the limitation does not apply to all idle states. At least it should never apply to the architectural WFI state; for the SBI idle state binding, it only applies to those with the "local-timer-stop" property. > + > +additionalProperties: false > + > +required: > + - compatible > + - interrupts-extended > + > +examples: > + - | > + timer { > + compatible = "riscv,timer"; > + interrupts-extended = <&cpu1intc 5>, > + <&cpu2intc 5>, > + <&cpu3intc 5>, > + <&cpu4intc 5>; The CLINT and PLIC bindings also include the M-mode interrupts. Should we do the same here? Regards, Samuel