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