^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) GPIO Driver for XRA1403 16-BIT GPIO Expander With Reset Input from EXAR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) The XRA1403 is an 16-bit GPIO expander with an SPI interface. Features available:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) - Individually programmable inputs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) - Internal pull-up resistors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) - Polarity inversion
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) - Individual interrupt enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - Rising edge and/or Falling edge interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - Input filter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Individually programmable outputs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - Output Level Control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) - Output Three-State Control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Properties
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Check documentation for SPI and GPIO controllers regarding properties needed to configure the node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - compatible = "exar,xra1403".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - reg - SPI id of the device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - gpio-controller - marks the node as gpio.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) - #gpio-cells - should be two where the first cell is the pin number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) and the second one is used for optional parameters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - reset-gpios: in case available used to control the device reset line.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) - interrupt-controller - marks the node as interrupt controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) - #interrupt-cells - should be two and represents the number of cells
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) needed to encode interrupt source.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) gpioxra0: gpio@2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) compatible = "exar,xra1403";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) reg = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) gpio-controller;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #gpio-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) interrupt-controller;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #interrupt-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) reset-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) spi-max-frequency = <1000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) };