I am trying to get on my mallow carrier and verdin IMX8MP to have extra GPIO’s. I am needing pins 3&4 on the X19 header to be GPIO:
3 SPI_1_MOSI 200 O +1.8V SPI Master Output, Slave Input
4 SPI_1_CS 202 O +1.8V SPI Slave Select
Here is my dts file currently:
/dts-v1/;
/plugin/;
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 the fsl,pins settings against the hardware documentation.
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.
Compile and Deploy: After adjustments, recompile your device tree overlay and deploy it to your device:
Place the compiled overlay in /boot/overlays/ on your device.
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:
Hi Benedict, there is a verdin-imx8mp_spidev_overlay.dtbo loaded by default where SODIMM 200 and 202 are configured as the SPI interface. An easy way to disable it is by deleting it from overlays.txt as described here. Your custom device tree overlays could also be added.