Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2845362lqp; Mon, 25 Mar 2024 10:49:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6ERuoTsqLkWsRm9k6zgBOCzh2GIHWJB5O2Nq0HMyV6ssH00fenCdbK3a6Qo0VBls3Kr1YYX/3jMKj81RWr5vNAhSP44hKI/Be+t7FXw== X-Google-Smtp-Source: AGHT+IFEXNJ83LHJqEdIoZClf29lOjad7soOwDUpaXUnzo+VxFewiTLLBw0mIMh0eYsIPAkynhUj X-Received: by 2002:a05:6358:248e:b0:17b:602f:24c6 with SMTP id m14-20020a056358248e00b0017b602f24c6mr8755453rwc.24.1711388966072; Mon, 25 Mar 2024 10:49:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711388966; cv=pass; d=google.com; s=arc-20160816; b=IdEjI5ycB/WVxYczUp+PIWatRgp4TlOWYxPFeVtmAqmCzURasuFqFAXv6Lto7yalsr Sgsq/GsQ/RJuv6k8hMnqaYogdZm2qFD8Nb6iD7JamseVKMQ+9y46jY4f9WcyCgu80h2z X1hxSJB4pSF0ChkWq0dENGi5GNrc59JFenfmoPliZpmLbopSyJbiWp5xM7qb+hrpUnnn Pirw5o4q8J8QxRyKbOIEW1pzjeLdymJSmMhbxBszT5eNnjWoJ5DNR0w9RiR8Pac65CnT I5ZW1KvrMfhuOUCF9oS8J2wjUl4vdDj91d5lcqdDzDIJzwEQrj75Ua0OsbrYcaSB60Dx S2ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=My5M8jp2lcEnM+1qj5/Vvgxpc82/dTNqTly0JFYzrM8=; fh=yVNNGEIr6AEqDpwMoE+nXYVxQl4r74a2OvLNxeZX2Vs=; b=s1fhzq/Bpz3R5PHmIRZcGdT+33GHrSxwq3LNOvWBKuJg1PSewPpkeGN41v0jNxsg1g p92HHb2icFvHq8thxFQ2MmfrlhnZ5LsmkstwFAZQeKPn7EFQgTH7CP3VnuxRFtU8JSG1 kMjf3LpwBfrOg737mtYIBJfT4bNfvzCPutNQv26wVYccxoH2qG0er1/S+qe63VzwH/pw cjOSjiaHCksD2M00cY4JFPti+p7yKKB0Q7KY080psp3/Sz/sIUNKZjkfdtWzoHyIaz6E lnmXeJYmlwYaKK098NbFCCMzhb/hH919/wUv6shZwz3RM5MJZrh0MurJ8cij3oCrd+Z2 nHrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eyLrd3vu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a36-20020a631a64000000b005d66232593dsi8046186pgm.868.2024.03.25.10.49.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 10:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eyLrd3vu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-117499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EB6CA2C17DB for ; Mon, 25 Mar 2024 17:41:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E875014A4F7; Mon, 25 Mar 2024 16:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eyLrd3vu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nVuYMe/P" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D27214A086; Mon, 25 Mar 2024 16:46:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385213; cv=none; b=je+Y7Yhn93+8fkuWshEoOgyl3fjA7q4z41TBFmKQRPIr9ZoSQRXxYH/mvDq+kZXDLm4+T48wAIYGGdedhwruJ0mdYywIBR90IhB9SxALIVy7FdCAHVH2bFH5h3qDc9Q8UwgC4Ec11KMb7OP/LvBKg39KIuRMhftiL8o4FD3YFpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711385213; c=relaxed/simple; bh=xhIq0W/I4V0yoexpOywu6XvIpcQXqJpxEVh0bG9b7aE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=RleCj+67rZAKwoaXOjWfL1IzV+u1/CYUBqDM2iHJI63JfcxvdAGkjYv7Bt6Pg/8Cv9duaNQ8tYhHOmuIQroqlyEDhr880eb4NBP2W4YYXW0hcr0TTLc8QEX/nAbL/lcvUB/hk6r2a7eLyvD7QZoIYEY8zZSPo8o971dXxKkOg2s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eyLrd3vu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nVuYMe/P; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 25 Mar 2024 16:46:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1711385209; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=My5M8jp2lcEnM+1qj5/Vvgxpc82/dTNqTly0JFYzrM8=; b=eyLrd3vut/7TxojCM5pUkE3UUAY9hinTvKxUyW11RqAjwZxxCNrBuC+5KhOTOI9FE1JuHE 70pKdgJilofgwBC7abqwpE7+pd7JJfCCJw+4dialish5suu4Lb96tUNRll88E+SwgvsPJs sKRA22jOHYtzvmTOEj4lo4veLAWk5DbiYQrH6+5kBdCAHdKHrHLepaZDk0Uo20qqgOwGHu NFIm3vqlbpGPotZAgnd7naz0YUsEARRjzRd2y5GxeBqqyXkVwp13E6GyfiUW8TSXPvv8YC 3aeE2pxcKZkOQAI0wMX1gqpVzCjaqi1r8SH6eR1ZltFQJOKioMgnfnWYeuqRhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1711385209; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=My5M8jp2lcEnM+1qj5/Vvgxpc82/dTNqTly0JFYzrM8=; b=nVuYMe/PKVB5xitFV1pZq0heBet43npAHMrUcKDdmomaaL/h/Bb900RW03+VubMYXL2JIu IN8GjSyujbqQU7CA== From: "tip-bot2 for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] dt-bindings: interrupt-controller: Add RISC-V advanced PLIC Cc: Anup Patel , Thomas Gleixner , bjorn@rivosinc.com, Conor Dooley , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20240307140307.646078-6-apatel@ventanamicro.com> References: <20240307140307.646078-6-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171138520913.10875.12939787502719525416.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/core branch of tip: Commit-ID: 3b806a5a1a39d593d6fe0def2ef474402f551f91 Gitweb: https://git.kernel.org/tip/3b806a5a1a39d593d6fe0def2ef474402f5= 51f91 Author: Anup Patel AuthorDate: Thu, 07 Mar 2024 19:33:03 +05:30 Committer: Thomas Gleixner CommitterDate: Mon, 25 Mar 2024 17:38:28 +01:00 dt-bindings: interrupt-controller: Add RISC-V advanced PLIC Add DT bindings document for RISC-V advanced platform level interrupt controller (APLIC) defined by the RISC-V advanced interrupt architecture (AIA) specification. Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Tested-by: Bj=C3=B6rn T=C3=B6pel Reviewed-by: Conor Dooley Reviewed-by: Bj=C3=B6rn T=C3=B6pel Link: https://lore.kernel.org/r/20240307140307.646078-6-apatel@ventanamicro.c= om --- Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml | 17= 2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ri= scv,aplic.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,apl= ic.yaml b/Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.= yaml new file mode 100644 index 0000000..190a649 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml @@ -0,0 +1,172 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/riscv,aplic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RISC-V Advanced Platform Level Interrupt Controller (APLIC) + +maintainers: + - Anup Patel + +description: + The RISC-V advanced interrupt architecture (AIA) defines an advanced + platform level interrupt controller (APLIC) for handling wired interrupts + in a RISC-V platform. The RISC-V AIA specification can be found at + https://github.com/riscv/riscv-aia. + + The RISC-V APLIC is implemented as hierarchical APLIC domains where all + interrupt sources connect to the root APLIC domain and a parent APLIC + domain can delegate interrupt sources to it's child APLIC domains. There + is one device tree node for each APLIC domain. + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + items: + - enum: + - qemu,aplic + - const: riscv,aplic + + reg: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + interrupts-extended: + minItems: 1 + maxItems: 16384 + description: + Given APLIC domain directly injects external interrupts to a set of + RISC-V HARTS (or CPUs). Each node pointed to should be a riscv,cpu-intc + node, which has a CPU node (i.e. RISC-V HART) as parent. + + msi-parent: + description: + Given APLIC domain forwards wired interrupts as MSIs to a AIA incoming + message signaled interrupt controller (IMSIC). If both "msi-parent" and + "interrupts-extended" properties are present then it means the APLIC + domain supports both MSI mode and Direct mode in HW. In this case, the + APLIC driver has to choose between MSI mode or Direct mode. + + riscv,num-sources: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 1023 + description: + Specifies the number of wired interrupt sources supported by this + APLIC domain. + + riscv,children: + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 1 + maxItems: 1024 + items: + maxItems: 1 + description: + A list of child APLIC domains for the given APLIC domain. Each child + APLIC domain is assigned a child index in increasing order, with the + first child APLIC domain assigned child index 0. The APLIC domain child + index is used by firmware to delegate interrupts from the given APLIC + domain to a particular child APLIC domain. + + riscv,delegation: + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 1 + maxItems: 1024 + items: + items: + - description: child APLIC domain phandle + - description: first interrupt number of the parent APLIC domain (in= clusive) + - description: last interrupt number of the parent APLIC domain (inc= lusive) + description: + A interrupt delegation list where each entry is a triple consisting + of child APLIC domain phandle, first interrupt number of the parent + APLIC domain, and last interrupt number of the parent APLIC domain. + Firmware must configure interrupt delegation registers based on + interrupt delegation list. + +dependencies: + riscv,delegation: [ "riscv,children" ] + +required: + - compatible + - reg + - interrupt-controller + - "#interrupt-cells" + - riscv,num-sources + +anyOf: + - required: + - interrupts-extended + - required: + - msi-parent + +unevaluatedProperties: false + +examples: + - | + // Example 1 (APLIC domains directly injecting interrupt to HARTs): + + interrupt-controller@c000000 { + compatible =3D "qemu,aplic", "riscv,aplic"; + interrupts-extended =3D <&cpu1_intc 11>, + <&cpu2_intc 11>, + <&cpu3_intc 11>, + <&cpu4_intc 11>; + reg =3D <0xc000000 0x4080>; + interrupt-controller; + #interrupt-cells =3D <2>; + riscv,num-sources =3D <63>; + riscv,children =3D <&aplic1>, <&aplic2>; + riscv,delegation =3D <&aplic1 1 63>; + }; + + aplic1: interrupt-controller@d000000 { + compatible =3D "qemu,aplic", "riscv,aplic"; + interrupts-extended =3D <&cpu1_intc 9>, + <&cpu2_intc 9>; + reg =3D <0xd000000 0x4080>; + interrupt-controller; + #interrupt-cells =3D <2>; + riscv,num-sources =3D <63>; + }; + + aplic2: interrupt-controller@e000000 { + compatible =3D "qemu,aplic", "riscv,aplic"; + interrupts-extended =3D <&cpu3_intc 9>, + <&cpu4_intc 9>; + reg =3D <0xe000000 0x4080>; + interrupt-controller; + #interrupt-cells =3D <2>; + riscv,num-sources =3D <63>; + }; + + - | + // Example 2 (APLIC domains forwarding interrupts as MSIs): + + interrupt-controller@c000000 { + compatible =3D "qemu,aplic", "riscv,aplic"; + msi-parent =3D <&imsic_mlevel>; + reg =3D <0xc000000 0x4000>; + interrupt-controller; + #interrupt-cells =3D <2>; + riscv,num-sources =3D <63>; + riscv,children =3D <&aplic3>; + riscv,delegation =3D <&aplic3 1 63>; + }; + + aplic3: interrupt-controller@d000000 { + compatible =3D "qemu,aplic", "riscv,aplic"; + msi-parent =3D <&imsic_slevel>; + reg =3D <0xd000000 0x4000>; + interrupt-controller; + #interrupt-cells =3D <2>; + riscv,num-sources =3D <63>; + }; +...