Hi,
I am trying to add gpio-matrix keypad to iMX6 UItraLite device tree, but there is no response when I press the keypad, it looks that keypad scanning function is not working. Below is the matrix keypad device tree:
matrix_keypad: matrix_keypad@0 {
status = "okay";
compatible = "gpio-matrix-keypad";
wakeup-source;
debounce-delay-ms = <5>;
col-scan-delay-us = <2>;
row-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH
&gpio1 28 GPIO_ACTIVE_HIGH
&gpio1 9 GPIO_ACTIVE_HIGH
&gpio1 29 GPIO_ACTIVE_HIGH>;
col-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH
&gpio1 1 GPIO_ACTIVE_HIGH
&gpio1 2 GPIO_ACTIVE_HIGH
&gpio1 4 GPIO_ACTIVE_HIGH>;
linux,keymap = <0x00000001 /* KEY1 */
0x01000004 /* KEY4 */
0x02000007 /* KEY7 */
0x0300000B /* KEYSTAR */
0x00010002 /* KEY2 */
0x01010005 /* KEY5 */
0x02010008 /* KEY8 */
0x0301000A /* KEY0 */
0x00020003 /* KEY3 */
0x01020006 /* KEY6 */
0x02020009 /* KEY9 */
0x0302000C /* KEYPOUND */
0x0003000D /* KEYSTART */
0x0103000E /* KEYEXIT */
0x0203000F /* Key ENTER */
0x03030010>;
};
pinctrl_keypad_row: keypad_row {
fsl,pins = <
MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1b010
MX6UL_PAD_UART4_TX_DATA__GPIO1_IO28 0x1b010
MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1b010
MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29 0x1b010
>;
}
pinctrl_keypad_col: keypad_col {
fsl,pins = <
MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01 0x110b0
MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0x110b0
MX6UL_PAD_GPIO1_IO02__GPIO1_IO02 0x110b0
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x110b0
>;
};
I configure the column pins to "out" and row pins to "in" before running evtest. I don't know if the device tree is not correct or something else is missing. Any help will be appreciated.
Thanks,
-Bruce