Merge tag 'tegra-for-4.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
[cascardo/linux.git] / Documentation / devicetree / bindings / input / pxa27x-keypad.txt
1 * Marvell PXA Keypad controller
2
3 Required Properties
4 - compatible : should be "marvell,pxa27x-keypad"
5 - reg : Address and length of the register set for the device
6 - interrupts : The interrupt for the keypad controller
7 - marvell,debounce-interval : How long time the key will be
8   recognized when it is pressed. It is a u32 value, and bit[31:16]
9   is debounce interval for direct key and bit[15:0] is debounce
10   interval for matrix key. The value is in binary number of 2ms
11
12 Optional Properties For Matrix Keyes
13 Please refer to matrix-keymap.txt
14
15 Optional Properties for Direct Keyes
16 - marvell,direct-key-count : How many direct keyes are used.
17 - marvell,direct-key-mask : The mask indicates which keyes
18   are used. If bit[X] of the mask is set, the direct key X
19   is used.
20 - marvell,direct-key-low-active : Direct key status register
21   tells the level of pins that connects to the direct keyes.
22   When this property is set, it means that when the pin level
23   is low, the key is pressed(active).
24 - marvell,direct-key-map : It is a u16 array. Each item indicates
25   the linux key-code for the direct key.
26
27 Optional Properties For Rotary
28 - marvell,rotary0 : It is a u32 value. Bit[31:16] is the
29   linux key-code for rotary up. Bit[15:0] is the linux key-code
30   for rotary down. It is for rotary 0.
31 - marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1.
32 - marvell,rotary-rel-key : When rotary is used for relative axes
33   in the device, the value indicates the key-code for relative
34   axes measurement in the device. It is a u32 value. Bit[31:16]
35   is for rotary 1, and Bit[15:0] is for rotary 0.
36
37 Examples:
38         keypad: keypad@d4012000 {
39                 keypad,num-rows = <3>;
40                 keypad,num-columns = <5>;
41                 linux,keymap = <0x0000000e      /* KEY_BACKSPACE */
42                                 0x0001006b      /* KEY_END */
43                                 0x00020061      /* KEY_RIGHTCTRL */
44                                 0x0003000b      /* KEY_0 */
45                                 0x00040002      /* KEY_1 */
46                                 0x0100008b      /* KEY_MENU */
47                                 0x01010066      /* KEY_HOME */
48                                 0x010200e7      /* KEY_SEND */
49                                 0x01030009      /* KEY_8 */
50                                 0x0104000a      /* KEY_9 */
51                                 0x02000160      /* KEY_OK */
52                                 0x02010003      /* KEY_2 */
53                                 0x02020004      /* KEY_3 */
54                                 0x02030005      /* KEY_4 */
55                                 0x02040006>;    /* KEY_5 */
56                 marvell,rotary0 = <0x006c0067>; /* KEY_UP & KEY_DOWN */
57                 marvell,direct-key-count = <1>;
58                 marvell,direct-key-map = <0x001c>;
59                 marvell,debounce-interval = <0x001e001e>;
60         };