Thierry Reding | 5e969a4 | 2012-09-18 10:57:10 +0200 | [diff] [blame] | 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 | |
Thierry Reding | 790b520 | 2012-09-19 10:57:36 +0200 | [diff] [blame] | 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 | |
Thierry Reding | 5e969a4 | 2012-09-18 10:57:10 +0200 | [diff] [blame] | 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 | }; |