Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3230779pxv; Mon, 12 Jul 2021 12:24:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPWLwC5faTZCkelfpcSH9aOH5qPfio5H/Nc7QxmHMhKudNRMtx8Sx5PQmdwwnQ/olOHEZG X-Received: by 2002:a17:907:2ce8:: with SMTP id hz8mr741310ejc.88.1626117878342; Mon, 12 Jul 2021 12:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626117878; cv=none; d=google.com; s=arc-20160816; b=debFtS3sIeNCBAj/NKgMxkYBhjZ39VsCk3SKHH55fFKmW2r2jy+uh9txjafUETK0Pv vZDya+Y3m0VemLus23Vgj9qi5MtnwbslL/gMSSA8vQxiO6TbEduPx8WuGCO1P6eldjKy s0uqpvRec8R59GIO9vpjJ2P50bBc4+KBdiykc/XnhDzjNUxFoxirrNjyoJ/8nRXhMvjr 2BoXnhN9T4NOYLKLjA3oZedP8mCGc83VjaSTgiaQ8Q+RxobCV3I1wiPRNXITrqhV655s Jk6ymH8Hqc++AGt8gidB+zx9sW3VYgZfG+TWKnxz/fPaHyDGL4+RZCZFfIMQphryfntq kXKg== 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=mDv0toh0cQVMFqilKq+GF6LWR9g5w4GKINdo+Jev2uw=; b=TSuJ15kTvp9eZPcq8n9WOuYOqW3IUoGYfAzl6TjPqkmS/MYh7cU6wsPCTNhwUxBJRh CFucitKKE99KQFVqkT8ZOvQXQNIF0cSXQg8qkASv3qhHhIXK0K849l9EOatGN0tujuo9 tUQze/4dGrrsaColxpEa5KA2nuwXg+MDTUcR9tX17a70s4tJV6HFeH+oH+tg/XC8g1jZ pZ+T/DM8d98sg/KS730jSgfkM0OHB4ubFhrihfWTmE1b9NBgjrV+HNUAwTG/hkX+o2MJ +2X9J7I0a6dvUf1do9pTCJ6ZZHIDWh3/m0IxTF8dF9MykeOpr5EWdpbS2achhUqCeZZz 8wxg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd21si18489422edb.593.2021.07.12.12.24.15; Mon, 12 Jul 2021 12:24:38 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236207AbhGLTY7 (ORCPT + 99 others); Mon, 12 Jul 2021 15:24:59 -0400 Received: from mail-io1-f48.google.com ([209.85.166.48]:38403 "EHLO mail-io1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233793AbhGLTY7 (ORCPT ); Mon, 12 Jul 2021 15:24:59 -0400 Received: by mail-io1-f48.google.com with SMTP id k11so24108465ioa.5; Mon, 12 Jul 2021 12:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mDv0toh0cQVMFqilKq+GF6LWR9g5w4GKINdo+Jev2uw=; b=Fmo0382HyQukJtGAzUD+News8S9nBeD2XnefBMu+w29bh89whT6Legyu02FzlakHfE hRKVHWC8NzgonTWoEBjuwINsOsvXQZvmmPk+YwOLWhKtOzS0NwVLQEKdTyXQrGvcNuk4 NJBn0XPcFey03EHBWkx9WIpho7qvclzdpxYml3T0buenRtW8ZTcw/nwdytl4/BzqeCoq u8KYS09cY4OFTdSMqmuF8Gyk7iVhQcfNE1+OS0ftqobArWdwIbFXMWLBqg74X+9zPtrY f593p6D9ksgMRUmd08FGgCaOoRDwWA4vl05gHAKCGfMuMghMK+9vyNxS9FVbECZmXDAZ jNdw== X-Gm-Message-State: AOAM531bkQ5BYZOTuKhmsX3KRmG5lCIOYCjDfBwlAtKnGbELrFz81/Jg 25HgSPpvhwRn/R0G/1faOw== X-Received: by 2002:a5d:91d8:: with SMTP id k24mr376352ior.84.1626117730689; Mon, 12 Jul 2021 12:22:10 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id j24sm3350224ioo.16.2021.07.12.12.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 12:22:10 -0700 (PDT) Received: (nullmailer pid 2333729 invoked by uid 1000); Mon, 12 Jul 2021 19:22:07 -0000 Date: Mon, 12 Jul 2021 13:22:07 -0600 From: Rob Herring To: Anup Patel Cc: Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Daniel Lezcano , Atish Patra , Alistair Francis , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bin Meng Subject: Re: [RFC PATCH v2 06/11] dt-bindings: interrupt-controller: Add ACLINT MSWI and SSWI bindings Message-ID: <20210712192207.GA2322460@robh.at.kernel.org> References: <20210618123851.1344518-1-anup.patel@wdc.com> <20210618123851.1344518-7-anup.patel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618123851.1344518-7-anup.patel@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 06:08:46PM +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 | 82 +++++++++++++++++++ > 1 file changed, 82 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..b74025542866 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-swi.yaml > @@ -0,0 +1,82 @@ > +# 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: > + items: > + - enum: > + - riscv,aclint-mswi > + - riscv,aclint-sswi > + > + description: > + Should be ",-aclint-mswi" and "riscv,aclint-mswi" OR > + ",-aclint-sswi" and "riscv,aclint-sswi". The schema doesn't match the description. There's no actual vendor implementation yet? You could do: items: - {} - const: riscv,aclint-mswi But then your example will fail. > + > + reg: > + maxItems: 1 > + > + "#interrupt-cells": > + const: 0 > + > + interrupts-extended: > + minItems: 1 You need maxItems too. I guess this based on number of cores, so just pick a 'should be enough' value. > + > + 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>; 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>; Same here. > + reg = <0x2100000 0x4000>; > + interrupt-controller; > + #interrupt-cells = <0>; > + }; > +... > -- > 2.25.1 > >