aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-09-20 08:16:50 -0400
committerRob Herring <rob.herring@calxeda.com>2012-10-01 11:51:25 -0400
commitacc2097934b5403b97f95763fe99fc115b818061 (patch)
tree16fcdd6e3972821076e93017f256776d2f9512da /Documentation
parent06455bbcab76e5f5225de5f38ab948d37a1c3587 (diff)
dt: Document general interrupt controller bindings
In order to use a device as interrupt controller, it needs to be marked with the DT interrupt-controller property. This commit adds rudimentary documentation about the required standard properties and describes the most commonly used interrupt specifiers. Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/interrupts.txt95
1 files changed, 95 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
new file mode 100644
index 000000000000..72a06c0ab1db
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
@@ -0,0 +1,95 @@
1Specifying interrupt information for devices
2============================================
3
41) Interrupt client nodes
5-------------------------
6
7Nodes that describe devices which generate interrupts must contain an
8"interrupts" property. This property must contain a list of interrupt
9specifiers, one per output interrupt. The format of the interrupt specifier is
10determined by the interrupt controller to which the interrupts are routed; see
11section 2 below for details.
12
13The "interrupt-parent" property is used to specify the controller to which
14interrupts are routed and contains a single phandle referring to the interrupt
15controller node. This property is inherited, so it may be specified in an
16interrupt client node or in any of its parent nodes.
17
182) Interrupt controller nodes
19-----------------------------
20
21A device is marked as an interrupt controller with the "interrupt-controller"
22property. This is a empty, boolean property. An additional "#interrupt-cells"
23property defines the number of cells needed to specify a single interrupt.
24
25It is the responsibility of the interrupt controller's binding to define the
26length and format of the interrupt specifier. The following two variants are
27commonly used:
28
29 a) one cell
30 -----------
31 The #interrupt-cells property is set to 1 and the single cell defines the
32 index of the interrupt within the controller.
33
34 Example:
35
36 vic: intc@10140000 {
37 compatible = "arm,versatile-vic";
38 interrupt-controller;
39 #interrupt-cells = <1>;
40 reg = <0x10140000 0x1000>;
41 };
42
43 sic: intc@10003000 {
44 compatible = "arm,versatile-sic";
45 interrupt-controller;
46 #interrupt-cells = <1>;
47 reg = <0x10003000 0x1000>;
48 interrupt-parent = <&vic>;
49 interrupts = <31>; /* Cascaded to vic */
50 };
51
52 b) two cells
53 ------------
54 The #interrupt-cells property is set to 2 and the first cell defines the
55 index of the interrupt within the controller, while the second cell is used
56 to specify any of the following flags:
57 - bits[3:0] trigger type and level flags
58 1 = low-to-high edge triggered
59 2 = high-to-low edge triggered
60 4 = active high level-sensitive
61 8 = active low level-sensitive
62
63 Example:
64
65 i2c@7000c000 {
66 gpioext: gpio-adnp@41 {
67 compatible = "ad,gpio-adnp";
68 reg = <0x41>;
69
70 interrupt-parent = <&gpio>;
71 interrupts = <160 1>;
72
73 gpio-controller;
74 #gpio-cells = <1>;
75
76 interrupt-controller;
77 #interrupt-cells = <2>;
78
79 nr-gpios = <64>;
80 };
81
82 sx8634@2b {
83 compatible = "smtc,sx8634";
84 reg = <0x2b>;
85
86 interrupt-parent = <&gpioext>;
87 interrupts = <3 0x8>;
88
89 #address-cells = <1>;
90 #size-cells = <0>;
91
92 threshold = <0x40>;
93 sensitivity = <7>;
94 };
95 };