MIPS Global Interrupt Controller

Schema identifier ($id): "http://devicetree.org/schemas/interrupt-controller/mti,gic.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Paul Burton <paulburton@kernel.org>", "Thomas Bogendoerfer <tsbogend@alpha.franken.de>"

The MIPS GIC routes external interrupts to individual VPEs and IRQ pins. It also supports local (per-processor) interrupts and software-generated interrupts which can be used as IPIs. The GIC also includes a free-running global timer, per-CPU count/compare timers, and a watchdog.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "mti,gic"

#interrupt-cells — required here #

Exact value (const): 3

The 1st cell is the type of interrupt: local or shared defined in the file 'dt-bindings/interrupt-controller/mips-gic.h'. The 2nd cell is the GIC interrupt number. The 3d cell encodes the interrupt flags setting up the IRQ trigger modes, which are defined in the file 'dt-bindings/interrupt-controller/irq.h'.

reg — not listed as required here #

Base address and length of the GIC registers space. If not present, the base address reported by the hardware GCR_GIC_BASE will be used.

Maximum number of items (maxItems): 1

interrupt-controller — required here #

true — No constraints added by this property rule.

mti,reserved-cpu-vectors — not listed as required here #

Specifies the list of CPU interrupt vectors to which the GIC may not route interrupts. This property is ignored if the CPU is started in EIC mode.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 6

Items must be unique (uniqueItems): true

Array item rules (items) #

Minimum value (minimum): 2

Maximum value (maximum): 7

mti,reserved-ipi-vectors — not listed as required here #

Specifies the range of GIC interrupts that are reserved for IPIs. It accepts two values: the 1st is the starting interrupt and the 2nd is the size of the reserved range. If not specified, the driver will allocate the last (2 * number of VPEs in the system).

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Array item rules (items) #

Item 1

Minimum value (minimum): 0

Maximum value (maximum): 254

Item 2

Minimum value (minimum): 2

Maximum value (maximum): 254

timer — not listed as required here #

Value type (type): "object"

MIPS GIC includes a free-running global timer, per-CPU count/compare timers, and a watchdog. Currently only the GIC Timer is supported.

Properties and child nodes (properties) #

compatible — required here

Exact value (const): "mti,gic-timer"

interrupts — required here

Interrupt for the GIC local timer, so normally it's suppose to be of <GIC_LOCAL X IRQ_TYPE_NONE> format.

Maximum number of items (maxItems): 1

clocks — not listed as required here

Maximum number of items (maxItems): 1

clock-frequency — not listed as required here

true — No constraints added by this property rule.

Required in this object (required): "compatible", "interrupts"

Exactly one of these rules must match (oneOf) #

Rule 1

Required in this object (required): "clocks"

Rule 2

Required in this object (required): "clock-frequency"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "#interrupt-cells", "interrupt-controller"

Examples (examples) #

#include <dt-bindings/interrupt-controller/mips-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

interrupt-controller@1bdc0000 {
  compatible = "mti,gic";
  reg = <0x1bdc0000 0x20000>;
  interrupt-controller;
  #interrupt-cells = <3>;
  mti,reserved-cpu-vectors = <7>;
  mti,reserved-ipi-vectors = <40 8>;

  timer {
    compatible = "mti,gic-timer";
    interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
    clock-frequency = <50000000>;
  };
};
#include <dt-bindings/interrupt-controller/mips-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

interrupt-controller@1bdc0000 {
  compatible = "mti,gic";
  reg = <0x1bdc0000 0x20000>;
  interrupt-controller;
  #interrupt-cells = <3>;

  timer {
    compatible = "mti,gic-timer";
    interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
    clocks = <&cpu_pll>;
  };
};
interrupt-controller {
  compatible = "mti,gic";
  interrupt-controller;
  #interrupt-cells = <3>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page