diff options
Diffstat (limited to 'Documentation/devicetree/bindings/gpio')
8 files changed, 208 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74x164.txt b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt new file mode 100644 index 000000000000..cc2608021f26 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Generic 8-bits shift register GPIO driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "fairchild,74hc595" | ||
5 | - reg : chip select number | ||
6 | - gpio-controller : Marks the device node as a gpio controller. | ||
7 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
8 | the second cell is used to specify the gpio polarity: | ||
9 | 0 = active high | ||
10 | 1 = active low | ||
11 | - registers-number: Number of daisy-chained shift registers | ||
12 | |||
13 | Example: | ||
14 | |||
15 | gpio5: gpio5@0 { | ||
16 | compatible = "fairchild,74hc595"; | ||
17 | reg = <0>; | ||
18 | gpio-controller; | ||
19 | #gpio-cells = <2>; | ||
20 | registers-number = <4>; | ||
21 | spi-max-frequency = <100000>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-adnp.txt b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt new file mode 100644 index 000000000000..af66b2724837 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | Avionic Design N-bit GPIO expander bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ad,gpio-adnp" | ||
5 | - reg: The I2C slave address for this device. | ||
6 | - interrupt-parent: phandle of the parent interrupt controller. | ||
7 | - interrupts: Interrupt specifier for the controllers interrupt. | ||
8 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the | ||
9 | second cell is used to specify optional parameters: | ||
10 | - bit 0: polarity (0: normal, 1: inverted) | ||
11 | - gpio-controller: Marks the device as a GPIO controller | ||
12 | - nr-gpios: The number of pins supported by the controller. | ||
13 | |||
14 | The GPIO expander can optionally be used as an interrupt controller, in | ||
15 | which case it uses the default two cell specifier as described in | ||
16 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | gpioext: gpio-controller@41 { | ||
21 | compatible = "ad,gpio-adnp"; | ||
22 | reg = <0x41>; | ||
23 | |||
24 | interrupt-parent = <&gpio>; | ||
25 | interrupts = <160 1>; | ||
26 | |||
27 | gpio-controller; | ||
28 | #gpio-cells = <2>; | ||
29 | |||
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
32 | |||
33 | nr-gpios = <64>; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-fan.txt b/Documentation/devicetree/bindings/gpio/gpio-fan.txt new file mode 100644 index 000000000000..2dd457a3469a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-fan.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Bindings for fan connected to GPIO lines | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "gpio-fan" | ||
5 | - gpios: Specifies the pins that map to bits in the control value, | ||
6 | ordered MSB-->LSB. | ||
7 | - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the | ||
8 | control value that should be set to achieve them. This array | ||
9 | must have the RPM values in ascending order. | ||
10 | |||
11 | Optional properties: | ||
12 | - alarm-gpios: This pin going active indicates something is wrong with | ||
13 | the fan, and a udev event will be fired. | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | gpio_fan { | ||
18 | compatible = "gpio-fan"; | ||
19 | gpios = <&gpio1 14 1 | ||
20 | &gpio1 13 1>; | ||
21 | gpio-fan,speed-map = <0 0 | ||
22 | 3000 1 | ||
23 | 6000 2>; | ||
24 | alarm-gpios = <&gpio1 15 1>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt b/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt new file mode 100644 index 000000000000..a6f3bec1da7d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-mvebu.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | * Marvell EBU GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio" | ||
6 | or "marvell,armadaxp-gpio". "marvell,orion-gpio" should be used for | ||
7 | Orion, Kirkwood, Dove, Discovery (except MV78200) and Armada | ||
8 | 370. "marvell,mv78200-gpio" should be used for the Discovery | ||
9 | MV78200. "marvel,armadaxp-gpio" should be used for all Armada XP | ||
10 | SoCs (MV78230, MV78260, MV78460). | ||
11 | |||
12 | - reg: Address and length of the register set for the device. Only one | ||
13 | entry is expected, except for the "marvell,armadaxp-gpio" variant | ||
14 | for which two entries are expected: one for the general registers, | ||
15 | one for the per-cpu registers. | ||
16 | |||
17 | - interrupts: The list of interrupts that are used for all the pins | ||
18 | managed by this GPIO bank. There can be more than one interrupt | ||
19 | (example: 1 interrupt per 8 pins on Armada XP, which means 4 | ||
20 | interrupts per bank of 32 GPIOs). | ||
21 | |||
22 | - interrupt-controller: identifies the node as an interrupt controller | ||
23 | |||
24 | - #interrupt-cells: specifies the number of cells needed to encode an | ||
25 | interrupt source. Should be two. | ||
26 | The first cell is the GPIO number. | ||
27 | The second cell is used to specify flags: | ||
28 | bits[3:0] trigger type and level flags: | ||
29 | 1 = low-to-high edge triggered. | ||
30 | 2 = high-to-low edge triggered. | ||
31 | 4 = active high level-sensitive. | ||
32 | 8 = active low level-sensitive. | ||
33 | |||
34 | - gpio-controller: marks the device node as a gpio controller | ||
35 | |||
36 | - ngpios: number of GPIOs this controller has | ||
37 | |||
38 | - #gpio-cells: Should be two. The first cell is the pin number. The | ||
39 | second cell is reserved for flags, unused at the moment. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | gpio0: gpio@d0018100 { | ||
44 | compatible = "marvell,armadaxp-gpio"; | ||
45 | reg = <0xd0018100 0x40>, | ||
46 | <0xd0018800 0x30>; | ||
47 | ngpios = <32>; | ||
48 | gpio-controller; | ||
49 | #gpio-cells = <2>; | ||
50 | interrupt-controller; | ||
51 | #interrupt-cells = <2>; | ||
52 | interrupts = <16>, <17>, <18>, <19>; | ||
53 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index 5375625e8cd2..f1e5dfecf55d 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
@@ -39,3 +39,46 @@ Example: | |||
39 | #gpio-cells = <4>; | 39 | #gpio-cells = <4>; |
40 | gpio-controller; | 40 | gpio-controller; |
41 | }; | 41 | }; |
42 | |||
43 | |||
44 | Samsung S3C24XX GPIO Controller | ||
45 | |||
46 | Required properties: | ||
47 | - compatible: Compatible property value should be "samsung,s3c24xx-gpio". | ||
48 | |||
49 | - reg: Physical base address of the controller and length of memory mapped | ||
50 | region. | ||
51 | |||
52 | - #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes | ||
53 | should be the following with values derived from the SoC user manual. | ||
54 | <[phandle of the gpio controller node] | ||
55 | [pin number within the gpio controller] | ||
56 | [mux function] | ||
57 | [flags and pull up/down] | ||
58 | |||
59 | Values for gpio specifier: | ||
60 | - Pin number: depending on the controller a number from 0 up to 15. | ||
61 | - Mux function: Depending on the SoC and the gpio bank the gpio can be set | ||
62 | as input, output or a special function | ||
63 | - Flags and Pull Up/Down: the values to use differ for the individual SoCs | ||
64 | example S3C2416/S3C2450: | ||
65 | 0 - Pull Up/Down Disabled. | ||
66 | 1 - Pull Down Enabled. | ||
67 | 2 - Pull Up Enabled. | ||
68 | Bit 16 (0x00010000) - Input is active low. | ||
69 | Consult the user manual for the correct values of Mux and Pull Up/Down. | ||
70 | |||
71 | - gpio-controller: Specifies that the node is a gpio controller. | ||
72 | - #address-cells: should be 1. | ||
73 | - #size-cells: should be 1. | ||
74 | |||
75 | Example: | ||
76 | |||
77 | gpa: gpio-controller@56000000 { | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | compatible = "samsung,s3c24xx-gpio"; | ||
81 | reg = <0x56000000 0x10>; | ||
82 | #gpio-cells = <3>; | ||
83 | gpio-controller; | ||
84 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt index 16695d9cf1e8..66788fda1db3 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt | |||
@@ -11,6 +11,11 @@ Required properties: | |||
11 | - interrupt-controller: Mark the device node as an interrupt controller | 11 | - interrupt-controller: Mark the device node as an interrupt controller |
12 | The first cell is the GPIO number. | 12 | The first cell is the GPIO number. |
13 | The second cell is not used. | 13 | The second cell is not used. |
14 | - ti,use-leds : Enables LEDA and LEDB outputs if set | ||
15 | - ti,debounce : if n-th bit is set, debounces GPIO-n | ||
16 | - ti,mmc-cd : if n-th bit is set, GPIO-n controls VMMC(n+1) | ||
17 | - ti,pullups : if n-th bit is set, set a pullup on GPIO-n | ||
18 | - ti,pulldowns : if n-th bit is set, set a pulldown on GPIO-n | ||
14 | 19 | ||
15 | Example: | 20 | Example: |
16 | 21 | ||
@@ -20,4 +25,5 @@ twl_gpio: gpio { | |||
20 | gpio-controller; | 25 | gpio-controller; |
21 | #interrupt-cells = <2>; | 26 | #interrupt-cells = <2>; |
22 | interrupt-controller; | 27 | interrupt-controller; |
28 | ti,use-leds; | ||
23 | }; | 29 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt new file mode 100644 index 000000000000..f4dc5233167e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-vt8500.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | VIA/Wondermedia VT8500 GPIO Controller | ||
2 | ----------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : "via,vt8500-gpio", "wm,wm8505-gpio" | ||
6 | or "wm,wm8650-gpio" depending on your SoC | ||
7 | - reg : Should contain 1 register range (address and length) | ||
8 | - #gpio-cells : should be <3>. | ||
9 | 1) bank | ||
10 | 2) pin number | ||
11 | 3) flags - should be 0 | ||
12 | |||
13 | Example: | ||
14 | |||
15 | gpio: gpio-controller@d8110000 { | ||
16 | compatible = "via,vt8500-gpio"; | ||
17 | gpio-controller; | ||
18 | reg = <0xd8110000 0x10000>; | ||
19 | #gpio-cells = <3>; | ||
20 | }; | ||
21 | |||
22 | vibrate { | ||
23 | gpios = <&gpio 0 1 0>; /* Bank 0, Pin 1, No flags */ | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt index 9bb308abd221..edc83c1c0d54 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/gpio/led.txt | |||
@@ -8,7 +8,7 @@ node's name represents the name of the corresponding LED. | |||
8 | 8 | ||
9 | LED sub-node properties: | 9 | LED sub-node properties: |
10 | - gpios : Should specify the LED's GPIO, see "gpios property" in | 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in |
11 | Documentation/devicetree/gpio.txt. Active low LEDs should be | 11 | Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be |
12 | indicated using flags in the GPIO specifier. | 12 | indicated using flags in the GPIO specifier. |
13 | - label : (optional) The label for this LED. If omitted, the label is | 13 | - label : (optional) The label for this LED. If omitted, the label is |
14 | taken from the node name (excluding the unit address). | 14 | taken from the node name (excluding the unit address). |