xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/input/samsung-keypad.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Samsung's Keypad Controller device tree bindings
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunSamsung's Keypad controller is used to interface a SoC with a matrix-type
4*4882a593Smuzhiyunkeypad device. The keypad controller supports multiple row and column lines.
5*4882a593SmuzhiyunA key can be placed at each intersection of a unique row and a unique column.
6*4882a593SmuzhiyunThe keypad controller can sense a key-press and key-release and report the
7*4882a593Smuzhiyunevent using a interrupt to the cpu.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunRequired SoC Specific Properties:
10*4882a593Smuzhiyun- compatible: should be one of the following
11*4882a593Smuzhiyun  - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
12*4882a593Smuzhiyun    controller.
13*4882a593Smuzhiyun  - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
14*4882a593Smuzhiyun    controller.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun- reg: physical base address of the controller and length of memory mapped
17*4882a593Smuzhiyun  region.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun- interrupts: The interrupt number to the cpu.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunRequired Board Specific Properties:
22*4882a593Smuzhiyun- samsung,keypad-num-rows: Number of row lines connected to the keypad
23*4882a593Smuzhiyun  controller.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun- samsung,keypad-num-columns: Number of column lines connected to the
26*4882a593Smuzhiyun  keypad controller.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- Keys represented as child nodes: Each key connected to the keypad
29*4882a593Smuzhiyun  controller is represented as a child node to the keypad controller
30*4882a593Smuzhiyun  device node and should include the following properties.
31*4882a593Smuzhiyun  - keypad,row: the row number to which the key is connected.
32*4882a593Smuzhiyun  - keypad,column: the column number to which the key is connected.
33*4882a593Smuzhiyun  - linux,code: the key-code to be reported when the key is pressed
34*4882a593Smuzhiyun    and released.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun- pinctrl-0: Should specify pin control groups used for this controller.
37*4882a593Smuzhiyun- pinctrl-names: Should contain only one value - "default".
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunOptional Properties:
40*4882a593Smuzhiyun- wakeup-source: use any event on keypad as wakeup event.
41*4882a593Smuzhiyun		 (Legacy property supported: "linux,input-wakeup")
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunOptional Properties specific to linux:
44*4882a593Smuzhiyun- linux,keypad-no-autorepeat: do no enable autorepeat feature.
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunExample:
48*4882a593Smuzhiyun	keypad@100a0000 {
49*4882a593Smuzhiyun		compatible = "samsung,s5pv210-keypad";
50*4882a593Smuzhiyun		reg = <0x100A0000 0x100>;
51*4882a593Smuzhiyun		interrupts = <173>;
52*4882a593Smuzhiyun		samsung,keypad-num-rows = <2>;
53*4882a593Smuzhiyun		samsung,keypad-num-columns = <8>;
54*4882a593Smuzhiyun		linux,input-no-autorepeat;
55*4882a593Smuzhiyun		wakeup-source;
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun		pinctrl-names = "default";
58*4882a593Smuzhiyun		pinctrl-0 = <&keypad_rows &keypad_columns>;
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun		key_1 {
61*4882a593Smuzhiyun			keypad,row = <0>;
62*4882a593Smuzhiyun			keypad,column = <3>;
63*4882a593Smuzhiyun			linux,code = <2>;
64*4882a593Smuzhiyun		};
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun		key_2 {
67*4882a593Smuzhiyun			keypad,row = <0>;
68*4882a593Smuzhiyun			keypad,column = <4>;
69*4882a593Smuzhiyun			linux,code = <3>;
70*4882a593Smuzhiyun		};
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun		key_3 {
73*4882a593Smuzhiyun			keypad,row = <0>;
74*4882a593Smuzhiyun			keypad,column = <5>;
75*4882a593Smuzhiyun			linux,code = <4>;
76*4882a593Smuzhiyun		};
77*4882a593Smuzhiyun	};
78