在对应的设备树添加:
keypad {
compatible = "gpio-matrix-keypad";
pinctrl-names = "default";
pinctrl-0 = <&GPIO3_A1_pin
&GPIO1_D3_pin
&GPIO1_D4_pin
&GPIO1_C7_pin
&GPIO1_D2_pin
&GPIO1_D1_pin
&GPIO1_D0_pin
&GPIO3_A2_pin>;
debounce-delay-ms = <20>;
col-scan-delay-us = <400>;
row-gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_LOW
&gpio1 RK_PC7 GPIO_ACTIVE_LOW
&gpio1 RK_PD2 GPIO_ACTIVE_LOW
&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
col-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW
&gpio1 RK_PD3 GPIO_ACTIVE_LOW
&gpio1 RK_PD1 GPIO_ACTIVE_LOW
&gp