Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Based on the information provided, it seems like you’ve taken the correct steps to enable the rotary encoder driver and apply the device tree overlay. However, the driver is not being loaded, and the device is not appearing in /dev
. Here are a few steps to troubleshoot and resolve the issue:
-
Verify Device Tree Overlay:
Ensure that your device tree overlay is correctly written and applied. Here is an example of what a typical rotary encoder device tree overlay might look like:/dts-v1/; /plugin/; / { compatible = "toradex,colibri-imx7-emmc"; }; &ecspi1 { status = "okay"; }; &gpio1 { rotary_encoder { compatible = "rotary-encoder"; gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, <&gpio1 3 GPIO_ACTIVE_HIGH>; linux,axis = <0>; }; };
Make sure the GPIO pins (SODIMM_100 and SODIMM_102) are correctly mapped in the device tree.
-
Check Kernel Logs:
Check the kernel logs for any errors or messages related to the rotary encoder driver. You can use thedmesg
command to view the kernel logs:dmesg | grep rotary
This might give you some clues if there are any issues with loading the driver.
-
Verify GPIO Configuration:
Ensure that the GPIO pins you are using for the rotary encoder are not being used by any other peripheral or function. You can check the pin configuration using thepinmux
settings in the device tree. -
Manually Load the Driver:
Try manually loading the rotary encoder driver using themodprobe
command:modprobe rotary_encoder
After running this command, check if the driver is loaded using
lsmod
and if the device appears in/dev
. -
Check for Missing Dependencies:
Ensure that all necessary dependencies for the rotary encoder driver are included in your kernel configuration. Sometimes, additional modules or configurations might be required. -
Rebuild and Reapply the Overlay:
If you made any changes to the device tree overlay, make sure to recompile and reapply it:dtc -I dts -O dtb -o colibri-imx7_rotary_encoder_overlay.dtbo colibri-imx7_rotary_encoder_overlay.dts cp colibri-imx7_rotary_encoder_overlay.dtbo /boot/overlays/
Then reboot the system to apply the changes.
If you have followed all these steps and the issue persists, there might be a deeper issue with the driver or the device tree configuration. In such cases, it might be helpful to consult the Toradex community or support for further assistance.
Please, also check if these links can help you solve your problem: