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