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