]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 weeks agoMerge patch series "arm: aspeed: add initial AST2700 SoC support"
Tom Rini [Mon, 29 Jun 2026 19:44:52 +0000 (13:44 -0600)] 
Merge patch series "arm: aspeed: add initial AST2700 SoC support"

Ryan Chen <ryan_chen@aspeedtech.com> says:

AST2700 is the 8th generation of Integrated Remote Management
Processor introduced by ASPEED Technology Inc. It is a Board
Management Controller (BMC) SoC family with a dual-die architecture:
SoC0 ("CPU" die with four ARM Cortex-A35 application cores) and
SoC1 ("IO" die with peripherals) each SoC have its own SCU PLLs,
clock dividers and reset domains.

Link: https://lore.kernel.org/r/20260612-ast2700_clk-v4-0-9bea29cfdc39@aspeedtech.com
2 weeks agotreewide: Staticize and constify acpi ops
Marek Vasut [Fri, 12 Jun 2026 02:05:38 +0000 (04:05 +0200)] 
treewide: Staticize and constify acpi ops

Set the acpi_ops structure as static const where applicable. The
The structure is not accessible from outside of drivers and is not
going to be modified at runtime. The structure may be unused in a
couple of drivers depending on their configuration, mark those
sites with __maybe_unused .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 weeks agocros_ec: Convert dm_cros_ec_get_ops into an inline function and constify dm_cros_ec_ops
Marek Vasut [Fri, 12 Jun 2026 01:59:06 +0000 (03:59 +0200)] 
cros_ec: Convert dm_cros_ec_get_ops into an inline function and constify dm_cros_ec_ops

Convert dm_cros_ec_get_ops into an inline function to improve compiler
code coverage, and constify struct dm_cros_ec_ops in a few places.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 weeks agoenv: Avoid mixing of environment and driver prints on env load
Alexander Koch [Thu, 11 Jun 2026 22:48:34 +0000 (00:48 +0200)] 
env: Avoid mixing of environment and driver prints on env load

The current environment loading code prints a partial string
"Loading Environment from %s..." and then triggers env driver
loading function. That env driver loading function may trigger
further prints, either from the env driver itself or from any
other driver that gets probed at that time. The result is a
print which mixed environment loading code prints and driver
code prints, as follows:

"
       Environment code print        _________________________
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv                          vv
Loading Environment from SPIFlash... SF: Detected w25q128jw... OK
                                     ^^^^^^^^^^^^^^^^^^^^^^
                                        Driver code print
"

Adjust the environment loading code print such, that it places
CR at the end of the line. This way, when the driver code prints
something, it overwrites the previous "Loading Environment from %s"
output and the result is not mixed. Furthermore, in case the env
was loaded correctly, print the "Loading Environment from %s ... OK"
in full again. This either overwrites the "Loading Environment from"
message and appends the print with "OK", or, it prints the line in
full after all the driver code prints.

This is not ideal, but it is the best we can do with only CR and
without ANSI control sequences. The result looks as follows:

"
SF: Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Loading Environment from SPIFlash... OK
"

Signed-off-by: Alexander Koch <akoch@initse.com>
Signed-off-by: Marek Vasut <marex@nabladev.com>
2 weeks agortc: mcfrtc: fix leap year calculation using wrong variable
Naveen Kumar Chaudhary [Wed, 10 Jun 2026 17:08:40 +0000 (22:38 +0530)] 
rtc: mcfrtc: fix leap year calculation using wrong variable

The leap year check in rtc_set() passes the loop variable 'i' (month
index, always 1 when the condition is true) to isleap() instead of the
actual year. Since isleap(1) is always false, February 29th is never
accounted for when computing the day count, resulting in the RTC being
set one day behind for any date after February in a leap year.

Pass tmp->tm_year to isleap() so the leap day is correctly included.

Fixes: 8e585f02f82 ("Added M5329AFEE and M5329BFEE Platforms")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
2 weeks agoram: aspeed: add SDRAM controller driver for AST2700
Ryan Chen [Fri, 12 Jun 2026 09:43:13 +0000 (17:43 +0800)] 
ram: aspeed: add SDRAM controller driver for AST2700

Add a SDRAM controller driver for the AST2700, derived from the
existing AST2700 controller code used by the Ibex SPL but adapted
to run from ARM U-Boot proper on the Cortex-A35 cores.

The DDR4/DDR5 controller and its DesignWare PHY are programmed by
the Ibex SPL before ARM U-Boot proper takes over. This driver
reads back the configuration left by the SPL, probes the
controller, and exposes ram_info (base and size, with the VGA
carve-out subtracted) via UCLASS_RAM so that dram_init() can
populate gd->ram_size.

The PHY firmware-load entry points (dwc_ddrphy_phyinit_userCustom_*)
are kept compiled but call a __weak fmc_hdr_get_prebuilt() stub
when ARM U-Boot proper is the caller; the real implementation is
provided by the Ibex SPL via the same fmc_hdr.h descriptor format
(here added for the ARM build).

Adds the supporting register-layout headers under
arch/arm/include/asm/arch-aspeed/:
  - sdram.h:   SDRAM controller and DWC PHY register definitions
  - scu.h:     SCU bits referenced by the SDRAM driver
  - fmc_hdr.h: prebuilt-blob descriptor (binary-compatible with
               arch/riscv/include/asm/arch-ast2700/fmc_hdr.h used
               by the Ibex SPL)

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agoreset: ast2700: add reset driver support
Ryan Chen [Fri, 12 Jun 2026 09:43:12 +0000 (17:43 +0800)] 
reset: ast2700: add reset driver support

Add reset controller driver for the dual-die AST2700 SoC. The
controller manages module-level reset signals via the modrst
register block at offset 0x200 within each SCU.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agoclk: ast2700: add clock driver support
Ryan Chen [Fri, 12 Jun 2026 09:43:11 +0000 (17:43 +0800)] 
clk: ast2700: add clock driver support

