Commit | Line | Data |
---|---|---|
996bd13f SP |
1 | * MAX732x-compatible I/O expanders |
2 | ||
3 | Required properties: | |
4 | - compatible: Should be one of the following: | |
5 | - "maxim,max7319": For the Maxim MAX7319 | |
6 | - "maxim,max7320": For the Maxim MAX7320 | |
7 | - "maxim,max7321": For the Maxim MAX7321 | |
8 | - "maxim,max7322": For the Maxim MAX7322 | |
9 | - "maxim,max7323": For the Maxim MAX7323 | |
10 | - "maxim,max7324": For the Maxim MAX7324 | |
11 | - "maxim,max7325": For the Maxim MAX7325 | |
12 | - "maxim,max7326": For the Maxim MAX7326 | |
13 | - "maxim,max7327": For the Maxim MAX7327 | |
14 | - reg: I2C slave address for this device. | |
15 | - gpio-controller: Marks the device node as a GPIO controller. | |
16 | - #gpio-cells: Should be 2. | |
17 | - first cell is the GPIO number | |
18 | - second cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. | |
19 | Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. | |
20 | ||
21 | Optional properties: | |
22 | ||
23 | The I/O expander can detect input state changes, and thus optionally act as | |
24 | an interrupt controller. When the expander interrupt line is connected all the | |
25 | following properties must be set. For more information please see the | |
26 | interrupt controller device tree bindings documentation available at | |
27 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. | |
28 | ||
29 | - interrupt-controller: Identifies the node as an interrupt controller. | |
30 | - #interrupt-cells: Number of cells to encode an interrupt source, shall be 2. | |
31 | - first cell is the pin number | |
32 | - second cell is used to specify flags | |
33 | - interrupt-parent: phandle of the parent interrupt controller. | |
34 | - interrupts: Interrupt specifier for the controllers interrupt. | |
35 | ||
36 | Please refer to gpio.txt in this directory for details of the common GPIO | |
37 | bindings used by client devices. | |
38 | ||
39 | Example 1. MAX7325 with interrupt support enabled (CONFIG_GPIO_MAX732X_IRQ=y): | |
40 | ||
41 | expander: max7325@6d { | |
42 | compatible = "maxim,max7325"; | |
43 | reg = <0x6d>; | |
44 | gpio-controller; | |
45 | #gpio-cells = <2>; | |
46 | interrupt-controller; | |
47 | #interrupt-cells = <2>; | |
48 | interrupt-parent = <&gpio4>; | |
49 | interrupts = <29 IRQ_TYPE_EDGE_FALLING>; | |
50 | }; | |
51 | ||
52 | Example 2. MAX7325 with interrupt support disabled (CONFIG_GPIO_MAX732X_IRQ=n): | |
53 | ||
54 | expander: max7325@6d { | |
55 | compatible = "maxim,max7325"; | |
56 | reg = <0x6d>; | |
57 | gpio-controller; | |
58 | #gpio-cells = <2>; | |
59 | }; |