I have a critical safety function that I require my device to follow at startup. Three of my GPIOs are connected to a heater that I cannot have turned on at boot. I have followed the instructions from the GPIO page on Toradex’s website. I created a patch file and applied it to my Uboot config. Here’s that patch file, 0001-Updated-Colibri-Startup.patch:
From 940d41fc2cef8b26a546afb449a0ed00c8b1d4a3 Mon Sep 17 00:00:00 2001
From: ccastillo <ccastillo@sherpa-design.com>
Date: Thu, 13 Nov 2025 14:36:22 -0800
Subject: [PATCH] Updated Colibri Startup
---
board/toradex/colibri_vf/colibri_vf.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 35920008805..bd204d3fdef 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -327,6 +327,24 @@ int board_early_init_f(void)
#ifdef CONFIG_VYBRID_GPIO
setup_iomux_gpio();
++ //See XP1-FW Pin_config.json for pinouts
++ //GPIO -> 32*chip + line
++ gpio_request(117, "SODIMM_PIN_98");
++ gpio_direction_output(117, 0)
++ gpio_request(168, "SODIMM_PIN_135");
++ gpio_direction_output(168, 0)
++ gpio_request(132, "SODIMM_PIN_133");
++ gpio_direction_output(132, 0)
++ gpio_request(33, "SODIMM_PIN_92");
++ gpio_direction_output(33, 0)
++ gpio_request(25, "SODIMM_PIN_103");
++ gpio_direction_output(25, 0)
++ gpio_request(50, "SODIMM_PIN_55");
++ gpio_direction_output(50, 0)
++ gpio_request(49, "SODIMM_PIN_63");
++ gpio_direction_output(49, 0)
++ gpio_request(22, "SODIMM_PIN_28");
++ gpio_direction_output(22, 0)
#endif
return 0;
--
2.34.1
I integrated it into my yocto build with the following recipe, u-boot-toradex_%.bbappend:
# Apply patch to uboot source
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://0001-Updated-Colibri-Startup.patch"
That gives no errors, although I’m not sure how to determine if it actually built and was integrated into my Uboot. Regardless, I tested this by starting up the board and checking the levels on the pins that I am setting low there. It seems to have no effect, as there is no change in the gpio state.
I also went through manually whilst in uboot to see if I could change the GPIO state. That also didn’t work even though I got no errors:
Colibri iMX8X # gpio status GPIO0_25
Bank GPIO0_:
GPIO0_25: input: 1 [ ]
Colibri iMX8X # gpio clear 25
gpio: pin 25 (gpio 25) value is 0
Colibri iMX8X # gpio status GPIO0_25
Bank GPIO0_:
GPIO0_25: input: 1 [ ]
This appears to show that the gpio is still configured as an input even though I should be setting it to be output with the patch file. I don’t know where that CONFIG_VYBRID_GPIO is defined, but I didn’t see it in the colibri_vf.c file anywhere. That being said, the GPIO setup is there anyways (gpio_setup_iomux()) so it must be running that if it configures the GPIO at all.
Any thoughts?