aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:05:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-14 17:05:05 -0500
commit980f3c344ff1cb4a8be9a169c6bde2dc74ca6288 (patch)
treef7b22006dec2cebed697b0a2c6701ca16c58c7a2 /Documentation/devicetree/bindings
parent7d22286ff757586f3cdbd70ded88b98250285ec5 (diff)
parent170680abd1eb98a9773ed068435fef9a6402a10f (diff)
Merge tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull take two of the GPIO updates: "Same stuff as last time, now with a fixup patch for the previous compile error plus I ran a few extra rounds of compile-testing. This is the bulk of GPIO changes for the v3.19 series: - A new API that allows setting more than one GPIO at the time. This is implemented for the new descriptor-based API only and makes it possible to e.g. toggle a clock and data line at the same time, if the hardware can do this with a single register write. Both consumers and drivers need new calls, and the core will fall back to driving individual lines where needed. Implemented for the MPC8xxx driver initially - Patched the mdio-mux-gpio and the serial mctrl driver that drives modems to use the new multiple-setting API to set several signals simultaneously - Get rid of the global GPIO descriptor array, and instead allocate descriptors dynamically for each GPIO on a certain GPIO chip. This moves us closer to getting rid of the limitation of using the global, static GPIO numberspace - New driver and device tree bindings for 74xx ICs - New driver and device tree bindings for the VF610 Vybrid - Support the RCAR r8a7793 and r8a7794 - Guidelines for GPIO device tree bindings trying to get things a bit more strict with the advent of combined device properties - Suspend/resume support for the MVEBU driver - A slew of minor fixes and improvements" * tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (33 commits) gpio: mcp23s08: fix up compilation error gpio: pl061: document gpio-ranges property for bindings file gpio: pl061: hook request if gpio-ranges avaiable gpio: mcp23s08: Add option to configure IRQ output polarity as active high gpio: fix deferred probe detection for legacy API serial: mctrl_gpio: use gpiod_set_array function mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function gpio: remove const modifier from gpiod_get_direction() gpio: remove gpio_descs global array gpio: mxs: implement get_direction callback gpio: em: Use dynamic allocation of GPIOs gpio: Check if base is positive before calling gpio_is_valid() gpio: mcp23s08: Add simple IRQ support for SPI devices gpio: mcp23s08: request a shared interrupt gpio: mcp23s08: Do not free unrequested interrupt gpio: rcar: Add r8a7793 and r8a7794 support gpio-mpc8xxx: add mpc8xxx_gpio_set_multiple function gpiolib: allow simultaneous setting of multiple GPIO outputs gpio: mvebu: add suspend/resume support gpio: gpio-davinci: remove duplicate check on resource ..
Diffstat (limited to 'Documentation/devicetree/bindings')
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt30
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-vf610.txt55
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt40
-rw-r--r--Documentation/devicetree/bindings/gpio/pl061-gpio.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt4
6 files changed, 117 insertions, 16 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
new file mode 100644
index 000000000000..7bb1a9d60133
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
@@ -0,0 +1,30 @@
1* 74XX MMIO GPIO driver
2
3Required properties:
4- compatible: Should contain one of the following:
5 "ti,741g125": for 741G125 (1-bit Input),
6 "ti,741g174": for 741G74 (1-bit Output),
7 "ti,742g125": for 742G125 (2-bit Input),
8 "ti,7474" : for 7474 (2-bit Output),
9 "ti,74125" : for 74125 (4-bit Input),
10 "ti,74175" : for 74175 (4-bit Output),
11 "ti,74365" : for 74365 (6-bit Input),
12 "ti,74174" : for 74174 (6-bit Output),
13 "ti,74244" : for 74244 (8-bit Input),
14 "ti,74273" : for 74273 (8-bit Output),
15 "ti,741624" : for 741624 (16-bit Input),
16 "ti,7416374": for 7416374 (16-bit Output).
17- reg: Physical base address and length where IC resides.
18- gpio-controller: Marks the device node as a gpio controller.
19- #gpio-cells: Should be two. The first cell is the pin number and
20 the second cell is used to specify the GPIO polarity:
21 0 = Active High,
22 1 = Active Low.
23
24Example:
25 ctrl: gpio@30008004 {
26 compatible = "ti,74174";
27 reg = <0x30008004 0x1>;
28 gpio-controller;
29 #gpio-cells = <2>;
30 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
index c306a2d0f2b1..f3332b9a8ed4 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
@@ -57,6 +57,8 @@ Optional device specific properties:
57 occurred on. If it is not set, the interrupt are only generated for the 57 occurred on. If it is not set, the interrupt are only generated for the
58 bank they belong to. 58 bank they belong to.
59 On devices with only one interrupt output this property is useless. 59 On devices with only one interrupt output this property is useless.
60- microchip,irq-active-high: Sets the INTPOL flag in the IOCON register. This
61 configures the IRQ output polarity as active high.
60 62
61Example I2C (with interrupt): 63Example I2C (with interrupt):
62gpiom1: gpio@20 { 64gpiom1: gpio@20 {
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
new file mode 100644
index 000000000000..436cc99c6598
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
@@ -0,0 +1,55 @@
1* Freescale VF610 PORT/GPIO module
2
3The Freescale PORT/GPIO modules are two adjacent modules providing GPIO
4functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of
5each, and each PORT module has its own interrupt.
6
7Required properties for GPIO node:
8- compatible : Should be "fsl,<soc>-gpio", currently "fsl,vf610-gpio"
9- reg : The first reg tuple represents the PORT module, the second tuple
10 the GPIO module.
11- interrupts : Should be the port interrupt shared by all 32 pins.
12- gpio-controller : Marks the device node as a gpio controller.
13- #gpio-cells : Should be two. The first cell is the pin number and
14 the second cell is used to specify the gpio polarity:
15 0 = active high
16 1 = active low
17- interrupt-controller: Marks the device node as an interrupt controller.
18- #interrupt-cells : Should be 2. The first cell is the GPIO number.
19 The second cell bits[3:0] is used to specify trigger type and level flags:
20 1 = low-to-high edge triggered.
21 2 = high-to-low edge triggered.
22 4 = active high level-sensitive.
23 8 = active low level-sensitive.
24
25Note: Each GPIO port should have an alias correctly numbered in "aliases"
26node.
27
28Examples:
29
30aliases {
31 gpio0 = &gpio1;
32 gpio1 = &gpio2;
33};
34
35gpio1: gpio@40049000 {
36 compatible = "fsl,vf610-gpio";
37 reg = <0x40049000 0x1000 0x400ff000 0x40>;
38 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
39 gpio-controller;
40 #gpio-cells = <2>;
41 interrupt-controller;
42 #interrupt-cells = <2>;
43 gpio-ranges = <&iomuxc 0 0 32>;
44};
45
46gpio2: gpio@4004a000 {
47 compatible = "fsl,vf610-gpio";
48 reg = <0x4004a000 0x1000 0x400ff040 0x40>;
49 interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
50 gpio-controller;
51 #gpio-cells = <2>;
52 interrupt-controller;
53 #interrupt-cells = <2>;
54 gpio-ranges = <&iomuxc 0 32 32>;
55};
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 3fb8f53071b8..b9bd1d64cfa6 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -13,13 +13,22 @@ properties, each containing a 'gpio-list':
13 gpio-specifier : Array of #gpio-cells specifying specific gpio 13 gpio-specifier : Array of #gpio-cells specifying specific gpio
14 (controller specific) 14 (controller specific)
15 15
16GPIO properties should be named "[<name>-]gpios". The exact 16GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
17meaning of each gpios property must be documented in the device tree 17of this GPIO for the device. While a non-existent <name> is considered valid
18binding for each device. 18for compatibility reasons (resolving to the "gpios" property), it is not allowed
19for new bindings.
19 20
20For example, the following could be used to describe GPIO pins used 21GPIO properties can contain one or more GPIO phandles, but only in exceptional
21as chip select lines; with chip selects 0, 1 and 3 populated, and chip 22cases should they contain more than one. If your device uses several GPIOs with
22select 2 left empty: 23distinct functions, reference each of them under its own property, giving it a
24meaningful name. The only case where an array of GPIOs is accepted is when
25several GPIOs serve the same function (e.g. a parallel data line).
26
27The exact purpose of each gpios property must be documented in the device tree
28binding of the device.
29
30The following example could be used to describe GPIO pins used as device enable
31and bit-banged data signals:
23 32
24 gpio1: gpio1 { 33 gpio1: gpio1 {
25 gpio-controller 34 gpio-controller
@@ -30,10 +39,12 @@ select 2 left empty:
30 #gpio-cells = <1>; 39 #gpio-cells = <1>;
31 }; 40 };
32 [...] 41 [...]
33 chipsel-gpios = <&gpio1 12 0>, 42
34 <&gpio1 13 0>, 43 enable-gpios = <&gpio2 2>;
35 <0>, /* holes are permitted, means no GPIO 2 */ 44 data-gpios = <&gpio1 12 0>,
36 <&gpio2 2>; 45 <&gpio1 13 0>,
46 <&gpio1 14 0>,
47 <&gpio1 15 0>;
37 48
38Note that gpio-specifier length is controller dependent. In the 49Note that gpio-specifier length is controller dependent. In the
39above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2 50above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2
@@ -42,16 +53,17 @@ only uses one.
42gpio-specifier may encode: bank, pin position inside the bank, 53gpio-specifier may encode: bank, pin position inside the bank,
43whether pin is open-drain and whether pin is logically inverted. 54whether pin is open-drain and whether pin is logically inverted.
44Exact meaning of each specifier cell is controller specific, and must 55Exact meaning of each specifier cell is controller specific, and must
45be documented in the device tree binding for the device. 56be documented in the device tree binding for the device. Use the macros
57defined in include/dt-bindings/gpio/gpio.h whenever possible:
46 58
47Example of a node using GPIOs: 59Example of a node using GPIOs:
48 60
49 node { 61 node {
50 gpios = <&qe_pio_e 18 0>; 62 enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>;
51 }; 63 };
52 64
53In this example gpio-specifier is "18 0" and encodes GPIO pin number, 65GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
54and GPIO flags as accepted by the "qe_pio_e" gpio-controller. 66GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
55 67
561.1) GPIO specifier best practices 681.1) GPIO specifier best practices
57---------------------------------- 69----------------------------------
diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
index a2c416bcbccc..89058d375b7c 100644
--- a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt
@@ -7,4 +7,4 @@ Required properties:
7 - bit 0 specifies polarity (0 for normal, 1 for inverted) 7 - bit 0 specifies polarity (0 for normal, 1 for inverted)
8- gpio-controller : Marks the device node as a GPIO controller. 8- gpio-controller : Marks the device node as a GPIO controller.
9- interrupts : Interrupt mapping for GPIO IRQ. 9- interrupts : Interrupt mapping for GPIO IRQ.
10 10- gpio-ranges : Interaction with the PINCTRL subsystem.
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 941a26aa4322..38fb86f28ba2 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -6,7 +6,9 @@ Required Properties:
6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. 6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. 7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. 8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller. 9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
10 - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
11 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
10 - "renesas,gpio-rcar": for generic R-Car GPIO controller. 12 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
11 13
12 - reg: Base address and length of each memory resource used by the GPIO 14 - reg: Base address and length of each memory resource used by the GPIO