diff options
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt | 52 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt | 71 |
2 files changed, 123 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt new file mode 100644 index 000000000000..4a63bc96b687 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | Broadcom Kona Family GPIO | ||
2 | ========================= | ||
3 | |||
4 | This GPIO driver is used in the following Broadcom SoCs: | ||
5 | BCM11130, BCM11140, BCM11351, BCM28145, BCM28155 | ||
6 | |||
7 | The Broadcom GPIO Controller IP can be configured prior to synthesis to | ||
8 | support up to 8 banks of 32 GPIOs where each bank has its own IRQ. The | ||
9 | GPIO controller only supports edge, not level, triggering of interrupts. | ||
10 | |||
11 | Required properties | ||
12 | ------------------- | ||
13 | |||
14 | - compatible: "brcm,bcm11351-gpio", "brcm,kona-gpio" | ||
15 | - reg: Physical base address and length of the controller's registers. | ||
16 | - interrupts: The interrupt outputs from the controller. There is one GPIO | ||
17 | interrupt per GPIO bank. The number of interrupts listed depends on the | ||
18 | number of GPIO banks on the SoC. The interrupts must be ordered by bank, | ||
19 | starting with bank 0. There is always a 1:1 mapping between banks and | ||
20 | IRQs. | ||
21 | - #gpio-cells: Should be <2>. The first cell is the pin number, the second | ||
22 | cell is used to specify optional parameters: | ||
23 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | ||
24 | See also "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt. | ||
25 | - #interrupt-cells: Should be <2>. The first cell is the GPIO number. The | ||
26 | second cell is used to specify flags. The following subset of flags is | ||
27 | supported: | ||
28 | - trigger type (bits[1:0]): | ||
29 | 1 = low-to-high edge triggered. | ||
30 | 2 = high-to-low edge triggered. | ||
31 | 3 = low-to-high or high-to-low edge triggered | ||
32 | Valid values are 1, 2, 3 | ||
33 | See also .../devicetree/bindings/interrupt-controller/interrupts.txt. | ||
34 | - gpio-controller: Marks the device node as a GPIO controller. | ||
35 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
36 | |||
37 | Example: | ||
38 | gpio: gpio@35003000 { | ||
39 | compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio"; | ||
40 | reg = <0x35003000 0x800>; | ||
41 | interrupts = | ||
42 | <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH | ||
43 | GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH | ||
44 | GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH | ||
45 | GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH | ||
46 | GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH | ||
47 | GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; | ||
48 | #gpio-cells = <2>; | ||
49 | #interrupt-cells = <2>; | ||
50 | gpio-controller; | ||
51 | interrupt-controller; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt b/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt new file mode 100644 index 000000000000..d63194a2c848 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt | |||
@@ -0,0 +1,71 @@ | |||
1 | * PCF857x-compatible I/O expanders | ||
2 | |||
3 | The PCF857x-compatible chips have "quasi-bidirectional" I/O lines that can be | ||
4 | driven high by a pull-up current source or driven low to ground. This combines | ||
5 | the direction and output level into a single bit per line, which can't be read | ||
6 | back. We can't actually know at initialization time whether a line is configured | ||
7 | (a) as output and driving the signal low/high, or (b) as input and reporting a | ||
8 | low/high value, without knowing the last value written since the chip came out | ||
9 | of reset (if any). The only reliable solution for setting up line direction is | ||
10 | thus to do it explicitly. | ||
11 | |||
12 | Required Properties: | ||
13 | |||
14 | - compatible: should be one of the following. | ||
15 | - "maxim,max7328": For the Maxim MAX7378 | ||
16 | - "maxim,max7329": For the Maxim MAX7329 | ||
17 | - "nxp,pca8574": For the NXP PCA8574 | ||
18 | - "nxp,pca8575": For the NXP PCA8575 | ||
19 | - "nxp,pca9670": For the NXP PCA9670 | ||
20 | - "nxp,pca9671": For the NXP PCA9671 | ||
21 | - "nxp,pca9672": For the NXP PCA9672 | ||
22 | - "nxp,pca9673": For the NXP PCA9673 | ||
23 | - "nxp,pca9674": For the NXP PCA9674 | ||
24 | - "nxp,pca9675": For the NXP PCA9675 | ||
25 | - "nxp,pcf8574": For the NXP PCF8574 | ||
26 | - "nxp,pcf8574a": For the NXP PCF8574A | ||
27 | - "nxp,pcf8575": For the NXP PCF8575 | ||
28 | - "ti,tca9554": For the TI TCA9554 | ||
29 | |||
30 | - reg: I2C slave address. | ||
31 | |||
32 | - gpio-controller: Marks the device node as a gpio controller. | ||
33 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the second | ||
34 | cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the | ||
35 | GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. | ||
36 | |||
37 | Optional Properties: | ||
38 | |||
39 | - lines-initial-states: Bitmask that specifies the initial state of each | ||
40 | line. When a bit is set to zero, the corresponding line will be initialized to | ||
41 | the input (pulled-up) state. When the bit is set to one, the line will be | ||
42 | initialized the the low-level output state. If the property is not specified | ||
43 | all lines will be initialized to the input state. | ||
44 | |||
45 | The I/O expander can detect input state changes, and thus optionally act as | ||
46 | an interrupt controller. When the expander interrupt line is connected all the | ||
47 | following properties must be set. For more information please see the | ||
48 | interrupt controller device tree bindings documentation available at | ||
49 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. | ||
50 | |||
51 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
52 | - #interrupt-cells: Number of cells to encode an interrupt source, shall be 2. | ||
53 | - interrupt-parent: phandle of the parent interrupt controller. | ||
54 | - interrupts: Interrupt specifier for the controllers interrupt. | ||
55 | |||
56 | |||
57 | Please refer to gpio.txt in this directory for details of the common GPIO | ||
58 | bindings used by client devices. | ||
59 | |||
60 | Example: PCF8575 I/O expander node | ||
61 | |||
62 | pcf8575: gpio@20 { | ||
63 | compatible = "nxp,pcf8575"; | ||
64 | reg = <0x20>; | ||
65 | interrupt-parent = <&irqpin2>; | ||
66 | interrupts = <3 0>; | ||
67 | gpio-controller; | ||
68 | #gpio-cells = <2>; | ||
69 | interrupt-controller; | ||
70 | #interrupt-cells = <2>; | ||
71 | }; | ||