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 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.
-
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).
-
Check Pin Control Settings: Ensure the
pinctrl_gpio
fragment correctly maps these pins to GPIO functionality. Verify thefsl,pins
settings against the hardware documentation. -
Review GPIO-Hog Configuration: Your
gpio-hog
settings seem correct, setting the pins to output low. Ensure thestatus
is “okay” and thegpios
property uses the correct GPIO controller and pin numbers. -
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.
- Compile with:
-
Load the Overlay: Ensure your overlay loads at boot by adding it to the
overlays.txt
file or using the appropriate bootloader commands. -
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: