Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[deliverable/linux.git] / Documentation / devicetree / bindings / gpio / gpio-tz1090.txt
1 ImgTec TZ1090 GPIO Controller
2
3 Required properties:
4 - compatible: Compatible property value should be "img,tz1090-gpio".
5
6 - reg: Physical base address of the controller and length of memory mapped
7 region.
8
9 - #address-cells: Should be 1 (for bank subnodes)
10
11 - #size-cells: Should be 0 (for bank subnodes)
12
13 - Each bank of GPIOs should have a subnode to represent it.
14
15 Bank subnode required properties:
16 - reg: Index of bank in the range 0 to 2.
17
18 - gpio-controller: Specifies that the node is a gpio controller.
19
20 - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
21 nodes should have the following values.
22 <[phandle of the gpio controller node]
23 [gpio number within the gpio bank]
24 [gpio flags]>
25
26 Values for gpio specifier:
27 - GPIO number: a value in the range 0 to 29.
28 - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
29 Only the following flags are supported:
30 GPIO_ACTIVE_HIGH
31 GPIO_ACTIVE_LOW
32
33 Bank subnode optional properties:
34 - gpio-ranges: Mapping to pin controller pins (as described in
35 Documentation/devicetree/bindings/gpio/gpio.txt)
36
37 - interrupts: Interrupt for the entire bank
38
39 - interrupt-controller: Specifies that the node is an interrupt controller
40
41 - #interrupt-cells: Should be 2. The syntax of the interrupt specifier used by
42 client nodes should have the following values.
43 <[phandle of the interurupt controller]
44 [gpio number within the gpio bank]
45 [irq flags]>
46
47 Values for irq specifier:
48 - GPIO number: a value in the range 0 to 29
49 - IRQ flags: value to describe edge and level triggering, as defined in
50 <dt-bindings/interrupt-controller/irq.h>. Only the following flags are
51 supported:
52 IRQ_TYPE_EDGE_RISING
53 IRQ_TYPE_EDGE_FALLING
54 IRQ_TYPE_EDGE_BOTH
55 IRQ_TYPE_LEVEL_HIGH
56 IRQ_TYPE_LEVEL_LOW
57
58
59
60 Example:
61
62 gpios: gpio-controller@02005800 {
63 #address-cells = <1>;
64 #size-cells = <0>;
65 compatible = "img,tz1090-gpio";
66 reg = <0x02005800 0x90>;
67
68 /* bank 0 with an interrupt */
69 gpios0: bank@0 {
70 #gpio-cells = <2>;
71 #interrupt-cells = <2>;
72 reg = <0>;
73 interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
74 gpio-controller;
75 gpio-ranges = <&pinctrl 0 0 30>;
76 interrupt-controller;
77 };
78
79 /* bank 2 without interrupt */
80 gpios2: bank@2 {
81 #gpio-cells = <2>;
82 reg = <2>;
83 gpio-controller;
84 gpio-ranges = <&pinctrl 0 60 30>;
85 };
86 };
87
88
This page took 0.037477 seconds and 5 git commands to generate.