| 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 |
- interrupts: Interrupt specifier for the controllers interrupt. |
| 7 |
- #gpio-cells: Should be 2. The first cell is the GPIO number and the |
| 8 |
second cell is used to specify optional parameters: |
| 9 |
- bit 0: polarity (0: normal, 1: inverted) |
| 10 |
- gpio-controller: Marks the device as a GPIO controller |
| 11 |
- nr-gpios: The number of pins supported by the controller. |
| 12 |
|
| 13 |
The GPIO expander can optionally be used as an interrupt controller, in |
| 14 |
which case it uses the default two cell specifier as described in |
| 15 |
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. |
| 16 |
|
| 17 |
Example: |
| 18 |
|
| 19 |
gpioext: gpio-controller@41 { |
| 20 |
compatible = "ad,gpio-adnp"; |
| 21 |
reg = <0x41>; |
| 22 |
|
| 23 |
interrupt-parent = <&gpio>; |
| 24 |
interrupts = <160 1>; |
| 25 |
|
| 26 |
gpio-controller; |
| 27 |
#gpio-cells = <2>; |
| 28 |
|
| 29 |
interrupt-controller; |
| 30 |
#interrupt-cells = <2>; |
| 31 |
|
| 32 |
nr-gpios = <64>; |
| 33 |
}; |