Gpio state during boot sequence

We are testing with gpio 56 on the Colibri evaluation board 3.2. At u-boot we measure a voltage of 1.5v. While booting the Linux kernel the voltage rises to 3.3v for a short period of time. Later while booting Linux the voltage drops to 0v. Is it possible for us to define the behaviour of the gpio state during the startup of the module?

We must ensure that the gpio never reaches the high (3.3v) state while not being used by sysfs.

What pin do you mean with gpio 56?
SODIMM 56 or gpio 56 as used in the kernel’s gpio numbering?

The generic answer to this is as follows:

The i.MX 6 during reset configures it’s pins to the reset setting of the IOMUXC_SW_MUX_CTL_PAD_xxxxx and IOMUXC_SW_PAD_CTL_PAD_xxxxx reset settings.

U-Boot then configures some of the pins to what it needs in colibri_imx.c which is one of the earliest places you can influence a pin state in SW.

Wenn Linux starts the pins are configured as set in the device tree. Later on when the driver which claims a pin takes control of the pin.

So in your case it looks like the pin defaults to input with a pullup or pulldown. The external HW seems the have a pulldown or pullup of similar resistance pulling in the opposite direction resulting in the 1.5V.

Then when the kernel boots the device tree and possibly a driver changes the pin’s muxing and state.


You will likely have to alter the device tree in a way that muxes the pin to gpio with pulldown plus makes sure that the pin is not assigned to any driver.

If you need to control the pin as early as possible you would set the pin also in U-Boot, a setting which would be in effect from the start of U-Boot until the kernel changes the pinmuxing as set in the device tree.