Urgent help needed gpio device tree overlay

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 pins 3 and 4 on the X19 header of your Mallow carrier with the Verdin iMX8MP as GPIOs, let’s ensure your DTS file is correctly set up.

  1. Verify Pin Definitions: Double-check that the pin definitions in your DTS file are correct. For the Verdin iMX8MP:

    • MX8MP_IOMUXC_NAND_WP_B__GPIO3_IO18 should map to pin 3 (SPI_1_MOSI).
    • MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO07 should map to pin 4 (SPI_1_CS).
  2. Check Pin Control Settings: Ensure the pinctrl_gpio fragment correctly maps these pins to GPIO functionality. Verify the fsl,pins settings against the hardware documentation.

  3. Review GPIO-Hog Configuration: Your gpio-hog settings seem correct, setting the pins to output low. Ensure the status is “okay” and the gpios property uses the correct GPIO controller and pin numbers.

  4. Compile and Deploy: After adjustments, recompile your device tree overlay and deploy it to your device:

    • Compile with: dtc -I dts -O dtb -o <output>.dtbo <input>.dts
    • Place the compiled overlay in /boot/overlays/ on your device.
  5. Load the Overlay: Ensure your overlay loads at boot by adding it to the overlays.txt file or using the appropriate bootloader commands.

  6. Test the GPIOs: After rebooting, test the GPIOs using sysfs or libgpiod to confirm they function as expected.

If these steps do not resolve the issue, ensure there are no conflicts with other peripherals using the same pins. This should help you successfully configure the GPIOs on your setup.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Enable 10.1" LVDS display on Mallow carrier board.