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