Add clock controller driver for the dual-die AST2700 SoC. The chip
has two SCUs (SoC0/CPU at 0x12c02000, SoC1/IO at 0x14c02000), each
with its own PLLs (HPLL/APLL/DPLL/MPLL), clock dividers and clock
gate controls. This commit registers two UCLASS_CLK drivers
matching "aspeed,ast2700-scu0" and "aspeed,ast2700-scu1".

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agoarm: dts: aspeed: Add initial AST27xx SoC device tree
Ryan Chen [Fri, 12 Jun 2026 09:43:10 +0000 (17:43 +0800)] 
arm: dts: aspeed: Add initial AST27xx SoC device tree

Add initial device tree support for the ASPEED AST27xx family, the
8th-generation Baseboard Management Controller (BMC) SoCs.

AST27xx SOC Family
 - https://www.aspeedtech.com/server_ast2700/
 - https://www.aspeedtech.com/server_ast2720/
 - https://www.aspeedtech.com/server_ast2750/

The AST27xx features a dual-SoC architecture consisting of two ties,
referred to as SoC0 and SoC1 - interconnected through an internal
property bus. Both SoCs share the same address decoding scheme,
while each maintains independent clock and reset domains.

- SoC0 (CPU die): contains a dual-core Cortex-A35 cluster and two
  Cortex-M4 cores, along with high-speed peripherals.
- SoC1 (I/O die): includes the BootMCU (responsible for system
  boot) and its own clock/reset domains low-speed peripherals.

The device tree describes the SoC0 and SoC1 domains and their peripheral
layouts.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agoarm: aspeed: add ASPEED AST2700 SoC family support
Ryan Chen [Fri, 12 Jun 2026 09:43:09 +0000 (17:43 +0800)] 
arm: aspeed: add ASPEED AST2700 SoC family support

Add initial support for the ASPEED AST2700, an arm64 (Cortex-A35)
Baseboard Management Controller (BMC) SoC. AST2700 is Aspeed's 8th
generation BMC and uses a dual-die architecture: SoC0 (the "CPU"
die) hosts the four Cortex-A35 cores and its own SCU at 0x12c02000,
while SoC1 (the "IO" die) hosts the peripherals and its own SCU at
0x14c02000.

