AnsweredAssumed Answered

i.mx6q    keymap     dts

Question asked by black huang on Aug 29, 2019
Latest reply on Sep 11, 2019 by Rita Wang

Dear NXP fae;

            近期我在调试i.mx6q 矩阵键盘时,出现以下问题;恳请你们帮助解决一下。

系统是android6.0,dts:imx6qdl-sabresd.dtsi , 编译器:prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-

 

矩阵键盘设备树配置如下:

 

&kpp {
compatible = "fsl,imx6qdl-kpp,fsl,imx21-kpp";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_kpp>;
clocks = <&clks IMX6QDL_CLK_DUMMY>;
linux,keymap = <
MATRIX_KEY(0x0, 0x0, KEY_UP) /*ROW6,COL7*/
MATRIX_KEY(0x0, 0x1, KEY_DOWN) /*ROW6,COL6*/
MATRIX_KEY(0x0, 0x2, KEY_ENTER) /*ROW6,COL5*/
MATRIX_KEY(0x0, 0x3, KEY_HOME) /*ROW6,COL4*/
MATRIX_KEY(0x1, 0x0, KEY_RIGHT) /*ROW5,COL7*/
MATRIX_KEY(0x1, 0x1, KEY_LEFT) /*ROW5,COL6*/
MATRIX_KEY(0x1, 0x2, KEY_VOLUMEDOWN) /*ROW5,COL5*/
MATRIX_KEY(0x1, 0x3, KEY_VOLUMEUP) /*ROW5,COL4*/
>;
status = "okay";
};

 

 

pinctrl_kpp:kpp_grp{
fsl,pins = <
MX6QDL_PAD_KEY_COL4__KEY_COL4 0x80000000
MX6QDL_PAD_KEY_ROW4__KEY_ROW4 0x80000000
MX6QDL_PAD_GPIO_1__KEY_ROW5 0x80000000
MX6QDL_PAD_GPIO_19__KEY_COL5 0x80000000
MX6QDL_PAD_GPIO_2__KEY_ROW6 0x80000000
MX6QDL_PAD_GPIO_9__KEY_COL6 0x80000000
MX6QDL_PAD_GPIO_5__KEY_ROW7 0x80000000
MX6QDL_PAD_GPIO_4__KEY_COL7 0x80000000    (使用0x1b0b0 也无效  )
>;

 

项目板卡启动后已出现

 

add device 6: /dev/input/event0
name: "20b8000.kpp"

 

使用getevent -lt /dev/input/event0 无输出。之前使用android4.3时按键正常,排除硬件问题。

 

问题1:

            请问是否为设备树配置信息有问题,该如何修正?

问题2:

            在使用测试程序时发现使用如下编译器出现错误,是否还需要移植第三方交叉编译器,

arm-linux-androideabi-gcc-4.9 -o hello hello.c
In file included from hello.c:1:0:
/home/vmuser/myandroid/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x-google/include-fixed/stdio.h:50:23: fatal error: sys/cdefs.h: No such file or directory
#include <sys/cdefs.h>
^
compilation terminated.

Outcomes