Modify device tree for gpio button keys
I'am a newbbie on STM32MP1 and linux embedded.
I want to use available pins on STM32MP1-DK2 to as buttons input. I want to use CN14 connector pin (1 to 4) as buttons inputs.
I've modified the stm32mp157c-dk2.dts adding these lines:
buttonkeys {
compatible= "gpio-keys";
left-key {
label = "Left key";
gpios = <&gpioe 7 GPIO_ACTIVE_LOW>;
linux,code = <105>; // KEY_LEFT
};
right-key {
label = "Right key";
gpios = <&gpiod 4 GPIO_ACTIVE_LOW>;
linux,code = <106>; // KEY_RIGHT
};
down-key {
label = "Down key";
gpios = <&gpioe 8 GPIO_ACTIVE_LOW>;
linux,code = <108>; // KEY_DOWN
};
up-key {
label = "Up key";
gpios = <&gpioe 1 GPIO_ACTIVE_LOW>;
linux,code = <103>; // KEY_UP
};
};
If I declare only the left and down keys (GPIOE7 and GPIOE8) the button keys work fine (running evtest the gpio-keys device is shows and the detection of inputs status work fine ).
If I add other inputs, or use only one of other inputs (except GPIOE7 or GPIOE8) the evtest not shows any device (except the default touch screen and pmic-powerkey).
Are the device tree defined correctly for my purpose? Why enabling other inputs stop also working input?
