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