xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/gpio-adnp.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotAvionic Design N-bit GPIO expander bindings
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: should be "ad,gpio-adnp"
5*c66ec88fSEmmanuel Vadot- reg: The I2C slave address for this device.
6*c66ec88fSEmmanuel Vadot- interrupts: Interrupt specifier for the controllers interrupt.
7*c66ec88fSEmmanuel Vadot- #gpio-cells: Should be 2. The first cell is the GPIO number and the
8*c66ec88fSEmmanuel Vadot  second cell is used to specify optional parameters:
9*c66ec88fSEmmanuel Vadot  - bit 0: polarity (0: normal, 1: inverted)
10*c66ec88fSEmmanuel Vadot- gpio-controller: Marks the device as a GPIO controller
11*c66ec88fSEmmanuel Vadot- nr-gpios: The number of pins supported by the controller.
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel VadotThe GPIO expander can optionally be used as an interrupt controller, in
14*c66ec88fSEmmanuel Vadotwhich case it uses the default two cell specifier as described in
15*c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/interrupt-controller/interrupts.txt.
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotExample:
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot	gpioext: gpio-controller@41 {
20*c66ec88fSEmmanuel Vadot		compatible = "ad,gpio-adnp";
21*c66ec88fSEmmanuel Vadot		reg = <0x41>;
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gpio>;
24*c66ec88fSEmmanuel Vadot		interrupts = <160 1>;
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadot		gpio-controller;
27*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot		interrupt-controller;
30*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot		nr-gpios = <64>;
33*c66ec88fSEmmanuel Vadot	};
34