Notes from a U-Boot display bring-up

Placeholder post. Getting a DSI panel to light up before the kernel even starts.

Machine Soul1 min read
  • u-boot
  • display
  • bring-up

A screen that lights up in the bootloader makes a device feel alive, and it makes recovery possible without a serial cable. Here is the shape of the work.

Enable video in the config

text
CONFIG_VIDEO=y
CONFIG_VIDEO_LOGO=y
CONFIG_SPLASH_SCREEN=y

Build it

bash
export CROSS_COMPILE=aarch64-linux-gnu-
make imx8mp_evk_defconfig
make -j"$(nproc)"

A panel driver skeleton

U-Boot's driver model keeps a panel driver small. The real work is in the power-up sequence.

c
#include <dm.h>
#include <panel.h>

static int example_panel_enable_backlight(struct udevice *dev)
{
	/* power up the panel, then turn on the backlight */
	return 0;
}

static const struct panel_ops example_panel_ops = {
	.enable_backlight = example_panel_enable_backlight,
};

static const struct udevice_id example_panel_ids[] = {
	{ .compatible = "example,dsi-panel" },
	{ }
};

U_BOOT_DRIVER(example_panel) = {
	.name     = "example_panel",
	.id       = UCLASS_PANEL,
	.of_match = example_panel_ids,
	.ops      = &example_panel_ops,
};

Placeholder post. Swap in the real write-up once it's ready.

Ready to sign up?

Tell us about the machine, the stack, and where it's stuck.

Start the conversation