1*c66ec88fSEmmanuel Vadot* Oxford Semiconductor OXNAS SoC GPIO Controller 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotPlease refer to gpio.txt for generic information regarding GPIO bindings. 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel VadotRequired properties: 6*c66ec88fSEmmanuel Vadot - compatible: "oxsemi,ox810se-gpio" or "oxsemi,ox820-gpio" 7*c66ec88fSEmmanuel Vadot - reg: Base address and length for the device. 8*c66ec88fSEmmanuel Vadot - interrupts: The port interrupt shared by all pins. 9*c66ec88fSEmmanuel Vadot - gpio-controller: Marks the port as GPIO controller. 10*c66ec88fSEmmanuel Vadot - #gpio-cells: Two. The first cell is the pin number and 11*c66ec88fSEmmanuel Vadot the second cell is used to specify the gpio polarity as defined in 12*c66ec88fSEmmanuel Vadot defined in <dt-bindings/gpio/gpio.h>: 13*c66ec88fSEmmanuel Vadot 0 = GPIO_ACTIVE_HIGH 14*c66ec88fSEmmanuel Vadot 1 = GPIO_ACTIVE_LOW 15*c66ec88fSEmmanuel Vadot - interrupt-controller: Marks the device node as an interrupt controller. 16*c66ec88fSEmmanuel Vadot - #interrupt-cells: Two. The first cell is the GPIO number and second cell 17*c66ec88fSEmmanuel Vadot is used to specify the trigger type as defined in 18*c66ec88fSEmmanuel Vadot <dt-bindings/interrupt-controller/irq.h>: 19*c66ec88fSEmmanuel Vadot IRQ_TYPE_EDGE_RISING 20*c66ec88fSEmmanuel Vadot IRQ_TYPE_EDGE_FALLING 21*c66ec88fSEmmanuel Vadot IRQ_TYPE_EDGE_BOTH 22*c66ec88fSEmmanuel Vadot - gpio-ranges: Interaction with the PINCTRL subsystem, it also specifies the 23*c66ec88fSEmmanuel Vadot gpio base and count, should be in the format of numeric-gpio-range as 24*c66ec88fSEmmanuel Vadot specified in the gpio.txt file. 25*c66ec88fSEmmanuel Vadot 26*c66ec88fSEmmanuel VadotExample: 27*c66ec88fSEmmanuel Vadot 28*c66ec88fSEmmanuel Vadotgpio0: gpio@0 { 29*c66ec88fSEmmanuel Vadot compatible = "oxsemi,ox810se-gpio"; 30*c66ec88fSEmmanuel Vadot reg = <0x000000 0x100000>; 31*c66ec88fSEmmanuel Vadot interrupts = <21>; 32*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 33*c66ec88fSEmmanuel Vadot gpio-controller; 34*c66ec88fSEmmanuel Vadot interrupt-controller; 35*c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 36*c66ec88fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 32>; 37*c66ec88fSEmmanuel Vadot}; 38*c66ec88fSEmmanuel Vadot 39*c66ec88fSEmmanuel Vadotkeys { 40*c66ec88fSEmmanuel Vadot ... 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot button-esc { 43*c66ec88fSEmmanuel Vadot label = "ESC"; 44*c66ec88fSEmmanuel Vadot linux,code = <1>; 45*c66ec88fSEmmanuel Vadot gpios = <&gpio0 12 0>; 46*c66ec88fSEmmanuel Vadot }; 47*c66ec88fSEmmanuel Vadot}; 48