0001 * Marvell PXA Keypad controller
0002
0003 Required Properties
0004 - compatible : should be "marvell,pxa27x-keypad"
0005 - reg : Address and length of the register set for the device
0006 - interrupts : The interrupt for the keypad controller
0007 - marvell,debounce-interval : How long time the key will be
0008 recognized when it is pressed. It is a u32 value, and bit[31:16]
0009 is debounce interval for direct key and bit[15:0] is debounce
0010 interval for matrix key. The value is in binary number of 2ms
0011
0012 Optional Properties For Matrix Keyes
0013 Please refer to matrix-keymap.txt
0014
0015 Optional Properties for Direct Keyes
0016 - marvell,direct-key-count : How many direct keyes are used.
0017 - marvell,direct-key-mask : The mask indicates which keyes
0018 are used. If bit[X] of the mask is set, the direct key X
0019 is used.
0020 - marvell,direct-key-low-active : Direct key status register
0021 tells the level of pins that connects to the direct keyes.
0022 When this property is set, it means that when the pin level
0023 is low, the key is pressed(active).
0024 - marvell,direct-key-map : It is a u16 array. Each item indicates
0025 the linux key-code for the direct key.
0026
0027 Optional Properties For Rotary
0028 - marvell,rotary0 : It is a u32 value. Bit[31:16] is the
0029 linux key-code for rotary up. Bit[15:0] is the linux key-code
0030 for rotary down. It is for rotary 0.
0031 - marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1.
0032 - marvell,rotary-rel-key : When rotary is used for relative axes
0033 in the device, the value indicates the key-code for relative
0034 axes measurement in the device. It is a u32 value. Bit[31:16]
0035 is for rotary 1, and Bit[15:0] is for rotary 0.
0036
0037 Examples:
0038 keypad: keypad@d4012000 {
0039 keypad,num-rows = <3>;
0040 keypad,num-columns = <5>;
0041 linux,keymap = <0x0000000e /* KEY_BACKSPACE */
0042 0x0001006b /* KEY_END */
0043 0x00020061 /* KEY_RIGHTCTRL */
0044 0x0003000b /* KEY_0 */
0045 0x00040002 /* KEY_1 */
0046 0x0100008b /* KEY_MENU */
0047 0x01010066 /* KEY_HOME */
0048 0x010200e7 /* KEY_SEND */
0049 0x01030009 /* KEY_8 */
0050 0x0104000a /* KEY_9 */
0051 0x02000160 /* KEY_OK */
0052 0x02010003 /* KEY_2 */
0053 0x02020004 /* KEY_3 */
0054 0x02030005 /* KEY_4 */
0055 0x02040006>; /* KEY_5 */
0056 marvell,rotary0 = <0x006c0067>; /* KEY_UP & KEY_DOWN */
0057 marvell,direct-key-count = <1>;
0058 marvell,direct-key-map = <0x001c>;
0059 marvell,debounce-interval = <0x001e001e>;
0060 };