Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Caleb James DeLisle <cjd@cjdns.fr>
To: linux-mips@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	benjamin.larsson@genexis.eu, Caleb James DeLisle <cjd@cjdns.fr>
Subject: [PATCH v2 02/10] dt-bindings: interrupt-controller: Add EcoNet EN751221 INTC
Date: Tue, 25 Mar 2025 13:43:41 +0000	[thread overview]
Message-ID: <20250325134349.2476458-3-cjd@cjdns.fr> (raw)
In-Reply-To: <20250325134349.2476458-1-cjd@cjdns.fr>

Document the device tree binding for the interrupt controller in the
EcoNet EN751221 MIPS SoC.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
If anyone is aware of a standard name for this "shadow interrupt" pattern,
please let me know and I will re-send with updated naming.
---
 .../econet,en751221-intc.yaml                 | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml
new file mode 100644
index 000000000000..5536319c49c3
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/econet,en751221-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EcoNet EN751221 Interrupt Controller
+
+maintainers:
+  - Caleb James DeLisle <cjd@cjdns.fr>
+
+description:
+  The EcoNet EN751221 Interrupt Controller is a simple interrupt controller
+  designed for the MIPS 34Kc MT SMP processor with 2 VPEs. Each interrupt can
+  be routed to either VPE but not both, so to support per-CPU interrupts, a
+  secondary IRQ number is allocated to control masking/unmasking on VPE#1. For
+  lack of a better term we call these "shadow interrupts". The assignment of
+  shadow interrupts is defined by the SoC integrator when wiring the interrupt
+  lines, so they are configurable in the device tree.
+
+allOf:
+  - $ref: /schemas/interrupt-controller.yaml#
+
+properties:
+  compatible:
+    const: econet,en751221-intc
+
+  reg:
+    maxItems: 1
+
+  "#interrupt-cells":
+    const: 1
+
+  interrupt-controller: true
+
+  interrupts:
+    maxItems: 1
+    description: Interrupt line connecting this controller to its parent.
+
+  econet,shadow-interrupts:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description:
+      An array of interrupt number pairs where each pair represents a shadow
+      interrupt relationship. The first number in each pair is the primary IRQ,
+      and the second is its shadow IRQ used for VPE#1 control. For example,
+      <8 3> means IRQ 8 is shadowed by IRQ 3, so IRQ 3 cannot be mapped, but
+      when VPE#1 requests IRQ 8, it will manipulate the IRQ 3 mask bit.
+    minItems: 1
+    maxItems: 20
+    items:
+      items:
+        - description: primary per-CPU IRQ
+        - description: shadow IRQ number
+
+required:
+  - compatible
+  - reg
+  - interrupt-controller
+  - "#interrupt-cells"
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    interrupt-controller@1fb40000 {
+        compatible = "econet,en751221-intc";
+        reg = <0x1fb40000 0x100>;
+
+        interrupt-controller;
+        #interrupt-cells = <1>;
+
+        interrupt-parent = <&cpuintc>;
+        interrupts = <2>;
+
+        econet,shadow-interrupts = <7 2>, <8 3>, <13 12>, <30 29>;
+    };
+...
-- 
2.39.5


  parent reply	other threads:[~2025-03-25 13:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 13:43 [PATCH v2 00/10] Add EcoNet EN751221 MIPS platform support Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: Add EcoNet Caleb James DeLisle
2025-03-25 14:09   ` Sergey Shtylyov
2025-03-25 14:12     ` Caleb James DeLisle
2025-03-25 13:43 ` Caleb James DeLisle [this message]
2025-03-25 13:43 ` [PATCH v2 03/10] irqchip: Add EcoNet EN751221 INTC Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 04/10] dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer Caleb James DeLisle
2025-03-26  8:04   ` Krzysztof Kozlowski
2025-03-26  8:19     ` Caleb James DeLisle
2025-03-26 14:20       ` Krzysztof Kozlowski
2025-03-26 16:43         ` Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 05/10] clocksource/drivers: Add EcoNet Timer HPT driver Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 06/10] dt-bindings: mips: Add EcoNet platform binding Caleb James DeLisle
2025-03-26  8:05   ` Krzysztof Kozlowski
2025-03-25 13:43 ` [PATCH v2 07/10] mips: Add EcoNet MIPS platform support Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 08/10] dt-bindings: vendor-prefixes: Add SmartFiber Caleb James DeLisle
2025-03-26  8:01   ` Krzysztof Kozlowski
2025-03-25 13:43 ` [PATCH v2 09/10] mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board Caleb James DeLisle
2025-03-25 13:43 ` [PATCH v2 10/10] MAINTAINERS: Add entry for newly added EcoNet platform Caleb James DeLisle

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=20250325134349.2476458-3-cjd@cjdns.fr \
    --to=cjd@cjdns.fr \
    --cc=benjamin.larsson@genexis.eu \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /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