BayLibre contributions to U-Boot v2026.04

U-Boot v2026.04 was released on April 6, 2026.

MediaTek Clock Driver

David Lechner overhauled the MediaTek clock driver infrastructure in this release.

The first area of work was safety. David added size fields to the core clock data structures. These enable bounds checking on array accesses that currently occur without any range validation. He also added driver-specific of_xlate ops that return -EINVAL when zero args are passed and -ENOENT when the requested ID is out of range, catching out-of-bounds accesses before they reach the clock data arrays. The ops also perform the id_offs_map translation once at of_xlate time and store the mapped ID in clk->id, removing the need to call mtk_clk_get_id() repeatedly later.

Structural cleanup addressed several confusing patterns. The struct mtk_clk_tree.gates_offs field was used in two different contexts depending on whether it referred to the tree’s own gates or a struct mtk_cg_priv‘s gates. David added a dedicated gates_offs field to struct mtk_cg_priv to eliminate the ambiguity. The CLOCK_PARENT_* macro aliases of CLOCK_* were removed, and infrasys functions were reorganized into a coherent group.

On MT8365 specifically, David fixed missing and out-of-order clock entries. Since clocks are looked up by index, any gap or transposition causes the wrong clock to be used. Missing topckgen IDs and incorrect clock parents were also corrected.

The MT8365 topckgen-cg driver was removed. It had been rejected upstream in Linux because it created a separate clock controller in the same address space as the existing topckgen controller. David added gate support directly to topckgen drivers, split struct mtk_clk_tree for MT8365 into three separate structures for apmixedsys, topckgen, and infracfg, and removed the now-unnecessary topckgen-cg driver and its associated Devicetree node. He also implemented dump callbacks for MediaTek clocks to allow inspection of the full clock tree, which is useful for debugging given the hundreds of clocks present on these SoCs.

MediaTek Pinctrl

Vitor Sato Eschholz added the pinctrl driver for the MT8365 SoC and added pinmux_property_set ops support to the MediaTek pinctrl framework.

David Lechner extended the common MediaTek pinctrl driver with support for the mediatek,pctl-regmap Devicetree property. In upstream Linux devicetrees, some pinctrl nodes sit in the interrupt controller address space rather than the pinctrl register space, and a mediatek,pctl-regmap phandle points to the actual pinctrl registers through a syscon node.

Two bugs in the pinctrl driver were fixed. The PUPD/R1/R0 registers cover only a small subset of pins, so mtk_pinconf_bias_set_pupd_r1_r0() normally returns an error for most pins. The error was being propagated up, causing the configuration loop to exit early and leaving some pins in a group unconfigured. David also added PUPD register definitions for MT8365 and fixed the array size for reg_cals.

MediaTek Platform Support

Julien Masson added support for the MediaTek MT8188 SoC. He added basic SoC support including watchdog and tphy support via upstream compatible strings, and a clock driver based on the Linux clk-mt8188-* drivers. He then added MT8390 EVK board support with boot, UART, watchdog, and MMC enabled. MT8390 is based on MT8188.

David Lechner switched the MT8365 EVK to CONFIG_OF_UPSTREAM=y and removed the U-Boot copy of the MT8365 Devicetree source files. In the mtk-sd MMC driver, he replaced separate mask and shift macro definitions with GENMASK and FIELD_GET/FIELD_PREP macros.

Driver Model

Markus Schneider-Pargmann extended the driver model core to allow multiple drivers to match the same compatible string. Previously, when the first matching driver returned -ENODEV, the next compatible string in the device’s list was tried instead of continuing to the next driver with the same compatible. This change moves the iteration so that -ENODEV advances to the next driver rather than the next compatible. A test was added to verify the behavior.

This is required for ti-musb-host and ti-musb-peripheral, which both match the same compatible but differ based on the dr_mode DT property. Each driver checks dr_mode in its bind function and returns -ENODEV if it does not match, allowing the other driver to bind instead.

TI AM335x Video and Display

Markus Schneider-Pargmann added OF graph support to the TI AM335x LCDC driver, enabling panel configuration through the standard OF graph binding rather than requiring board-specific code.

He added a get_modes() operation to the panel uclass. Linux’s simple_panel driver exposes panel timings through get_modes() returning a list of drm_display_mode structs. Markus added a compatible path in U-Boot where get_display_timing() calls either get_display_timing() or get_modes() depending on which panel operation is available. He then added the tfc_s9700rtwv43tr_01b panel with hardcoded timing data using this new infrastructure, and added a simple_panel_drv_data struct to hold a display_timing pointer for panels that are ported from Linux’s simple_panel driver.

For clock support, Markus split the common omap2plus clock functions into a new Kconfig symbol so drivers that need them can select it explicitly, and added a separate CLK_TI_OMAP4_CM Kconfig symbol for the omap4-cm driver. He added a ti-omap-prm power domain stub driver to allow upstream DT to use simple-pm-bus on am33xx, where all power domains are enabled at boot but a probe-capable driver is required. He also made clocks optional in simple-pm-bus to match the binding, which only requires either power domains or clocks, not both.

Android Boot

Guillaume La Roque added bootconfig support for Android vendor boot image version 4, where bootconfig is mandatory. In android_image_get_ramdisk(), after copying both vendor and boot ramdisks, androidboot.* entries are extracted from the kernel command line and written to the bootconfig section. The ramdisk and bootconfig sizes are then updated and the androidboot.* entries are stripped from the kernel command line.

He also added an abootimg get ramdisk command for retrieving ramdisk address and size from Android boot images version 3 and later, which combine vendor ramdisk, boot ramdisk, and bootconfig sections into a single ramdisk. A sandbox memory mapping fix was also included, converting header pointers to physical addresses with map_to_sysmem() in parse_hdr functions and adding map_sysmem()/unmap_sysmem() calls in android_image_get_data().

Video Display and Regulator

Julien Stephan added a read_edid command that retrieves EDID data from a connected display using the read_edid callback from the DISPLAY driver uclass, rather than going through raw I2C as i2c edid does. He also refactored display_read_timing() to reuse display_read_edid(), which had been made unreachable since commit 2dcf143398ad when the display uclass was reorganized.

In the common regulator driver, Julien fixed a compilation failure when CONFIG_DM_GPIO is not enabled. The enable GPIO is optional, so GPIO calls are now conditionally skipped. He also replaced a manual GPIO validity check with dm_gpio_is_valid() and removed an unnecessary debug trace.

Build and Test Infrastructure

David Lechner fixed out-of-tree builds where scripts/Makefile.autoconf was using the relative $(srctree) path (..) when creating a symlink for include/asm/arch, resulting in a broken symlink when the build tree is not adjacent to the source tree. The fix uses $(abs_srctree) instead.

He added a requirements.txt for pylibfdt specifying setuptools>=78.1.1, following the per-tool requirements pattern. He also fixed test.py to check whether the ubconfig file exists before trying to use it, and corrected a spelling error in the source_dir docstring.

Julien Stephan removed the now-unused ufs_post_bind() declaration from include/ufs.h and cleaned up the corresponding includes from drivers that included <ufs.h> solely for that prototype.

Summary

Type Count
Authored 72
Signed-off-by 12
Reviewed-by 2
Tested-by 1