Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp7117ybr; Thu, 21 May 2020 22:57:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHTkgWT37cx64L/1oqre6L2qPXY7X+Kj4m77kIVAd/Dp66hG99RjEUW57R/rhSr6ubI+xQ X-Received: by 2002:a17:906:a18b:: with SMTP id s11mr6561991ejy.268.1590127024219; Thu, 21 May 2020 22:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590127024; cv=none; d=google.com; s=arc-20160816; b=ZhWMQ5sXF33eDaKcpaOU8/psXMx9ecsgD6CxyZxODHchpYhNkSDRZXin/IQRxeYZMp SO/bdiX7tPWKihpcosfM8T26l9EYbeo4wEcaGzZei9+8OFjZzrwu+ZhJu+foGlJorSJF 3i7v/ab2wDpvL2n4dFRvupyJg3gDJ9n6ohcropMRhppwU82glGm6DvA67z6WvT5W9bDH woqo9yD3+jJfZp3GeH6XgT7CYzAFQY8aee5/CypR8gvGgvBm7D71ASfbGU8yMFz8N30t 1+M5+/4XpZZTaq6huwfgihDerk9DbQMUZWcHzCf2fnohJSDDLeRUu4m59nPl/39UVQbj Tprw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aIk25yXFBXzVd2JD01BBzYOv1Gg6yn56UGtgn996fw0=; b=08vg3nZHEBY/KVx+M3AHTKlm1713sgSwCXVckfnkblZmCw6an56buVBeK8jMANNa20 UwFL+bCP6rd7MQJ+65sGQq7sjThgw7Gdu40NC5kNXBIdsD4Lh1XfUT9Lq/PtYggT5MER idk3aoPwJI0feUYgsPO4KN0VxwKCC9iRb6VDOuDRzF3CGM2I4ua6julvrkui6tfjAB/v eawS6kZ6B+Z4ZKz7Em6qoBH4gIiIc93/oXBiuEkjpG2UqJcNTtjmSn52F3s6+G2CPDtn Ar7oCuL4LJEEFyZBrGldjOuiVs0q6JZlXJVfUtkLNESJ6G0FUzCmrejzRA3zYgjZqEOx +6rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=JT1BLyDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si4594200edj.333.2020.05.21.22.56.41; Thu, 21 May 2020 22:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=JT1BLyDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbgEVFyW (ORCPT + 99 others); Fri, 22 May 2020 01:54:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbgEVFyV (ORCPT ); Fri, 22 May 2020 01:54:21 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24B69C061A0E for ; Thu, 21 May 2020 22:54:20 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id u188so8671656wmu.1 for ; Thu, 21 May 2020 22:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aIk25yXFBXzVd2JD01BBzYOv1Gg6yn56UGtgn996fw0=; b=JT1BLyDzBfEuLHxkQaZ3XLCFkoZmRsT1N912PHah3lVhoqoq8JLyx4QkKZsoPUywUl E8PjWS0l/TEp1xK0mrl7UoiGv0RIkC4oZIhGYEYhQwMuD2/uXOdMLL2IkSjV5JEGLgEu hj4YoPe4YprgbTbrKfT1Nu4aNFpoW8dgf0B3kbjxNFXc4BsbKku9MqU5Q1RXnbJtzvI5 xk7NFC/3TEqxST4kdWTIpy40xEPajjPX9ncrzUYWfeR0bEFQS+jRN5+P16lXMnvzUr41 awxZth5SCE6kzfOWGlFHf1t/Wjx8G4cPS2di/vbxuQSFpkN9iBmP1ZYvg94K/83Lijpl Y6Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aIk25yXFBXzVd2JD01BBzYOv1Gg6yn56UGtgn996fw0=; b=A4Dmmzj9EmSAYY7eOVPdqCvrZckOiEzSLskobc3lOsLotgCbsKVErMBZId5JQyiC8e ybDrsVHPjmMtNxzOQnZqlO0bgFuTD1YXtBPrmxeu0D//weA+uxRO100hvfX9Ndxwrbvs F6fsCssMIBzOMQzCUshIlDWT/Szz1X4B0uKrMoVweS4apE+IyMuDP4+4SGRBHG0MK2CY kfpdjgdqc69sQ4UNFbgzZOkVnDV7GybUknK9nC6WaVwDe+6GE+mYmCYC/+k7q3ieZovA R0TXkLEt3AgYw8ToYrFm9gBPkECIz+xtZkwnQTWtv1cz64M4gqknYa3DP4SU6FkdDmeZ 8zgw== X-Gm-Message-State: AOAM532kfMyu5d0S3qkyA9bEdfXvk46EkVX2GTkIrQh4kHG1blfX7KSp 8DV6eD+ubl4+g3O5PAyY/+462HdSJLxaM3t9PVSvEg== X-Received: by 2002:a7b:c4da:: with SMTP id g26mr11532873wmk.3.1590126858584; Thu, 21 May 2020 22:54:18 -0700 (PDT) MIME-Version: 1.0 References: <20200521134544.816918-1-anup.patel@wdc.com> <20200521134544.816918-6-anup.patel@wdc.com> <2aec08b7-7197-4b60-89d9-c3b0d5a8a258@gmail.com> In-Reply-To: <2aec08b7-7197-4b60-89d9-c3b0d5a8a258@gmail.com> From: Anup Patel Date: Fri, 22 May 2020 11:24:07 +0530 Message-ID: Subject: Re: [PATCH 5/5] dt-bindings: timer: Add CLINT bindings To: Sean Anderson Cc: Anup Patel , Palmer Dabbelt , Paul Walmsley , Albert Ou , Rob Herring , Daniel Lezcano , Thomas Gleixner , devicetree@vger.kernel.org, Damien Le Moal , "linux-kernel@vger.kernel.org List" , Atish Patra , Alistair Francis , linux-riscv Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 1:35 AM Sean Anderson wrote: > > On 5/21/20 9:45 AM, Anup Patel wrote: > > We add DT bindings documentation for CLINT device. > > > > Signed-off-by: Anup Patel > > --- > > .../bindings/timer/sifive,clint.txt | 33 +++++++++++++++++++ > > 1 file changed, 33 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/timer/sifive,clint.txt > > > > diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.txt b/Documentation/devicetree/bindings/timer/sifive,clint.txt > > new file mode 100644 > > index 000000000000..cae2dad1223a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/timer/sifive,clint.txt > > @@ -0,0 +1,33 @@ > > +SiFive Core Local Interruptor (CLINT) > > +------------------------------------- > > + > > +SiFive (and other RISC-V) SOCs include an implementation of the SiFive Core > > +Local Interruptor (CLINT) for M-mode timer and inter-processor interrupts. > > + > > +It directly connects to the timer and inter-processor interrupt lines of > > +various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local interrupt > > +controller is the parent interrupt controller for CLINT device. > > + > > +The clock frequency of CLINT is specified via "timebase-frequency" DT > > +property of "/cpus" DT node. The "timebase-frequency" DT property is > > +described in: Documentation/devicetree/bindings/riscv/cpus.yaml > > + > > +Required properties: > > +- compatible : "sifive,clint-1.0.0" and a string identifying the actual > > + detailed implementation in case that specific bugs need to be worked around. > > Should the "riscv,clint0" compatible string be documented here? This Yes, I forgot to add this compatible string. I will add in v2. > peripheral is not really specific to sifive, as it is present in most > rocket-chip cores. I agree that CLINT is present in a lot of non-SiFive RISC-V SOCs and FPGAs but this IP is only documented as part of SiFive FU540 SOC. (Refer, https://static.dev.sifive.com/FU540-C000-v1.0.pdf) The RISC-V foundation should host the CLINT spec independently under https://github.com/riscv and make CLINT spec totally open. For now, I have documented it just like PLIC DT bindings found at: Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.txt If RISC-V maintainers agree then I will document it as "RISC-V CLINT". @Palmer ?? @Paul ?? > > > +- reg : Should contain 1 register range (address and length). > > +- interrupts-extended : Specifies which HARTs (or CPUs) are connected to > > + the CLINT. Each node pointed to should be a riscv,cpu-intc node, which > > + has a riscv node as parent. > > + > > +Example: > > + > > + clint@2000000 { > > + compatible = "sifive,clint-1.0.0", "sifive,fu540-c000-clint"; > > + interrupts-extended = < > > + &cpu1-intc 3 &cpu1-intc 7 > > + &cpu2-intc 3 &cpu2-intc 7 > > + &cpu3-intc 3 &cpu3-intc 7 > > + &cpu4-intc 3 &cpu4-intc 7>; > > + reg = <0x2000000 0x4000000>; > > + }; > > > > --Sean Regards, Anup