aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2014-11-12 14:43:37 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:30 -0500
commit2ff404005e9f94ee3d05b6b0dac8204c1fcc2346 (patch)
treeecc4814beecb19dd6ffc94a9404035d37979a1e7
parentebf71ec7e14bd55d0114f625686304979ecff4d0 (diff)
of: Add binding document for MIPS GIC
The Global Interrupt Controller (GIC) present on certain MIPS systems can be used to route external interrupts to individual VPEs and CPU interrupt vectors. It also supports a timer and software-generated interrupts. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: John Crispin <blogic@openwrt.org> Cc: David Daney <ddaney.cavm@gmail.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8420/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt55
-rw-r--r--include/dt-bindings/interrupt-controller/mips-gic.h9
2 files changed, 64 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
new file mode 100644
index 000000000000..5a65478e5d40
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/mips-gic.txt
@@ -0,0 +1,55 @@
1MIPS Global Interrupt Controller (GIC)
2
3The MIPS GIC routes external interrupts to individual VPEs and IRQ pins.
4It also supports local (per-processor) interrupts and software-generated
5interrupts which can be used as IPIs. The GIC also includes a free-running
6global timer, per-CPU count/compare timers, and a watchdog.
7
8Required properties:
9- compatible : Should be "mti,gic".
10- interrupt-controller : Identifies the node as an interrupt controller
11- #interrupt-cells : Specifies the number of cells needed to encode an
12 interrupt specifier. Should be 3.
13 - The first cell is the type of interrupt, local or shared.
14 See <include/dt-bindings/interrupt-controller/mips-gic.h>.
15 - The second cell is the GIC interrupt number.
16 - The third cell encodes the interrupt flags.
17 See <include/dt-bindings/interrupt-controller/irq.h> for a list of valid
18 flags.
19
20Optional properties:
21- reg : Base address and length of the GIC registers. If not present,
22 the base address reported by the hardware GCR_GIC_BASE will be used.
23- mti,reserved-cpu-vectors : Specifies the list of CPU interrupt vectors
24 to which the GIC may not route interrupts. Valid values are 2 - 7.
25 This property is ignored if the CPU is started in EIC mode.
26
27Required properties for timer sub-node:
28- compatible : Should be "mti,gic-timer".
29- interrupts : Interrupt for the GIC local timer.
30- clock-frequency : Clock frequency at which the GIC timers operate.
31
32Example:
33
34 gic: interrupt-controller@1bdc0000 {
35 compatible = "mti,gic";
36 reg = <0x1bdc0000 0x20000>;
37
38 interrupt-controller;
39 #interrupt-cells = <3>;
40
41 mti,reserved-cpu-vectors = <7>;
42
43 timer {
44 compatible = "mti,gic-timer";
45 interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
46 clock-frequency = <50000000>;
47 };
48 };
49
50 uart@18101400 {
51 ...
52 interrupt-parent = <&gic>;
53 interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
54 ...
55 };
diff --git a/include/dt-bindings/interrupt-controller/mips-gic.h b/include/dt-bindings/interrupt-controller/mips-gic.h
new file mode 100644
index 000000000000..cf35a577e371
--- /dev/null
+++ b/include/dt-bindings/interrupt-controller/mips-gic.h
@@ -0,0 +1,9 @@
1#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_MIPS_GIC_H
2#define _DT_BINDINGS_INTERRUPT_CONTROLLER_MIPS_GIC_H
3
4#include <dt-bindings/interrupt-controller/irq.h>
5
6#define GIC_SHARED 0
7#define GIC_LOCAL 1
8
9#endif