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 I2C pins as GPIO on the Verdin iMX8MM, you will need to follow these steps:
Create a Device Tree Overlay: This overlay should disable the I2C interface and configure the pins for GPIO use. You can find helpful discussions and examples on the Toradex community forums.
Overlay Configuration: The overlay must:
Disable the I2C interface.
Set up the pin multiplexing (pinmux) settings.
Configure the pin control parameters.
Here is an example structure for a device tree overlay:
Using GPIO Tools: After applying the overlay, use the libgpiod tools to interact with the GPIOs, as the sysfs interface is deprecated.
The pin control register allows you to configure pull-up/down resistors, drive strength, and other settings through the IOMUXC_SW_PAD_CTL_PAD register. For specific pinmux values and configurations, refer to the i.MX 8M Mini Reference Manual, as the exact settings will depend on your specific requirements.
If you have any further questions or need clarification on these steps, feel free to ask.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
As AI mentioned there, it’s not enough to simply disable I2C—you also need to repurpose the pins previously used by I2C for GPIO functionality through proper pinmuxing.
So when I try to do this in my recipe, i dont see what i expect to see, in my overlay i even tried to disable any specific peripherals that could be referencing the bus, but nothing, heres my overlay:
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
compatible = "toradex,verdin-imx8mm";
};
&i2c2 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2_gpio>;
};
&mipi_dsi {
status = "disabled";
};
&lvds_ti_sn65dsi84 {
status = "disabled";
};
&hdmi_lontium_lt8912 {
status = "disabled";
};
&atmel_mxt_ts {
status = "disabled";
};
&panel_lvds {
status = "disabled";
};
The overlay is indeed being compiled in correctly as well, but when i use the gpioinfo tool to look at the pins i still get
line 16: "SODIMM_55" "scl" output active-high [used open-drain]
line 17: "SODIMM_53" "sda" input active-high [used open-drain]
So it seems as if theres something else going on? why are these pins not being freed up to be used as GPIO?