Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp298215imn; Wed, 27 Jul 2022 06:37:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s378AI/UhVwsLCRHj5j2qN2IXijVVD9ONQ8hH/Aq5dbM4LgmwpmhcxYVSI40tsurHXi82y X-Received: by 2002:a17:90b:805:b0:1f2:2fb1:e48b with SMTP id bk5-20020a17090b080500b001f22fb1e48bmr4765459pjb.4.1658929069054; Wed, 27 Jul 2022 06:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658929069; cv=none; d=google.com; s=arc-20160816; b=O6hryhlr+FF8N7K+qlwaATSfR2jnU2sefVTRIaKVc7xT/ZSOXrBh7YNovGiiH6GIGy 19W9/s8lP28L5AJ6ysMIcUF1aUb2LkUArkYY1/om4qn4ddS9F6fKwWbKG+cIXGQ2Mvgg TQA1YHQmjBXN2Gc8a4n4RaZTHS6bQkhS4WlpnGZoVcqiccSexLW+TxZpQnTDVMAUyDYi JYqoffQWYF4ob12g29zk1i6YtKVZUpyS5c0uTDaw3XC+ocg/o43DzkrawDvncEHX2Mxq p3K/g4ub8wnhs5umnjkZ2yovMy4b4TBwV2+2SRU1nYHn6bI8dRZe4G8x6AJKuf/6vPJl G7GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ceXaunr0N0UrSUYNDSZN9Zq6nYtJviNoD3DwBGXgtb4=; b=hvNiNg0y9Z9b+JxeoU4GR31pS5oGM6vpZntfWHLUHsFwsSDIohPxn2bVHUZb8nGqYY hOFT3c4HcTFG6APU2YLF2IO/pql2zVR6skjQ+1vasWl0VnYHcU9suGz5u9xVallKAUEk Gst9zhuGcquJ3dlsMUx+Kf3cpYr8xiewdYM5uDwNaoisz1NCigVfTDENCRJL2ll+wC80 qXWm58HlDIIqSFSYCrHZeRyAdWVZ1FbvqW1+RVnC53h/GwGmb5G+pXcmN0qsv5wHUGui MeDCdU3pOEle6qTU2x6sAa64uWzGgNX6ars+lKlDWTqGBS0nZeg5+E3oJKi+n4JwuQrp kRwg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k38-20020a634b66000000b00403f98eb964si20644931pgl.202.2022.07.27.06.37.33; Wed, 27 Jul 2022 06:37:49 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233200AbiG0MqG (ORCPT + 99 others); Wed, 27 Jul 2022 08:46:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231877AbiG0MqE (ORCPT ); Wed, 27 Jul 2022 08:46:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F94C13D6F; Wed, 27 Jul 2022 05:46:03 -0700 (PDT) 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 A46CED6E; Wed, 27 Jul 2022 05:46:03 -0700 (PDT) Received: from bogus (unknown [10.57.11.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AE30B3F73B; Wed, 27 Jul 2022 05:46:00 -0700 (PDT) Date: Wed, 27 Jul 2022 13:45:56 +0100 From: Sudeep Holla To: Krzysztof Kozlowski Cc: Anup Patel , Rob Herring , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Sudeep Holla , Daniel Lezcano , Thomas Gleixner , Andrew Jones , Atish Patra , Samuel Holland , Anup Patel , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] dt-bindings: riscv: Add optional DT property riscv,timer-can-wake-cpu Message-ID: <20220727124556.owk3zlyzsg5uaa4t@bogus> References: <20220727114302.302201-1-apatel@ventanamicro.com> <20220727114302.302201-2-apatel@ventanamicro.com> <372e37bf-ac90-c371-ad9e-b9c18e1cc059@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <372e37bf-ac90-c371-ad9e-b9c18e1cc059@linaro.org> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 Wed, Jul 27, 2022 at 02:07:50PM +0200, Krzysztof Kozlowski wrote: > On 27/07/2022 13:43, Anup Patel wrote: > > We add an optional DT property riscv,timer-can-wake-cpu which if present > > in CPU DT node then CPU timer is always powered-on and never loses context. > > > > Signed-off-by: Anup Patel > > --- > > Documentation/devicetree/bindings/riscv/cpus.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml > > index d632ac76532e..b60b64b4113a 100644 > > --- a/Documentation/devicetree/bindings/riscv/cpus.yaml > > +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml > > @@ -78,6 +78,12 @@ properties: > > - rv64imac > > - rv64imafdc > > > > + riscv,timer-can-wake-cpu: > > + type: boolean > > + description: > > + If present, the timer interrupt can wake up the CPU from > > + suspend/idle state. > > Isn't this a property of a timer, not CPU? IOW, your timer node should > have "wakeup-source" property. > I agree on the concept that this is property of the timer and not CPU. However we generally don't need to use wakeup-source property for timer as we ideally use this for waking up from system sleep state and we don't want to be running timer when we enter the state. > Now that's actual problem: why the RISC-V timer is bound to "riscv" > compatible, not to dedicated timer node? How is it related to actual CPU > (not SoC)? We have "always-on" property for this on arm arch timer, and I also see "regulator-always-on" or something similar defined. So in absence of timer node probably "local-timer-always-on" make sense ? Thoughts ? -- Regards, Sudeep