From patchwork Fri Nov 25 11:21:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 25941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3940749wrr; Fri, 25 Nov 2022 03:27:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6FNfBQZSbfDqDtICDB4x2lbKGoUATy2I7RE8ga9/ioT/LD5ZKZ/GiRXcKQDPse2I+ujlAh X-Received: by 2002:a17:906:fcac:b0:7ba:a9cb:8643 with SMTP id qw12-20020a170906fcac00b007baa9cb8643mr7912493ejb.298.1669375664181; Fri, 25 Nov 2022 03:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669375664; cv=none; d=google.com; s=arc-20160816; b=zJtqrTCYVsMXKwBhwxOk+b++AieCyfTwGpzU/OPoJJRDmKgsfDdd+UK/A2uLo2NFIW oqsRMQSs+p1RRf4lbq06TBgUUWHrakNYBrKaX7d+g7nO8OiBw5a2WNO5zoQz4vS/v/VP KhHQUq1Oh0HeMCfHuuhpoBZroZodeVGmuzojgY3ZHhDa2yT03+NNczPjrB7MoxH5e0s7 8Wnq+q1Z8r+/HIRrnGmB39XwzWjLWj6cHhmvLSSktLHB5Fe0fmR3p6H8UTsQIrtY+Ikk g2SCmuTHBgKzp1QPpOmuWZVqgnGec3udzfs7qsa8gGjO+Sm8eQQPXydNih//sVBHkYgF 4mGg== 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 :dkim-signature; bh=q0TnuhgNTurF6Ds7AQpDNaCEPKEhITVFc7KbMlz7Wws=; b=qzOWyV80Z8qpKj375UjfqySWEEEVun3LSv5pf/9oHCII5amVcztga/R33JO3hhQQgT S+Dti6pcDR9FRhJqg/7RxJsdqyRfbyk3pabYoGMD6Mv+BYT8fe/LTQJpByIj5RBRsJwO uIH7anyCW1V+NQ/iw6TwkDDnqBqprP0l6ukwshG8ZVSsymuKIoEJ+PE/ksxFEm5cs0tm 1zoZqbxkTjqgB0ohQ+ShNUmqNvzKrkNLVyxiw+1oORQZU83RYEIGUfXMc6bNU+5C+DmH Kjznz07KtE4dwqtcxVcK/TAott2twrKiIRfqsYORS5Ivxzmc6IlzgqdKudIlu5q1EgFh 67Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=IUt6mjNq; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170906118b00b0078de51e658esi2171638eja.208.2022.11.25.03.27.19; Fri, 25 Nov 2022 03:27:44 -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=@ventanamicro.com header.s=google header.b=IUt6mjNq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbiKYLWP (ORCPT + 99 others); Fri, 25 Nov 2022 06:22:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbiKYLVk (ORCPT ); Fri, 25 Nov 2022 06:21:40 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60DE27918 for ; Fri, 25 Nov 2022 03:21:39 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id b21so3723186plc.9 for ; Fri, 25 Nov 2022 03:21:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q0TnuhgNTurF6Ds7AQpDNaCEPKEhITVFc7KbMlz7Wws=; b=IUt6mjNqfvLPBWph0ZsbRARzlsokmk2fZM/PK9Ux17pbEufTSB0fdGB4L/1rUvGDyu 8K+kp7ETHm0Czj0vmb/F47Q5JQupZzVyC1v22fnJNdFmiT5DBelkCQJM+jFPjGg+sRUt ghfUI1bWGsd5fmTblOzCs4hiquuXSB8hz8lrnQoKjYLyMowOrPvtDk23OL+4HVQsgwdf FUEQIaPeOPhoh1vMgMyNnhvgOcrjWBGwty/eeAYbcZjflbKDXoz9XEjF9ygyA933dGHn fvbRr9N3WRX7U6wCSaau9lmQDrDBzmUzo+qHJfEzdXXvwOZEHJLWLsySWnKIFS8y0ZdV N6hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q0TnuhgNTurF6Ds7AQpDNaCEPKEhITVFc7KbMlz7Wws=; b=Lz/iKyX0kqw3BCTErxsNIcFE4WfnuglQyOPVWHo+sgKoL6P5xpZBgd1aC8qej7uMYm dDbcQZVgGiL+1PUHIn00X53eXVubAi5/G8dREu3YBzYSFVhhy8T2b6MiYTbKin1NtXC0 awSyc152EvOHLL6E3rDUNrn0EjdZyJLErjnwKZ4ru6W/2lRKhe0wWtaInzKxI0De8SJl RC6KeD9dtooCBiIIn/2Ow5L24M2/JBIsbtDEdU9IX+rfQua452NzypgkDN9xnoRy7a+l WYJuJHOUQYGYLCOn3Mh62L3ROwA4/YqzBzBCQ9Vpgn+f5bIacMiGBxHuX4azS8kvMEuu Zzlg== X-Gm-Message-State: ANoB5pkeyp2v9OZZiWAWJxdIBvL1vvtdKvG70tO3Wnh2Puv+AmY0ZFoT /sqrbOFMb9QrgBwmFFVAw8X78A== X-Received: by 2002:a17:90a:5d15:b0:213:e74b:b691 with SMTP id s21-20020a17090a5d1500b00213e74bb691mr46264890pji.81.1669375299079; Fri, 25 Nov 2022 03:21:39 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id e66-20020a621e45000000b0057488230704sm2834335pfe.219.2022.11.25.03.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 03:21:38 -0800 (PST) From: Anup Patel To: Rob Herring , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Daniel Lezcano , Thomas Gleixner Cc: Andrew Jones , Atish Patra , Samuel Holland , Anup Patel , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v3 2/3] dt-bindings: timer: Add bindings for the RISC-V timer device Date: Fri, 25 Nov 2022 16:51:04 +0530 Message-Id: <20221125112105.427045-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125112105.427045-1-apatel@ventanamicro.com> References: <20221125112105.427045-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750467256676240344?= X-GMAIL-MSGID: =?utf-8?q?1750467256676240344?= 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: + type: boolean + description: + If present, the timer interrupt can't wake up the CPU from + suspend/idle state. + +additionalProperties: false + +required: + - compatible + - interrupts-extended + +examples: + - | + timer { + compatible = "riscv,timer"; + interrupts-extended = <&cpu1intc 5>, + <&cpu2intc 5>, + <&cpu3intc 5>, + <&cpu4intc 5>; + }; +...