Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp543228pxb; Wed, 1 Sep 2021 04:58:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe5qQQZoq5YHYSTp6kPyyD2HHkVu30PzC5ti8qRjbzYUTPTp7zZQWuH4CPMVE1NqhU0/Ej X-Received: by 2002:a5e:da44:: with SMTP id o4mr27547116iop.147.1630497499034; Wed, 01 Sep 2021 04:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630497499; cv=none; d=google.com; s=arc-20160816; b=iHtA1fhRXnOAL9tVufPQQojYuJHLTatbTvsOm/Eob6okx7BHk279h0zXXzMq8Ue7BV ozTWdlBtxnq9C5Jbz9iscCbRTvaRVXo9zOpM+16Kte6KrWRBmUOdnBKvHSwOlIoM/y9H rtc+epACeb15VU74psTmbJPrfit+T22GDk424EFw9QB9Yf2UV/Tso0l3s9QtowQ/oYkH 0WDR5Mc9CeO16NZQblF1wFUgIVWdM+FY4+M8vFxGmHWOtVSnEKVVYmwW9yZxF3ME5Hm/ eIxZqwIjW/qFKYhkv30aY3DLBU4dN7mdou+AopV+HdBswB41hrFH5SZavs7uoJ2IY2V7 OquA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0azurFEdIj3ZC2ZbeqfiGR0BlWdPTBZ0eY7HkyWHa2Y=; b=Smv3Q/pYxd00XGc0SBf5n+6uKRNmPGUr1gay4dmASA9eCDzp6Ols1z0HrP+AIUCzSd NwkCOUUIvy9frqgK6wchtXI4B9A/JqZ1Wn7aqmVRCNp/n83myvrBG7fQeo5yUhTB2b+V in81i8JGTEr9AKyp06HLJukT8OnpS3xgDbXojZJ08sw9d4zSvUM/S4vMAT3d1Bk5fbqV pydsE/9vwBeYUsLFfjVHRKrab4wlc+FWRGzIKX9tlvxRAt334VSCXNBOOQHSjdTXpZQW vz5L8nAdaPurhJxD1zp42fqpqHtYe9OlNC1dtrn05MaKEdj28HkiTyA2n0IgBgnqYhBt ArCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=ycqYpYpr; 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 ay23si23854220iob.33.2021.09.01.04.58.07; Wed, 01 Sep 2021 04:58:19 -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=ycqYpYpr; 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 S243865AbhIAL51 (ORCPT + 99 others); Wed, 1 Sep 2021 07:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243893AbhIAL5Z (ORCPT ); Wed, 1 Sep 2021 07:57:25 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61EAC061760 for ; Wed, 1 Sep 2021 04:56:28 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id m9so4139674wrb.1 for ; Wed, 01 Sep 2021 04:56:28 -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=0azurFEdIj3ZC2ZbeqfiGR0BlWdPTBZ0eY7HkyWHa2Y=; b=ycqYpYprwv+8Vnwh7DpeornOkThIjfcXQU00tbtCKFpCHePBxPbNfxsWxS9+X/heuV 0+M9LzyIXjixhFh+xNYeHX4rJ2kn6sngjiL1rWYJPrqlFyAFMcCtMRsp/8UrBiSs/eys x037ok1Hsh5ZoGocgpzEaOYXRCha8jvevbd7j+rToaPxjHC0axNKU8QGBvYlJeHROyLq 8uMJTirpZ7uo8zhWmAroylNa6158dtdBkcyWFfo3QyPnuitMd+2mFw1B67ItQC5Ksncv vGpEOcCQ3o3ssY6fhd1bvaYu0c2D0EssflfbhkakAFm8UxPAWbRa+hOpBJSD8RCbVpZz /w0A== 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=0azurFEdIj3ZC2ZbeqfiGR0BlWdPTBZ0eY7HkyWHa2Y=; b=bqQk/RJLA6ALi8D50hGMLevnXohY8CaSZrKUB6aOfxd5dxnVfUKMGSC1JyURMWMVHr y+cjFvdLzCdmvDAlUdQDZIvMHk8dQd1FDclc9lbO83eslPoJRJjxp4qOdHkMenMHz43S EHPpnpN2WtorZavzexczRWBTO1ieKD4bkaMAJg0Pg/OYIPC3REvrJMYx/9sFKk0SskMW WCH6i+XMLHF3dxw2dKnzL2rBhrNsAMRCBtx3+BuD/eFlGqrpkzu9APLqZUpaX5fTSh42 0AqsvYX4qOrUH2TeuH0SUWkMgkIFd84Fk0rmYsaJ2qSHQeMbZwC8vKMuWAKMzj5PPWyt vcqg== X-Gm-Message-State: AOAM531xqAfVMaqwvbtmoK8/OoRjtMYr0TGY6bFJU0xuU9/jdYNgZm06 xfV79spaQsjPEvTJZgpSro/G+43JUE+yKIy9u1QppQ== X-Received: by 2002:a5d:6ac7:: with SMTP id u7mr38038230wrw.390.1630497387244; Wed, 01 Sep 2021 04:56:27 -0700 (PDT) MIME-Version: 1.0 References: <20210830041729.237252-1-anup.patel@wdc.com> <20210830041729.237252-6-anup.patel@wdc.com> In-Reply-To: From: Anup Patel Date: Wed, 1 Sep 2021 17:26:16 +0530 Message-ID: Subject: Re: [RFC PATCH v3 05/11] dt-bindings: interrupt-controller: Add ACLINT MSWI and SSWI bindings To: Rob Herring Cc: Anup Patel , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Daniel Lezcano , Atish Patra , Alistair Francis , linux-riscv , "linux-kernel@vger.kernel.org List" , DTML , Bin Meng Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 1, 2021 at 6:54 AM Rob Herring wrote: > > On Mon, Aug 30, 2021 at 09:47:23AM +0530, Anup Patel wrote: > > We add DT bindings documentation for the ACLINT MSWI and SSWI > > devices found on RISC-V SOCs. > > > > Signed-off-by: Anup Patel > > Reviewed-by: Bin Meng > > --- > > .../riscv,aclint-swi.yaml | 95 +++++++++++++++++++ > > 1 file changed, 95 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-swi.yaml > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-swi.yaml b/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-swi.yaml > > new file mode 100644 > > index 000000000000..68563259ae24 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-swi.yaml > > @@ -0,0 +1,95 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/interrupt-controller/riscv,aclint-swi.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: RISC-V ACLINT Software Interrupt Devices > > + > > +maintainers: > > + - Anup Patel > > + > > +description: > > + RISC-V SOCs include an implementation of the M-level software interrupt > > + (MSWI) device and the S-level software interrupt (SSWI) device defined > > + in the RISC-V Advanced Core Local Interruptor (ACLINT) specification. > > + > > + The ACLINT MSWI and SSWI devices are documented in the RISC-V ACLINT > > + specification located at > > + https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc. > > + > > + The ACLINT MSWI and SSWI devices directly connect to the M-level and > > + S-level software interrupt lines of various HARTs (or CPUs) respectively > > + so the RISC-V per-HART (or per-CPU) local interrupt controller is the > > + parent interrupt controller for the ACLINT MSWI and SSWI devices. > > + > > +allOf: > > + - $ref: /schemas/interrupt-controller.yaml# > > + > > +properties: > > + compatible: > > + oneOf: > > + - items: > > + - enum: > > + - riscv,aclint-mswi > > + > > + - items: > > + - enum: > > + - riscv,aclint-sswi > > All this can be just: > > enum: > - riscv,aclint-mswi > - riscv,aclint-sswi > > However... > > > + > > + description: > > + For ACLINT MSWI devices, it should be "riscv,aclint-mswi" OR > > + ",-aclint-mswi". > > + For ACLINT SSWI devices, it should be "riscv,aclint-sswi" OR > > + ",-aclint-sswi". > > s/OR/AND/ > > There must be a compatible for the implementation. Unless RiscV > implementations of specs are complete describing all clocks, power > domains, resets, etc. and are quirk free. > > But don't write free form constraints... It is possible that quite a few implementations (QEMU, FPGAs, and other simulators) will not require implementation specific compatible strings. Should we still mandate implementation specific compatible strings in DTS for such cases? I was not sure so I used "OR". Regards, Anup > > > > + > > + reg: > > + maxItems: 1 > > + > > + "#interrupt-cells": > > + const: 0 > > + > > + interrupts-extended: > > + minItems: 1 > > + maxItems: 4095 > > + > > + interrupt-controller: true > > + > > +additionalProperties: false > > + > > +required: > > + - compatible > > + - reg > > + - interrupts-extended > > + - interrupt-controller > > + - "#interrupt-cells" > > + > > +examples: > > + - | > > + // Example 1 (RISC-V MSWI device used by Linux RISC-V NoMMU kernel): > > + > > + interrupt-controller@2000000 { > > + compatible = "riscv,aclint-mswi"; > > + interrupts-extended = <&cpu1intc 3>, > > + <&cpu2intc 3>, > > + <&cpu3intc 3>, > > + <&cpu4intc 3>; > > + reg = <0x2000000 0x4000>; > > + interrupt-controller; > > + #interrupt-cells = <0>; > > + }; > > + > > + - | > > + // Example 2 (RISC-V SSWI device used by Linux RISC-V MMU kernel): > > + > > + interrupt-controller@2100000 { > > + compatible = "riscv,aclint-sswi"; > > + interrupts-extended = <&cpu1intc 1>, > > + <&cpu2intc 1>, > > + <&cpu3intc 1>, > > + <&cpu4intc 1>; > > + reg = <0x2100000 0x4000>; > > + interrupt-controller; > > + #interrupt-cells = <0>; > > + }; > > +... > > -- > > 2.25.1 > > > >