Pin behaviour before U-Boot (chip internal bootloader)

Hello everyone!

We use the colibri-imx6ull SoM with a Display connected. Also we use PWM_B and PWM_C for status LEDs. While booting, BL_ON and PWM_B switch to high, effectively turning on the Backlight and one status LED.
As a workaround I set the BL_ON and the GPIO for PWM_B to 0 in U-Boot, but they still switch to high for about half a second. It seems like this happens before U-Boot is even loaded. The result is a “flashing” Display and LED. When the Button for the special boot-mode (e.g. to load the easy installer via USB) is pressed while booting, PWM_B stays low, the display backlight still turns on.

Is it possible to flash a custom internal bootloader that does not turn on the mentioned pins?


Could you please describe how did you change BL_ON and the GPIO for PWM_B to 0 in U-Boot?
By default almost all GPIO are set to Hi-Z.
Then U-Boot Init required peripherals including PWM and display related. So if you you modify U-Boot code accordingly you can avoid “flashing”.

I just changed

- gpio_direction_output(GPIO_BL_ON, 1);
+ gpio_direction_output(GPIO_BL_ON, 0);

and to disable the PWM and

static iomux_v3_cfg_t const pwm_pads[] = {
	/* PWM<B> (multiplexed pin) */
	/* PWM<C> (multiplexed pin) */
	/* PWM<D> (multiplexed pin) */

#define GPIO_PWM_B IMX_GPIO_NR(4, 16)
#define GPIO_PWM_C IMX_GPIO_NR(2,  5)

static int setup_pwm_pins(void)
	imx_iomux_v3_setup_multiple_pads(pwm_pads, ARRAY_SIZE(pwm_pads));

	/* Set PWM<B> off */
	gpio_request(GPIO_PWM_B, "PWM<B>");
	gpio_direction_output(GPIO_PWM_B, 0);

	/* Set PWM<A> off */
	gpio_request(GPIO_PWM_C, "PWM<C>");
	gpio_direction_output(GPIO_PWM_C, 0);

	return 0;

which is exactly like it is done with BL_ON and PWM. I added a call to “setup_pwm_pins” right before “setup_lcd” is called. This solutions works, but it only sets the named pins to low, when u-boot is actually loaded. Even if i clear the flash-memory with the Easy Installer and reboot, no (visible) thing happens (no u-boot output on the serial console) but the display still turns on and PWM becomes high.

Most likely the only thing you can do is to fix your hardware. The proper way to avoid such glitches is to gate any such signal with a power good signal which has a know reset state and can be transitioned in a controlled fashion.