1*4882a593Smuzhiyun* GPIO driven matrix keypad device tree bindings 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunGPIO driven matrix keypad is used to interface a SoC with a matrix keypad. 4*4882a593SmuzhiyunThe matrix keypad supports multiple row and column lines, a key can be 5*4882a593Smuzhiyunplaced at each intersection of a unique row and a unique column. The matrix 6*4882a593Smuzhiyunkeypad can sense a key-press and key-release by means of GPIO lines and 7*4882a593Smuzhiyunreport the event using GPIO interrupts to the cpu. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunRequired Properties: 10*4882a593Smuzhiyun- compatible: Should be "gpio-matrix-keypad" 11*4882a593Smuzhiyun- row-gpios: List of gpios used as row lines. The gpio specifier 12*4882a593Smuzhiyun for this property depends on the gpio controller to 13*4882a593Smuzhiyun which these row lines are connected. 14*4882a593Smuzhiyun- col-gpios: List of gpios used as column lines. The gpio specifier 15*4882a593Smuzhiyun for this property depends on the gpio controller to 16*4882a593Smuzhiyun which these column lines are connected. 17*4882a593Smuzhiyun- linux,keymap: The definition can be found at 18*4882a593Smuzhiyun bindings/input/matrix-keymap.txt 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunOptional Properties: 21*4882a593Smuzhiyun- linux,no-autorepeat: do no enable autorepeat feature. 22*4882a593Smuzhiyun- wakeup-source: use any event on keypad as wakeup event. 23*4882a593Smuzhiyun (Legacy property supported: "linux,wakeup") 24*4882a593Smuzhiyun- debounce-delay-ms: debounce interval in milliseconds 25*4882a593Smuzhiyun- col-scan-delay-us: delay, measured in microseconds, that is needed 26*4882a593Smuzhiyun before we can scan keypad after activating column gpio 27*4882a593Smuzhiyun- drive-inactive-cols: drive inactive columns during scan, 28*4882a593Smuzhiyun default is to turn inactive columns into inputs. 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunExample: 31*4882a593Smuzhiyun matrix-keypad { 32*4882a593Smuzhiyun compatible = "gpio-matrix-keypad"; 33*4882a593Smuzhiyun debounce-delay-ms = <5>; 34*4882a593Smuzhiyun col-scan-delay-us = <2>; 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun row-gpios = <&gpio2 25 0 37*4882a593Smuzhiyun &gpio2 26 0 38*4882a593Smuzhiyun &gpio2 27 0>; 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun col-gpios = <&gpio2 21 0 41*4882a593Smuzhiyun &gpio2 22 0>; 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun linux,keymap = <0x0000008B 44*4882a593Smuzhiyun 0x0100009E 45*4882a593Smuzhiyun 0x02000069 46*4882a593Smuzhiyun 0x0001006A 47*4882a593Smuzhiyun 0x0101001C 48*4882a593Smuzhiyun 0x0201006C>; 49*4882a593Smuzhiyun }; 50