Verdin imx8mm i2c pins repurpose

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To configure I2C pins as GPIO on the Verdin iMX8MM, you will need to follow these steps:

  1. 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.

  2. 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:

    /dts-v1/;
    /plugin/;
    
    &iomuxc {
        pinctrl_gpio: gpio {
            fsl,pins = <
                MX8MM_IOMUXC_I2C2_SCL_GPIO5_IO16 0x14
                MX8MM_IOMUXC_I2C2_SDA_GPIO5_IO17 0x14
            >;
        };
    };
    
  3. 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:

Verdin imx8mm DL 1GB wb use SODIMM_20,22,24,26 as GPIO.