Home/Support/Support Forum/using gpio-keys on ccimx8x-sbc-pro
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

using gpio-keys on ccimx8x-sbc-pro

0 votes
Hi guys,
I'm trying to get some keyboard events on my ccimx8x-sbc-pro, by using gpio.
I wish I have linux event <59> (corresponding to F1 touche) when I set GPIO05_IO09 to the ground.

To achieve this, i've added the following lines in ccimx8x-wb.dtsi, right after reg_rf_bt_en: regulator-som@6 propertie :


gpio-keys {
compatible = "gpio-keys";
autorepeat;
status = "okay";

f1 {
label = "F1Key";
linux,code = <59>;
gpios = <&gpio5 9 0>;
};
};

when I use my newly compiled dtb, I can't see the gpio-key propertie ...
1) I have set CONFIG_KEYBOARD_GPIO=y kernel option
2) I've tried to commment / uncomment SC_P_ENET0_REFCLK_125M_25M_LSIO_GPIO5_IO09 line in pinctrl_expansion: expansiongrp

Can anyone tell me what I'm missing ?

regards
asked Sep 22, 2020 in Linux by limaongle New to the Community (1 point)
do sysinfo and it will generate a file, download it to a PC and extract. Do you see CONFIG_KEYBOARD_GPIO=y
There?
I was loading the wrong dtb file in uboot...
someting, the env 'fdt_file' seems to be erased and I still don't know why.


In the end, I've been able to catch gpio-keys and I how my question helps anyone who is looking to achive the same !
Hi,
it was the 1st indication I gave in my question :
1) I have set CONFIG_KEYBOARD_GPIO=y kernel option

And I can confirm that sysinfo is OK with that.
yes, just wanted to make sure your changes are making it in to the final image. So you are all set now?
yes I am !
thanks for your support

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
solved by the customer
answered Sep 24, 2020 by LeonidM Veteran of the Digi Community (4,359 points)
...