Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
Thank you for reaching out with your question about configuring GPIO3_IO16 and GPIO3_IO22 on the Verdin iMX8M Plus. It seems like the device tree configuration might be affecting the functionality of these GPIO pins.
To resolve this, you can follow these steps to modify the device tree and set the pins as general-purpose inputs:
-
Identify the Device Tree Files: Locate the device tree source files, such as
imx8mp-verdin.dtsi
, where the pin configurations are defined. -
Review and Modify Pinctrl Settings:
- For GPIO3_IO16 (SODIMM_64), check the
pinctrl_flexspi0
node. Ensure this pin is not configured for any peripheral function. You may need to comment out or remove the line that assigns it a peripheral function. - For GPIO3_IO22 (SODIMM_32), examine the
pinctrl_sai1
node. Make sure it is not set for SAI1 or any other peripheral. Again, comment out or remove the relevant line.
- For GPIO3_IO16 (SODIMM_64), check the
-
Configure Pins as GPIO: Add or adjust entries in the device tree to set these pins as GPIOs. This involves setting the function to GPIO and configuring any necessary pin properties, such as pull-up or pull-down resistors.
-
Recompile the Device Tree: After making your changes, recompile the device tree and deploy it to your Verdin iMX8M Plus module.
-
Test the Configuration: Use tools like
libgpiod
to test the GPIO functionality. Commands likegpioget
can help verify that the pin state changes with applied voltage.
By following these steps, you should be able to configure GPIO3_IO16 and GPIO3_IO22 as general-purpose inputs. If you encounter further issues, double-check your device tree modifications for any conflicting settings.
I hope this helps! If you have any more questions, feel free to ask.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem: