I would like to use the SODIMM_20, SODIMM_22, SODIMM_24, and SODIMM_26 pins as GPIO. I have a Verdin iMX8MM DL 1GB WBT, which should not have the CAN bus chip onboard, making those pins available. I created an overlay to disable CAN1 as a precaution, but the pins are not recognized as GPIO.
The command /sys/class/gpio/gpiochip128/label returns 30240000 , which should be correct for GPIO5. To access pin 24, I use echo 152 > /sys/class/gpio/export . However, when I toggle the pin, I don’t see any change on the Verdin Development Board V1.1
What am I doing wrong?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To configure the SODIMM_20, SODIMM_22, SODIMM_24, and SODIMM_26 pins as GPIO on your Verdin iMX8MM DL 1GB WBT, please follow these steps:
Device Tree Overlay: Ensure your device tree overlay correctly disables the CAN1 interface and configures the desired pins as GPIO. You need to modify the pin control settings in the device tree to set these pins to GPIO mode. This involves editing the device tree source (DTS) file to include the correct pinmux settings.
Verify Pin Configuration: Double-check the pin configuration in your overlay. The pins should be set to their GPIO function in the pin control node. For example, the pin control node might look something like this:
Ensure the correct pad control settings (e.g., 0x14) are used for your application.
Recompile and Deploy: After editing the device tree, recompile it and deploy the updated overlay to your device. Make sure the overlay is applied correctly on boot.
Use libgpiod: Instead of using the deprecated sysfs interface, use the libgpiod tools to interact with GPIOs. Install libgpiod and use commands like gpiodetect, gpioinfo, and gpioset to manage GPIOs. For example, to set a GPIO high, you can use:
gpioset gpiochip0 152=1
Replace gpiochip0 and 152 with the correct chip and line numbers for your setup.
Testing: Use a multimeter or an LED to verify the logic level changes on the pins when toggled.
By following these steps, you should be able to configure and use the specified SODIMM pins as GPIO on your Verdin iMX8MM module. If issues persist, ensure that the device tree overlay is correctly applied and that there are no conflicts with other interfaces.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem: