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