Auto-configuration of displays for i.MX6 using a U-Boot script

Published on October 4, 2012

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

In the earlier blog post describing the new display support in U-Boot we described how U-Boot can natively access displays connected to a SABRE Lite or Nitrogen6X board.

We've got you covered though (at least for our current Linux kernels).

As we discussed in a prior post, those kernels expect to be passed a set of one or more video= clauses in their kernel command-line (bootargs variable under U-Boot).

Before getting into the details, check out the result:



The video shows a sequence of three active displays followed by a sequence of two active displays, followed by a single display. The primary display is HDMI in the first boot, LVDS in the second boot, and RGB in the third. This sequence and the precise settings are made in this boot script.

In that script, you'll see two important things that we've recently added (and modified) for inclusion into the U-Boot boot loader:

The first allows a U-Boot script to ask the question "is an HDMI monitor attached?" like so: if hdmidet ; then ... configure it in bootargs fi The second allows a script to ask if a particular I2C device is attached: if i2c probe 0x04 ; then ... touch controller on Freescale display is detected fi If you read the first post in this series, you know that this is how we detect the other three displays.

When these tools are used together, we can achieve more or less "doing the right thing" for at least a limited set of options. If you haven't experienced the power of U-Boot's command language, check out the U-Boot manual at Denx. There's a lot of power in this set of software and we encourage you to engage with and support the efforts of everyone involved.

Stay tuned. The complete sources for this version of U-Boot will be made available soon in our our GitHub repository. The patches are already making their way into the official repository through the U-Boot mailing list.