Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello!
Yes, you can configure the I2C2, I2C3, and I2C4 pins on the Verdin iMX8M Plus module as GPIOs when using a Mallow board. This involves modifying the device tree to change the pin multiplexing settings. Here’s how you can do it:
Understand Pin Multiplexing: Each pin on the i.MX8M Plus can serve multiple functions, such as I2C or GPIO. You’ll need to change the pin’s function from I2C to GPIO using device tree overlays.
Check Current Pin Usage: Before making changes, ensure that the pins you want to use as GPIOs are not currently in use by other peripherals. You can verify this by examining the base device tree files.
Create a Device Tree Overlay:
Use the TorizonCore Builder Tool to create a new device tree overlay file (.dts).
Define a pin control node in the overlay to set the desired pins as GPIOs. For example:
Ensure the correct hexadecimal values for the pad control register are used.
Apply the Overlay:
Build the overlay using the TorizonCore Builder Tool.
Deploy the overlay to your module by applying it via SSH.
Verify the Configuration: After applying the overlay, check that the pins are functioning as GPIOs by accessing them through the Linux GPIO interface.
By following these steps, you can successfully configure the specified I2C pins as GPIOs on your Verdin iMX8M Plus module. Make sure to handle any potential pin conflicts by disabling the current functionality of the pins in the device tree if necessary.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
Check the datasheets for Mallow and Verdin iMX8M Plus to confirm that those pins are available as GPIO (alternate function table) and in the extension header.
Remember to check if this GPIO usage conflicts with other functions as the I2C buses are commonly used on other interfaces, such as CSI camera connectors. The pinout designer tool can also help you with that.