Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>, Anup Patel <anup@brainfault.org>,
	Chen Wang <unicorn_wang@outlook.com>,
	Inochi Amaoto <inochiama@gmail.com>,
	Sunil V L <sunilvl@ventanamicro.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Ryo Takakura <takakura@valinux.co.jp>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, sophgo@lists.linux.dev
Subject: Re: [PATCH v1 3/7] dt-bindings: interrupt-controller: add generic Risc-v aclint-sswi
Date: Mon, 9 Jun 2025 17:01:02 +0100	[thread overview]
Message-ID: <20250609-rejoice-disclose-b677f617f2de@spud> (raw)
In-Reply-To: <20250609134749.1453835-4-vladimir.kondratiev@mobileye.com>

[-- Attachment #1: Type: text/plain, Size: 4261 bytes --]

On Mon, Jun 09, 2025 at 04:47:45PM +0300, Vladimir Kondratiev wrote:
> Add generic, Risc-V spec compliant (see [1]) aclint-sswi binding
> 
> Thead specific binding preserved, and converted to variant of the
> generic aclint-sswi
> 
> Link: https://github.com/riscvarchive/riscv-aclint [1]

What is the ratification status of this spec?

> 
> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
> ---
>  .../riscv,aclint-sswi.yaml                    | 89 +++++++++++++++++++
>  .../thead,c900-aclint-sswi.yaml               | 58 ------------
>  2 files changed, 89 insertions(+), 58 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-sswi.yaml
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-sswi.yaml b/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-sswi.yaml
> new file mode 100644
> index 000000000000..cffddfcfcfea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,aclint-sswi.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/riscv,aclint-sswi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Risc-V ACLINT Supervisor-level Software Interrupt Device

s/Risc-V/RISC-V/g

> +
> +maintainers:
> +  - Inochi Amaoto <inochiama@outlook.com>
> +
> +description:
> +  The SSWI device is a part of the Risc-V ACLINT device. It provides
> +  supervisor-level IPI functionality for a set of HARTs on a THEAD
> +  platform. It provides a register to set an IPI (SETSSIP) for each
> +  HART connected to the SSWI device. See specification
> +  https://github.com/riscvarchive/riscv-aclint
> +
> +  T-HEAD C900 ACLINT is a variant of the ACLINT, using dedicated
> +  compatible string
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - sophgo,sg2044-aclint-sswi
> +          - const: thead,c900-aclint-sswi
> +      - items:
> +          - const: riscv,aclint-sswi

You need a specific compatible for your implementation.
Whether or not this compatible is viable depends on the answer to the
ratification status and/or plan for the spec.

> +
> +  reg:
> +    maxItems: 1
> +
> +  "#interrupt-cells":
> +    const: 0
> +
> +  interrupt-controller: true
> +
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 4095
> +
> +  riscv,hart-indexes:
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    maxItems: 16384

maxItems is 4x what is allowed for interrupts-extended. Why?

> +    description:
> +      A list of hart indexes that APLIC should use to address each hart
> +      that is mentioned in the "interrupts-extended"

Please constrain this property to only be permitted on !thead.

> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#interrupt-cells"
> +  - interrupt-controller
> +  - interrupts-extended
> +
> +examples:
> +  - |
> +    //Example 1
> +    interrupt-controller@94000000 {
> +      compatible = "sophgo,sg2044-aclint-sswi", "thead,c900-aclint-sswi";
> +      reg = <0x94000000 0x00004000>;
> +      #interrupt-cells = <0>;
> +      interrupt-controller;
> +      interrupts-extended = <&cpu1intc 1>,
> +                            <&cpu2intc 1>,
> +                            <&cpu3intc 1>,
> +                            <&cpu4intc 1>;
> +    };
> +
> +  - |
> +    //Example 2
> +    interrupt-controller@94000000 {
> +      compatible = "riscv,aclint-sswi";
> +      reg = <0x94000000 0x00004000>;
> +      #interrupt-cells = <0>;
> +      interrupt-controller;
> +      interrupts-extended = <&cpu1intc 1>,
> +                            <&cpu2intc 1>,
> +                            <&cpu3intc 1>,
> +                            <&cpu4intc 1>;
> +      riscv,hart-indexes = <0 1 0x10 0x11>;

Please be consistent. Hex or decimal, but not both.

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-06-09 16:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 13:47 [PATCH v1 0/7] Risc-V ACLINT IPI controller Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-23 12:53   ` Alexandre Ghiti
2025-06-09 13:47 ` [PATCH v1 2/7] irqchip: riscv aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-12 12:50   ` Thomas Gleixner
2025-06-09 13:47 ` [PATCH v1 3/7] dt-bindings: interrupt-controller: add generic Risc-v aclint-sswi Vladimir Kondratiev
2025-06-09 16:01   ` Conor Dooley [this message]
2025-06-10  9:55     ` Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 4/7] irqchip: introduce generic Risc-V aclint-sswi Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 5/7] irqchip: aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 6/7] irqchip: aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 7/7] irqchip: aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-10 10:05 ` [PATCH v2 0/7] MIPS P8700 variant of the ACLINT IPI controller Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 2/7] irqchip: riscv aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 3/7] dt-bindings: interrupt-controller: add MIPS P8700 aclint-sswi Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 4/7] irqchip: MIPS P800 variant of aclint-sswi Vladimir Kondratiev
2025-06-10 10:09     ` Inochi Amaoto
2025-06-10 10:46       ` Vladimir Kondratiev
2025-06-10 10:53         ` Inochi Amaoto
2025-06-10 11:09           ` Vladimir Kondratiev
2025-06-10 11:20             ` Inochi Amaoto
2025-06-12 13:03     ` Thomas Gleixner
2025-06-12 14:38       ` Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 5/7] irqchip: aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 6/7] irqchip: aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 7/7] irqchip: aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-12 14:39 ` [PATCH v3 0/7] MIPS P8700 variant of the ACLINT IPI controller Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-20 19:31     ` Thomas Gleixner
2025-06-12 14:39   ` [PATCH v3 2/7] irqchip/riscv-aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 3/7] dt-bindings: interrupt-controller: add MIPS P8700 aclint-sswi Vladimir Kondratiev
2025-06-12 15:35     ` Conor Dooley
2025-06-12 14:39   ` [PATCH v3 4/7] irqchip: MIPS P800 variant of aclint-sswi Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 5/7] irqchip/aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 6/7] irqchip/aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 7/7] irqchip/aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-26 13:48   ` [PATCH v3 0/7] MIPS P8700 variant of the ACLINT IPI controller Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250609-rejoice-disclose-b677f617f2de@spud \
    --to=conor@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh@kernel.org \
    --cc=sophgo@lists.linux.dev \
    --cc=sunilvl@ventanamicro.com \
    --cc=takakura@valinux.co.jp \
    --cc=tglx@linutronix.de \
    --cc=unicorn_wang@outlook.com \
    --cc=vladimir.kondratiev@mobileye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox