Daniel, I don’t have access to the debug serial port. I did everything according to the tutorial, being:
Kernel Configuration
cd ~/workdir/linux-toradex
make toradex_defconfig
In make nconfig, I enabled the rotary encoder driver in the kernel, as explained above.
Then I generated the kernel (zImage) with the command:
make -j$(nproc) Image.gz 2>&1 | tee build.log
And I also generated the binaries:
make DTC_FLAGS=“-@” freescale/imx8mm-verdin-nonwifi-dahlia.dtb
make DTC_FLAGS=“-@” freescale/imx8mm-verdin-nonwifi-dev.dtb
make DTC_FLAGS=“-@” freescale/imx8mm-verdin-wifi-dahlia.dtb
make DTC_FLAGS=“-@” freescale/imx8mm-verdin-wifi-dev.dtb
Through this, the kernel image and also the .dtb binaries were generated. I did the direct replacement in the bootfs folder.
As explained earlier, before generating the .dev binaries, I edited the file: "imx8mm-verdin.dtsi and placed the code with the rotary encoder pin out.
rotary-encoder {
compatible = “rotary-encoder”;
status = “okay”;
gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>, <&gpio3 25 GPIO_ACTIVE_HIGH>;
linux,axis = <0>; /* REL_X */
rotary-encoder,encoding = “gray”;
rotary-encoder,relative-axis;
};
Did I make a mistake in the process?