irqchip: crossbar: Allow for quirky hardware with direct hardwiring of GIC
[cascardo/linux.git] / Documentation / devicetree / bindings / arm / omap / crossbar.txt
1 Some socs have a large number of interrupts requests to service
2 the needs of its many peripherals and subsystems. All of the
3 interrupt lines from the subsystems are not needed at the same
4 time, so they have to be muxed to the irq-controller appropriately.
5 In such places a interrupt controllers are preceded by an CROSSBAR
6 that provides flexibility in muxing the device requests to the controller
7 inputs.
8
9 Required properties:
10 - compatible : Should be "ti,irq-crossbar"
11 - reg: Base address and the size of the crossbar registers.
12 - ti,max-irqs: Total number of irqs available at the interrupt controller.
13 - ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed.
14 - ti,reg-size: Size of a individual register in bytes. Every individual
15             register is assumed to be of same size. Valid sizes are 1, 2, 4.
16 - ti,irqs-reserved: List of the reserved irq lines that are not muxed using
17                  crossbar. These interrupt lines are reserved in the soc,
18                  so crossbar bar driver should not consider them as free
19                  lines.
20
21 Optional properties:
22 - ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
23   SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
24   crossbar. These irqs have a crossbar register, but still cannot be used.
25
26 - ti,irqs-safe-map: integer which maps to a safe configuration to use
27   when the interrupt controller irq is unused (when not provided, default is 0)
28
29 Examples:
30                 crossbar_mpu: @4a020000 {
31                         compatible = "ti,irq-crossbar";
32                         reg = <0x4a002a48 0x130>;
33                         ti,max-irqs = <160>;
34                         ti,max-crossbar-sources = <400>;
35                         ti,reg-size = <2>;
36                         ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>;
37                         ti,irqs-skip = <10 133 139 140>;
38                 };
39
40 Consumer:
41 ========
42 See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and
43 Documentation/devicetree/bindings/arm/gic.txt for further details.
44
45 An interrupt consumer on an SoC using crossbar will use:
46         interrupts = <GIC_SPI request_number interrupt_level>
47 When the request number is between 0 to that described by
48 "ti,max-crossbar-sources", it is assumed to be a crossbar mapping. If the
49 request_number is greater than "ti,max-crossbar-sources", then it is mapped as a
50 quirky hardware mapping direct to GIC.
51
52 Example:
53         device_x@0x4a023000 {
54                 /* Crossbar 8 used */
55                 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
56                 ...
57         };
58
59         device_y@0x4a033000 {
60                 /* Direct mapped GIC SPI 1 used */
61                 interrupts = <GIC_SPI DIRECT_IRQ(1) IRQ_TYPE_LEVEL_HIGH>;
62                 ...
63         };