This commit adds:
  - ASPEED_AST2700 Kconfig option and the ast2700 mach subdir
    (mach Makefile, ast2700/Kconfig, board/aspeed/evb_ast2700/*)
  - arm64 MMU map covering the SoC device window and the DRAM
    region at 0x4_0000_0000 (up to 8 GiB)
  - lowlevel_init.S for early CPU bring-up
  - cpu-info: print SoC ID (AST2700/2720/2750 A0/A1/A2 variants)
    and reset cause (cold reset, EXT reset, WDT reset)
  - board_common: dram_init via UCLASS_RAM, AHBC timeout init
  - platform: env_get_location() that selects SPI/eMMC based on
    the IO-die HW strap; arch_misc_init() that exposes
    ${boot_device} and ${verify} to the boot script
  - SCU0/SCU1 register layout header (scu_ast2700.h)
  - configs/evb-ast2700_defconfig and include/configs/evb_ast2700.h
    for the AST2700 EVB board

The defconfig depends on ast2700-evb.dts, which is introduced in
a subsequent patch; this commit must be applied with the
remaining series for evb-ast2700_defconfig to build.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agospi: aspeed: add AST2700 support
Ryan Chen [Fri, 12 Jun 2026 09:43:08 +0000 (17:43 +0800)] 
spi: aspeed: add AST2700 support

AST2700 is a 64-bit SoC whose flash AHB windows are decoded above
the 32-bit address space, so rework AHB addresses to uintptr_t and
decoded window sizes to size_t.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 weeks agoMerge tag 'u-boot-imx-next-20260627' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 28 Jun 2026 14:27:59 +0000 (08:27 -0600)] 
Merge tag 'u-boot-imx-next-20260627' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI:https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/30547

- Move environment variables to .env file on imx7ul-evk/imx6ull-evk/mx6-sabre
- imx ipuv3 improvements.
- Initial support for aquila imx95
- Add support for OPTEE on i.MX93
- Allow users to inhibit i.MX trip point setup
- Add support for imx93_frdm 2CS 2GB DRAM support
- Add optee binary to i.MX9 platform types
- Enable booting Image.gz on imx8m-evk/imx9-evk

2 weeks agoimx9: Add v2x_status and ele_info commands
Ye Li [Fri, 26 Jun 2026 11:11:53 +0000 (19:11 +0800)] 
imx9: Add v2x_status and ele_info commands

Add v2x_status and ele_info commands to print useful information
for development and debug purpose.

Signed-off-by: Ye Li <ye.li@nxp.com>
2 weeks agomisc: ele_api: Add V2X Get State API
Ye Li [Fri, 26 Jun 2026 11:11:52 +0000 (19:11 +0800)] 
misc: ele_api: Add V2X Get State API

Add V2X Get State API to return V2X states for debug purpose

Signed-off-by: Ye Li <ye.li@nxp.com>
2 weeks agoimx952_evk: Correct CONFIG_DEFAULT_FDT_FILE
Peng Fan [Fri, 19 Jun 2026 16:06:08 +0000 (00:06 +0800)] 
imx952_evk: Correct CONFIG_DEFAULT_FDT_FILE

The device tree is not stored under freescale directory when booting
Linux, so drop vendor name.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx95/952/94_evk/: enable booting Image.gz
Peng Fan [Fri, 19 Jun 2026 16:06:07 +0000 (00:06 +0800)] 
imx95/952/94_evk/: enable booting Image.gz

Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx93_evk/qsb/frdm: enable booting Image.gz and avoid extra memcpy
Peng Fan [Fri, 19 Jun 2026 16:06:06 +0000 (00:06 +0800)] 
imx93_evk/qsb/frdm: enable booting Image.gz and avoid extra memcpy

Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

While at here, set ip_dyn to yes to allow dhcp work properly.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8mm/n_evk: enable booting Image.gz and avoid extra memcpy
Peng Fan [Fri, 19 Jun 2026 16:06:05 +0000 (00:06 +0800)] 
imx8mm/n_evk: enable booting Image.gz and avoid extra memcpy

Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

Set kernel_comp_addr_r to a high memory region to provide a dedicated
decompression buffer, avoiding overlap between compressed
input and decompressed output.

Also adjust CONFIG_SYS_LOAD_ADDR from 0x40480000 to 0x40400000.

With TEXT_OFFSET=0, the kernel is relocated directly to loadaddr, so
separating decompression and execution regions is required to guarantee
safe decompression without additional copying.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8mq_evk: enable booting Image.gz and avoid extra memcpy
Peng Fan [Fri, 19 Jun 2026 16:06:04 +0000 (00:06 +0800)] 
imx8mq_evk: enable booting Image.gz and avoid extra memcpy

Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

Set kernel_comp_addr_r to a high memory region to provide a dedicated
decompression buffer, avoiding overlap between compressed
input and decompressed output.

Also adjust CONFIG_SYS_LOAD_ADDR from 0x40480000 to 0x40400000.

With TEXT_OFFSET=0, the kernel is relocated directly to loadaddr, so
separating decompression and execution regions is required to guarantee
safe decompression without additional copying.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8mp_evk: enable booting Image.gz and avoid extra memcpy
Peng Fan [Fri, 19 Jun 2026 16:06:03 +0000 (00:06 +0800)] 
imx8mp_evk: enable booting Image.gz and avoid extra memcpy

Add support for booting compressed kernel Image.gz by defining
kernel_comp_addr_r and kernel_comp_size in the default environment.

Set kernel_comp_addr_r to a high memory region (0x80000000) to provide
a dedicated decompression buffer, avoiding overlap between compressed
input and decompressed output.

Also adjust CONFIG_SYS_LOAD_ADDR from 0x40480000 to 0x40600000.

With TEXT_OFFSET=0, the kernel is relocated directly to loadaddr, so
separating decompression and execution regions is required to guarantee
safe decompression without additional copying.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx: kontron-sl-mx8mm: Enable the watchdog at boot
Frieder Schrempf [Thu, 18 Jun 2026 06:13:24 +0000 (08:13 +0200)] 
imx: kontron-sl-mx8mm: Enable the watchdog at boot

We want the watchdog to be enabled at boot by default so it can
handle emergency situations in any case.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoclk: imx6q: use clk_divider_table instead of fixed factor for pll5 divs
Brian Ruley [Tue, 16 Jun 2026 12:51:41 +0000 (15:51 +0300)] 
clk: imx6q: use clk_divider_table instead of fixed factor for pll5 divs

Now that non-linear clk divider tables are supported, replace the fixed
factor implementation with the proper divider, which allows more fine
control over clock rates.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoclk: clk-divider: add clk_register_divider_table()
Brian Ruley [Tue, 16 Jun 2026 12:51:40 +0000 (15:51 +0300)] 
clk: clk-divider: add clk_register_divider_table()

The existing clk_register_divider() only supports linear or
power-of-two divider mappings. Some hardware (e.g. i.MX6 PLL5
post_div and video_div) uses non-linear register-value-to-divisor
mappings that require a lookup table.

Add clk_register_divider_table() which accepts a clk_div_table,
and reimplement clk_register_divider() as a wrapper passing
table=NULL.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agovideo: imx: ipuv3: enable ipu clk before writing registers in CCF
Brian Ruley [Tue, 16 Jun 2026 12:51:39 +0000 (15:51 +0300)] 
video: imx: ipuv3: enable ipu clk before writing registers in CCF

Obviously, the clock has to be enabled if writing to it's registers.
This was missed because the board I tested on had enabled the clocks in
early init.

Also, remove the completely useless "ipu_clk_enabled" struct member and
use the accurate usecount / enabled_count instead.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoclk: imx6q: configure ldb clock selectors
Brian Ruley [Tue, 16 Jun 2026 12:51:38 +0000 (15:51 +0300)] 
clk: imx6q: configure ldb clock selectors

A hardware bug prevents LDB clock selectors from being configured later
on non-plus i.MX6QD variants, so let's set the desired configuration in
the probe before we register them. We also have to make the necessary
clock functions available in XPL builds.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoimx6: clock: allow different clock sources for ldb
Brian Ruley [Tue, 16 Jun 2026 12:51:37 +0000 (15:51 +0300)] 
imx6: clock: allow different clock sources for ldb

The LDB clock sources don't have to be the same, so allow DI1 clock to
be configured separately.

Unlikely to be significant, but the reason will become apparent in the
following commit.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoclk: imx6q: add missing pll bypasses
Brian Ruley [Tue, 16 Jun 2026 12:51:36 +0000 (15:51 +0300)] 
clk: imx6q: add missing pll bypasses

After reset, all PLLs are bypassed by default so unbypass them so that
dependent clocks can function correctly.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoclk: imx6q: guard video clocks behind config
Brian Ruley [Tue, 16 Jun 2026 12:51:35 +0000 (15:51 +0300)] 
clk: imx6q: guard video clocks behind config

Do not touch the video clocks unless explicitly required by the
configuration. This avoids the issue of the binary size increase on SPL
builds that do not enable video. For those that do, they should increase
the size limit to fit the new code and data.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoclk: imx6q: cosmetic: keep pll definitions together
Brian Ruley [Tue, 16 Jun 2026 12:51:34 +0000 (15:51 +0300)] 
clk: imx6q: cosmetic: keep pll definitions together

Make it easier to reason about by keeping similar clocks grouped
together. While at it, fix comment spacing.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2 weeks agoimx93_frdm: Add support for 2CS 2GB DRAM support
Mathieu Dubois-Briand [Tue, 16 Jun 2026 08:04:42 +0000 (10:04 +0200)] 
imx93_frdm: Add support for 2CS 2GB DRAM support

Add 2CS 2GB DRAM configuration, as revision B2 of the i.MX93 FRDM board
is using it.

This is mostly an import of Tom Zheng work from NXP u-boot git:
https://github.com/nxp-imx/uboot-imx/commit/4c35a6086aed

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
2 weeks agoimx: fdt: Allow users to inhibit trip point setup
Marek Vasut [Sat, 13 Jun 2026 03:11:43 +0000 (05:11 +0200)] 
imx: fdt: Allow users to inhibit trip point setup

During development or various dangerous experiments, it may
be necessary to override the trip points. Allow users to do
that. However, do keep in mind that this may damage the SoC.

Signed-off-by: Marek Vasut <marex@nabladev.com>
2 weeks agoboard: toradex: add initial support for aquila imx95
Franz Schnyder [Thu, 11 Jun 2026 13:47:48 +0000 (15:47 +0200)] 
board: toradex: add initial support for aquila imx95

Add initial U-Boot support for Aquila iMX95 SoM.

Link: https://www.toradex.com/computer-on-modules/aquila-arm-family/nxp-imx95
Link: https://www.toradex.com/products/carrier-board/aquila-development-board-kit
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 weeks agoimx93: Add support for OPTEE
Krzysztof Drobiński [Wed, 10 Jun 2026 14:17:10 +0000 (16:17 +0200)] 
imx93: Add support for OPTEE

OPTEE-OS starts correctly when "opteed" is enabled for Secure Payload
Dispatcher in TF-A (tested on OP-TEE version: 4.9.0), however imx93
devices require a patch for OPTEE targets because binman does not see
the tee.bin file when it is available.

Enable conditional OPTEE support for imx93 devices.

Signed-off-by: Krzysztof Drobiński <krzysztof@kd-solutions.pl>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
2 weeks agobinman: Add optee binary to i.MX9 platform types
Mathieu Dubois-Briand [Wed, 10 Jun 2026 14:17:09 +0000 (16:17 +0200)] 
binman: Add optee binary to i.MX9 platform types

OP-TEE tee.bin is generated externally and might be missing during the
build.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
2 weeks agomx6sabre: Move environment variables to .env files
Aristo Chen [Wed, 10 Jun 2026 13:24:24 +0000 (13:24 +0000)] 
mx6sabre: Move environment variables to .env files

Move the shared environment from CFG_EXTRA_ENV_SETTINGS in
mx6sabre_common.h to a common text environment fragment in
include/env/nxp/mx6sabre_common.env. The mx6sabresd and mx6sabreauto
board environments include this fragment and add their own console
setting, which is the only board specific difference between them. The
eMMC firmware update variables remain guarded by CONFIG_SUPPORT_EMMC_BOOT
inside the fragment. The now unused CONSOLE_DEV defines and the
linux/stringify.h include are dropped.

The generated default environment is unchanged for both boards. This was
verified by comparing the output of scripts/get_default_envs.sh before
and after the change, which produced identical results.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 weeks agomx6ullevk: Move environment variables to .env file
Aristo Chen [Wed, 10 Jun 2026 13:24:23 +0000 (13:24 +0000)] 
mx6ullevk: Move environment variables to .env file

Move the board environment from CFG_EXTRA_ENV_SETTINGS in the config
header to board/nxp/mx6ullevk/mx6ullevk.env for better maintainability.
The file is named after CONFIG_SYS_BOARD so it is selected automatically
without setting CONFIG_ENV_SOURCE_FILE. Drop the now unused
linux/stringify.h include.

The generated default environment is unchanged. This was verified by
comparing the output of scripts/get_default_envs.sh before and after the
change, which produced identical results.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 weeks agomx7ulp_evk: Move environment variables to .env file
Aristo Chen [Wed, 10 Jun 2026 13:24:22 +0000 (13:24 +0000)] 
mx7ulp_evk: Move environment variables to .env file

Move the board environment from CFG_EXTRA_ENV_SETTINGS in the config
header to board/nxp/mx7ulp_evk/mx7ulp_evk.env for better
maintainability. The file is named after CONFIG_SYS_BOARD so it is
selected automatically without setting CONFIG_ENV_SOURCE_FILE.

The generated default environment is unchanged. This was verified by
comparing the output of scripts/get_default_envs.sh before and after the
change, which produced identical results.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx9: Select OF_LIVE
Peng Fan [Tue, 9 Jun 2026 08:36:30 +0000 (16:36 +0800)] 
imx9: Select OF_LIVE

Enable the live DT to reduce the DT parsing time.
Test data on i.MX95-EVK:

Before:
Accumulated time:
                26,205  dm_spl
               483,991  dm_f
                22,977  dm_r
After:
Accumulated time:
                26,229  dm_spl
               484,772  dm_f
                 2,667  of_live
                 1,003  dm_r

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8m_evk: Select OF_LIVE
Peng Fan [Tue, 9 Jun 2026 08:36:29 +0000 (16:36 +0800)] 
imx8m_evk: Select OF_LIVE

Enable the live DT to reduce the DT parsing time.

Test data on i.MX8MP shows that boot time is decreased by ~%6

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx9: soc: Use livetree API for fdt access
Peng Fan [Tue, 9 Jun 2026 08:36:28 +0000 (16:36 +0800)] 
imx9: soc: Use livetree API for fdt access

Use livetree API, otherwise it will fail to read properties from the device
tree when OF_LIVE is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agomisc: ele: Use dev_read_addr
Peng Fan [Tue, 9 Jun 2026 08:36:27 +0000 (16:36 +0800)] 
misc: ele: Use dev_read_addr

Use dev_read_addr which supports livetree API, otherwise driver
will fail to get addr when OF_LIVE is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agogpio: imx_rgpio2p: Use dev_read_addr_index
Peng Fan [Tue, 9 Jun 2026 08:36:26 +0000 (16:36 +0800)] 
gpio: imx_rgpio2p: Use dev_read_addr_index

Use dev_read_addr_index which supports livetree API, otherwise driver
will fail to get addr when OF_LIVE is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoserial: lpuart: Use livetree API for fdt access
Peng Fan [Tue, 9 Jun 2026 08:36:25 +0000 (16:36 +0800)] 
serial: lpuart: Use livetree API for fdt access

Use livetree API, otherwise driver will fail to read properties
from the device tree when OF_LIVE is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8m: dts: Update ddr firmware name
Peng Fan [Tue, 9 Jun 2026 08:36:24 +0000 (16:36 +0800)] 
imx8m: dts: Update ddr firmware name

Update to latest ddr firmware name, otherwise user may use legacy ddr
firmware from linux-firmware-imx release.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx: Guard print_cpuinfo with !CONFIG_IS_ENABLED(CPU)
Peng Fan [Tue, 9 Jun 2026 08:36:23 +0000 (16:36 +0800)] 
imx: Guard print_cpuinfo with !CONFIG_IS_ENABLED(CPU)

When CONFIG_CPU is enabled, print_cpuinfo is defined in common/board_f.c
with static property. However in imx cpu.c, print_cpuinfo is not a local
function, so guard it with !CONFIG_IS_ENABLED(CPU).

And all i.MX8M boards has CONFIG_CPU and CONFIG_CPU_IMX set, so remove the
dead code.

However legacy print_cpuinfo also print reset reason, to keep reset
reason printed as before, export get_reset_reason() and invoke it
at arch_misc_init().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx7ulp: cleanup get_imx_type
Peng Fan [Tue, 9 Jun 2026 08:36:22 +0000 (16:36 +0800)] 
imx7ulp: cleanup get_imx_type

There is only one SoC and no external user of get_imx_type for i.MX7ULP,
so directly embed the string in print_cpuinfo and drop get_imx_type().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8ulp: cleanup get_imx_type
Peng Fan [Tue, 9 Jun 2026 08:36:21 +0000 (16:36 +0800)] 
imx8ulp: cleanup get_imx_type

There is only one SoC and no external user of get_imx_type for i.MX8ULP,
so directly embed the string in print_cpuinfo and drop get_imx_type().

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx952: Update gpio node regs
Peng Fan [Tue, 9 Jun 2026 08:36:19 +0000 (16:36 +0800)] 
imx952: Update gpio node regs

Same to 85319b2e672 ("board: toradex: smarc-imx95: remove gpio1 reg"),
there is no need to use dual base for i.MX952 gpio, so drop the U-Boot
specific reg changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoimx8m: Imply DM_THERMAL
Peng Fan [Tue, 9 Jun 2026 08:36:18 +0000 (16:36 +0800)] 
imx8m: Imply DM_THERMAL

CONFIG_IMX_TMU depends on CONFIG_DM_THERMAL, so when selecting IMX_TMU,
DM_THERMAL should also be selected.

Update i.MX8M based defconfigs.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 weeks agoMerge patch series "Kconfig restyle part 2"
Tom Rini [Thu, 25 Jun 2026 20:17:51 +0000 (14:17 -0600)] 
Merge patch series "Kconfig restyle part 2"

Johan Jonker <jbx6244@gmail.com> says:

The Kconfig menu attribute '---help---' is deprecated.
If we change to "help" the text has to indent.
This again has to align with other attributes,
so we have to restyle them as well.
And as there's a script then change all Kconfig files
excluding 'arch' and 'board' directories from part 1.

Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Problems:
People creating indents in help texts.
The script doesn't care. It puts everything left aligned.

Help texts with empty lines. It stops aligning as help test.

Other fixes:
While using checkpatch.pl or the script some issues showed up,
so fix them as well.

Link: https://lore.kernel.org/r/ef462dea-69aa-48df-9f7c-af2e6c54e52a@gmail.com
2 weeks agoKconfig: restyle
Johan Jonker [Wed, 10 Jun 2026 14:41:34 +0000 (16:41 +0200)] 
Kconfig: restyle

Restyle Kconfig:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: drivers: restyle remaining
Johan Jonker [Wed, 10 Jun 2026 14:41:21 +0000 (16:41 +0200)] 
Kconfig: drivers: restyle remaining

Restyle all Kconfigs for the rest of "drivers":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: gpio: add empty line
Johan Jonker [Wed, 10 Jun 2026 14:41:04 +0000 (16:41 +0200)] 
Kconfig: gpio: add empty line

Restyle by adding an empty line between configs.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: video: restyle
Johan Jonker [Wed, 10 Jun 2026 14:40:50 +0000 (16:40 +0200)] 
Kconfig: video: restyle

Restyle all Kconfigs for "video":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a multi-paragraph help text]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: usb: restyle
Johan Jonker [Wed, 10 Jun 2026 14:40:27 +0000 (16:40 +0200)] 
Kconfig: usb: restyle

Restyle all Kconfigs for "usb":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: power: restyle
Johan Jonker [Wed, 10 Jun 2026 14:40:13 +0000 (16:40 +0200)] 
Kconfig: power: restyle

Restyle all Kconfigs for "power":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: pinctrl: restyle
Johan Jonker [Wed, 10 Jun 2026 14:39:57 +0000 (16:39 +0200)] 
Kconfig: pinctrl: restyle

Restyle all Kconfigs for "pinctrl":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: net: restyle
Johan Jonker [Wed, 10 Jun 2026 14:39:39 +0000 (16:39 +0200)] 
Kconfig: net: restyle

Restyle all Kconfigs for "net":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: mtd: restyle
Johan Jonker [Wed, 10 Jun 2026 14:39:20 +0000 (16:39 +0200)] 
Kconfig: mtd: restyle

Restyle all Kconfigs for "mtd":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
[trini: Add missing indentation on a few more multi-paragraph help texts]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: i2c: restyle
Johan Jonker [Wed, 10 Jun 2026 14:39:01 +0000 (16:39 +0200)] 
Kconfig: i2c: restyle

Restyle all Kconfigs for "i2c":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: net: restyle
Johan Jonker [Wed, 10 Jun 2026 14:38:48 +0000 (16:38 +0200)] 
Kconfig: net: restyle

Restyle all Kconfigs for "net":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: lib: restyle
Johan Jonker [Wed, 10 Jun 2026 14:38:36 +0000 (16:38 +0200)] 
Kconfig: lib: restyle

Restyle all Kconfigs for "lib":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: fs: restyle
Johan Jonker [Wed, 10 Jun 2026 14:38:22 +0000 (16:38 +0200)] 
Kconfig: fs: restyle

Restyle all Kconfigs for "fs":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: dts: restyle
Johan Jonker [Wed, 10 Jun 2026 14:38:09 +0000 (16:38 +0200)] 
Kconfig: dts: restyle

Restyle all Kconfigs for "dts":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: disk: restyle
Johan Jonker [Wed, 10 Jun 2026 14:37:56 +0000 (16:37 +0200)] 
Kconfig: disk: restyle

Restyle all Kconfigs for "disk":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: common: restyle
Johan Jonker [Wed, 10 Jun 2026 14:37:43 +0000 (16:37 +0200)] 
Kconfig: common: restyle

Restyle all Kconfigs for "common":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: cmd: restyle
Johan Jonker [Wed, 10 Jun 2026 14:37:30 +0000 (16:37 +0200)] 
Kconfig: cmd: restyle

Restyle all Kconfigs for "cmd":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoKconfig: boot: restyle
Johan Jonker [Wed, 10 Jun 2026 14:37:17 +0000 (16:37 +0200)] 
Kconfig: boot: restyle

Restyle all Kconfigs for "boot":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2 weeks agoMerge patch series "Kconfig restyle"
Tom Rini [Thu, 25 Jun 2026 20:07:01 +0000 (14:07 -0600)] 
Merge patch series "Kconfig restyle"

Johan Jonker <jbx6244@gmail.com> says:

The Kconfig menu attribute '---help---' is deprecated.
If we change to "help" the text has to indent.
This again has to align with other attributes,
so we have to restyle them as well.
And as there's a script then change all Kconfig
to start with the 'arch' and 'board' directories.

Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Problems:
People creating indents in help texts.
The script doesn't care. It puts everything left aligned.

Help texts with empty lines. It stops aligning as help test.

Other fixes:
While using checkpatch.pl or the script some issues showed up,
so fix them as well.

Link: https://lore.kernel.org/r/d1270724-50eb-450d-8847-a3271ea27a2a@gmail.com
2 weeks agoKconfig: board: restyle
Johan Jonker [Tue, 9 Jun 2026 01:26:36 +0000 (03:26 +0200)] 
Kconfig: board: restyle

Restyle all Kconfigs:
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: arch: restyle
Johan Jonker [Tue, 9 Jun 2026 01:26:19 +0000 (03:26 +0200)] 
Kconfig: arch: restyle

Restyle all Kconfigs other then "arm":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: arm: restyle
Johan Jonker [Tue, 9 Jun 2026 01:26:02 +0000 (03:26 +0200)] 
Kconfig: arm: restyle

Restyle all Kconfigs for "arm":
Menu entries   : no space left
Menu attributes: 1 TAB
Help text      : 1 TAB + 2 spaces
Replace '---help---' by 'help'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: misc: add empty line
Johan Jonker [Tue, 9 Jun 2026 01:25:43 +0000 (03:25 +0200)] 
Kconfig: misc: add empty line

Restyle by adding an empty line between configs.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: themal: fix typo
Johan Jonker [Tue, 9 Jun 2026 01:25:28 +0000 (03:25 +0200)] 
Kconfig: themal: fix typo

While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: Possible repeated word: 'for'

Fix by changing 'for for' to 'for'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: power: pmic: fix typo
Johan Jonker [Tue, 9 Jun 2026 01:25:11 +0000 (03:25 +0200)] 
Kconfig: power: pmic: fix typo

While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'refered' may be misspelled - perhaps 'referred'?

Fix by changing 'refered' to 'referred'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: powerpc: mpc85xx: fix typo
Johan Jonker [Tue, 9 Jun 2026 01:24:54 +0000 (03:24 +0200)] 
Kconfig: powerpc: mpc85xx: fix typo

While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'Enble' may be misspelled - perhaps 'Enable'?

Fix by changing 'Enble' to 'Enable'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: armv7: fix typo
Johan Jonker [Tue, 9 Jun 2026 01:24:37 +0000 (03:24 +0200)] 
Kconfig: armv7: fix typo

While restyling Kconfig the script checkpatch.pl gives
this info:

WARNING: 'suppport' may be misspelled - perhaps 'support'?

Fix by changing 'suppport' to 'support'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoMerge patch series "Relocate U-Boot in the last bank"
Tom Rini [Wed, 24 Jun 2026 21:39:29 +0000 (15:39 -0600)] 
Merge patch series "Relocate U-Boot in the last bank"

Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

There was a discussion recently on the mailing lists regarding our
management of memory above ram_top [0]. The tl;dr is that we have two problems.

The first one is that U-Boot always relocates to the top of the first available
bank unless there's special board code to sidestep that. The second is we don't
successfully deal with devices that can only do 32-bit DMA.

This patch series deals with the first problem by adding a Kconfig option
allowing platforms to relocate to the top of the last discovered bank.

It's worth noting that this is easily testable with QEMU

qemu-system-aarch64 -m 8192 -smp 2 -nographic -cpu cortex-a57 \
    -machine virt,secure=off \
    -bios u-boot.bin \
    -device virtio-rng-pci \
    -drive id=os,if=none,file="$image" \
    -device virtio-blk-device,drive=os \
    -object memory-backend-ram,id=ram0,size=4G \
    -object memory-backend-ram,id=ram1,size=4G \
    -numa node,memdev=ram0 \
    -numa node,memdev=ram1

# RELOC_ADDR_TOP not set
Hit any key to stop autoboot: 0
=> bdinfo
[...]
relocaddr   = 0x000000013f66c000
reloc off   = 0x000000013f66c000
[...]
lmb_dump_all:
 memory.count = 0x1
 memory[0] [0x40000000-0x23fffffff], 0x200000000 bytes, flags: none
 reserved.count = 0x2
 reserved[0] [0x13d507000-0x13d509fff], 0x3000 bytes, flags: no-notify, no-overwrite
reserved[1] [0x13d50aff0-0x23fffffff], 0x102af5010 bytes, flags: no-overwrite
devicetree  = board
[...]
TLB addr    = 0x000000013ffe0000
irq_sp      = 0x000000013e50aff0
sp start    = 0x000000013e50aff0
Early malloc usage: e88 / 2000
=>

# RELOC_ADDR_TOP enabled

=> bdinfo
[...]
relocaddr   = 0x000000023f66c000
reloc off   = 0x000000023f66c000
[...]
lmb_dump_all:
 memory.count = 0x1
 memory[0] [0x40000000-0x23fffffff], 0x200000000 bytes, flags: none
 reserved.count = 0x2
 reserved[0] [0x23d507000-0x23d509fff], 0x3000 bytes, flags: no-notify, no-overwrite
 reserved[1] [0x23d50aff0-0x23fffffff], 0x2af5010 bytes, flags: no-overwrite
devicetree  = board
[...]
TLB addr    = 0x000000023ffe0000
irq_sp      = 0x000000023e50aff0
sp start    = 0x000000023e50aff0
Early malloc usage: e88 / 2000
=>

[0] https://lore.kernel.org/u-boot/CAC_iWjKFAzpj3B_MEW7-dnOrcAV-rfkhXXo8Bv0KgLNP2VJxRA@mail.gmail.com/

Link: https://lore.kernel.org/r/20260617074846.84362-1-ilias.apalodimas@linaro.org
2 weeks agodoc: Add a warning about using RELOC_ADDR_TOP
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:25 +0000 (10:48 +0300)] 
doc: Add a warning about using RELOC_ADDR_TOP

Since devices that can't DMA above 4GiB will misbehave with this option
enabled add a warning on the documentation.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agoconfigs: Enable RELOC_ADDR_TOP on arm64 QEMU
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:24 +0000 (10:48 +0300)] 
configs: Enable RELOC_ADDR_TOP on arm64 QEMU

Since we added an option for relocating U-Boot to the last memory bank,
enable it for QEMU to get some coverage

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agocommon: Add an option to relocate on ram top
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:23 +0000 (10:48 +0300)] 
common: Add an option to relocate on ram top

Right now we only relocate u-boot to the top of the first
memory bank unless the board specific code overwrites it.
This is problematic when loading big binaries as it
fragments the contiguous memory space for no apparent reason.

On certain platforms, it is currently not possible to relocate U-Boot
above the 32bit boundary, due to various dependencies on content located
below the 32bit boundary. One such example is ethernet, where the packet
buffer built into U-Boot binary is placed below the 32bit boundary and
allows loading of data via ethernet even above 32bit boundary due to
memory copy from the packet buffer to the destination location.

A previous patch moves the bi_dram[] info from bd to gd and make
the memory bank information available early. So move the
dram_init_banksize() INITCALL before the relocation address calculation
and use it to derive the address.

Also add a Kconfig option and allow the common code to relocate U-Boot
to the top of the last discovered bank.
It's worth noting that this patch changes when dram_init_banksize()
is called. It's now called  much earlier in the board init process.
That is a significant ordering change for every board with a custom
dram_init_banksize(), and it is unconditional (not gated on RELOC_ADDR_TOP).

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # Radxa ROCK 5B
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agorpi: Add a local get_effective_memsize()
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:22 +0000 (10:48 +0300)] 
rpi: Add a local get_effective_memsize()

We are about to change the place we call dram_init_banksize().
The goal is to have all the information we need to pick a proper
relocation address in gd->dram[].

However, the RPI boards, and specifically the tested rpi4, seems
to hang if we relocate anywhere above the address returned from
bcm2835_mbox_call_prop().
So store that address and return it on get_effective_memsize()
which is used to calculate ram_top.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # rpi, rpi4
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agocommon: Clean up setup_dest_addr()
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:21 +0000 (10:48 +0300)] 
common: Clean up setup_dest_addr()

Right now the function does
- Re-adjust the ram_size based on Kconfig options
- Set ram_top
- Set the relocation address

It also does not set the ram_size in case ram_top grew
from it's initial value. But ram_top and ram_size should
always be changed together.

So let's make things a bit cleaner and move the ram calculations
in their own INITCALL

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agocommon: move ram_base calculation to independent INITCALL()
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:20 +0000 (10:48 +0300)] 
common: move ram_base calculation to independent INITCALL()

Currently, ram_base is calculated within setup_dest_addr().
However, upcoming patches that enable U-Boot relocation to the highest
DRAM bank require ram_base to be initialized earlier.

The default dram_init_banksize() definition relies on ram_base
to calculate the start of the first bank. But following patches
will move that function to execute immediately before setup_dest_addr().

So let's split the ram_base initialization in its own INITCALL.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agotreewide: move bi_dram[] from bd to gd
Ilias Apalodimas [Wed, 17 Jun 2026 07:48:19 +0000 (10:48 +0300)] 
treewide: move bi_dram[] from bd to gd

Currently, the bi_dram[] information is stored in the board info
structure (bd). Because bd is only valid after reserve_board(),
dram_init_banksize() must be called late in the initialization process.
This limitation is problematic, as it forces us to rely on a variety of
bespoke functions to determine board RAM, bank memory sizes, and other
early setup requirements.

By moving bi_dram[] into the global data (gd), we can run it earlier.
This is particularly convenient since boards define their own
dram_init_banksize() routines, which do not always rely on parsing
Device Tree (DT) memory nodes.

Additionally, U-Boot defaults to relocating to the top of the first memory
bank. While boards currently use custom functions to override this
behavior, having the DRAM bank information available earlier in gd makes
relocating to a different bank trivial and standardizes the process.

Reviewed-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Michal Simek <michal.simek@amd.com> # Versal Gen 2 Vek385
Tested-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
2 weeks agortc: goldfish: Return error when device address is invalid
Kuan-Wei Chiu [Mon, 8 Jun 2026 15:47:49 +0000 (15:47 +0000)] 
rtc: goldfish: Return error when device address is invalid

goldfish_rtc_of_to_plat() currently returns success even when
dev_read_addr() fails to find a valid address. This leaves plat->reg
unset (or 0) and defers the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs. This
aligns the driver with the recent fix introduced in the goldfish
serial driver by Naveen Kumar Chaudhary. [1]

Link: https://lore.kernel.org/u-boot/vgwnt6mnls3lf3zdm6mz5siztzkvppte4ykszbvifjzukvmksf@maaxe5agqpim/
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2 weeks agotimer: goldfish: Return error when device address is invalid
Kuan-Wei Chiu [Mon, 8 Jun 2026 15:47:48 +0000 (15:47 +0000)] 
timer: goldfish: Return error when device address is invalid

goldfish_timer_of_to_plat() currently returns success even when
dev_read_addr() fails to find a valid address. This leaves plat->reg
unset and defers the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs. This
aligns the driver with the recent fix introduced in the goldfish
serial driver by Naveen Kumar Chaudhary. [1]

Link: https://lore.kernel.org/u-boot/vgwnt6mnls3lf3zdm6mz5siztzkvppte4ykszbvifjzukvmksf@maaxe5agqpim/
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2 weeks agoserial: goldfish: return error when device address is invalid
Naveen Kumar Chaudhary [Sun, 7 Jun 2026 15:45:42 +0000 (21:15 +0530)] 
serial: goldfish: return error when device address is invalid

goldfish_serial_of_to_plat() returns success even when dev_read_addr()
fails to find a valid address. This leaves plat->reg unset and defers
the failure to probe().

Return -EINVAL immediately when the address is FDT_ADDR_T_NONE so the
failure is reported at the of_to_plat stage where it belongs.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2 weeks agoserial: cortina: check RX FIFO status before reading data
Naveen Kumar Chaudhary [Sun, 7 Jun 2026 15:33:43 +0000 (21:03 +0530)] 
serial: cortina: check RX FIFO status before reading data

ca_serial_getc() reads from the URX_DATA register unconditionally
without first checking whether the RX FIFO contains valid data. When
the FIFO is empty, this returns whatever stale value is in the
register, which the DM serial framework interprets as a valid
character.

The DM serial framework expects getc() to return -EAGAIN when no data
is available, so it can handle retries and call schedule() to service
the watchdog between attempts.

Add a check of the UINFO register's UINFO_RX_FIFO_EMPTY bit before
reading URX_DATA, returning -EAGAIN when no data is pending. This
is consistent with how ca_serial_putc() already checks
UINFO_TX_FIFO_FULL before writing.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
2 weeks agoglobal_data: fix type for gd_malloc_ptr()
Alexander Stein [Fri, 5 Jun 2026 13:44:46 +0000 (15:44 +0200)] 
global_data: fix type for gd_malloc_ptr()

With commit 92aa3ec321b5 ("global_data: Reduce size of early-malloc vars")
the type changes from (unsigned) long to int. But the type for default
if SYS_MALLOC_F_LEN is unset was not changed. Remove the suffix.
Fixes the warning:
 common/spl/spl.c:800:23: warning: format '%x' expects argument of type
 'unsigned int', but argument 2 has type 'long int' [-Wformat=]

Fixes: 92aa3ec321b5 ("global_data: Reduce size of early-malloc vars")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 weeks agoMerge tag 'v2026.07-rc5' into next
Tom Rini [Mon, 22 Jun 2026 22:42:41 +0000 (16:42 -0600)] 
Merge tag 'v2026.07-rc5' into next

Prepare v2026.07-rc5

3 weeks agoPrepare v2026.07-rc5 v2026.07-rc5
Tom Rini [Mon, 22 Jun 2026 22:22:08 +0000 (16:22 -0600)] 
Prepare v2026.07-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 22 Jun 2026 14:19:12 +0000 (08:19 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- serial: sh: Fix dev_read_addr error check

3 weeks agoserial: sh: Fix dev_read_addr error check
Francois Berder [Thu, 21 May 2026 17:52:39 +0000 (19:52 +0200)] 
serial: sh: Fix dev_read_addr error check

dev_read_addr returns FDT_ADDR_T_NONE (-1) in case of error
and not 0.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # R-Car H3/M3-W/M3-N Salvator-X(S), H3/M3-W ULCB, V4H Sparrow Hawk, X5H Ironhide RSIP and CA720AE
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Update subject tags
3 weeks agoMerge tag 'efi-2026-07-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 21 Jun 2026 15:27:12 +0000 (09:27 -0600)] 
Merge tag 'efi-2026-07-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2026-07-rc6

CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/30505

Documentation:

* bootdev: fix typos
* board: renesas: Document Renesas RZ/N1D and RZ/N1S as arm
* board: renesas: Document Renesas Geist board support
* board: renesas: Document Renesas Gray Hawk board support
* board: renesas: Document Renesas Ironhide board support
* android: fastboot: Document halt behaviour

UEFI:

* fix memory leak in efi_var_collect()
* set revision field in block IO protocol
* fix guid comparison in efi_selftest_loaded_image.c
* fix use-after-free in efi_selftest_memory.c

3 weeks agodoc: android: fastboot: Document halt behaviour
Mattijs Korpershoek [Mon, 15 Jun 2026 12:29:28 +0000 (14:29 +0200)] 
doc: android: fastboot: Document halt behaviour

It's possible to interrupt the fastboot command from the U-Boot shell
using the Ctrl-c keybinding.

Document this.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Sam Day <me@samcday.com>
3 weeks agoefi_selftest: fix use-after-free
Vincent Stehlé [Thu, 11 Jun 2026 06:59:50 +0000 (08:59 +0200)] 
efi_selftest: fix use-after-free

When the `memory' efi selftest verifies the Devicetree memory reservation,
it accesses the memory_map buffer after it has been freed with free_pool().
Move the verification earlier to fix this.

Fixes: 34c96659ed57 ("efi_selftest: check fdt is marked as runtime data")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 weeks agolib/efi_loader: fix block io revision
Vincent Stehlé [Tue, 9 Jun 2026 08:07:04 +0000 (10:07 +0200)] 
lib/efi_loader: fix block io revision

The Revision field of the EFI_BLOCK_IO_PROTOCOL structure must be set to
one of the two valid values [1], but this is not initialized in the
efi_loader; fix it.

Link: https://uefi.org/specs/UEFI/2.11/13_Protocols_Media_Access.html#efi-block-io-protocol
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 weeks agoefi_loader: fix memory leak in efi_var_collect
Ilias Apalodimas [Fri, 19 Jun 2026 08:38:29 +0000 (11:38 +0300)] 
efi_loader: fix memory leak in efi_var_collect

Barebox has now ported some of the UEFI code. In the process
they found some bugs.

In this case when the variable buffer is too small, efi_var_collect()
returns EFI_BUFFER_TOO_SMALL but doesn't free the allocated 'buf'.

Fixes: 5f7dcf079de8c ("efi_loader: UEFI variable persistence")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 weeks agobootdev: fix typos
Denis Mukhin [Sun, 21 Jun 2026 05:14:43 +0000 (22:14 -0700)] 
bootdev: fix typos

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>