]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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

4 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
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 weeks agoefi_selftest: fix guid comparison
Vincent Stehlé [Mon, 15 Jun 2026 10:56:15 +0000 (12:56 +0200)] 
efi_selftest: fix guid comparison

The `loaded image' efi selftest is comparing protocol GUIDs with the wrong
polarity.
This can be verified on the sandbox, where two protocols GUIDs are
retrieved by the test from the image handle in the following order:

1. Loaded Image Device Path Protocol GUID
2. Loaded Image Protocol GUID

The test matches on the first GUID, while it is in fact looking for the
second one; fix the comparison polarity.

Fixes: efe79a7c0de0 ("efi_selftest: test for loaded image 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>
Cc: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 weeks agodoc: board: renesas: Document Renesas Ironhide board support
Marek Vasut [Mon, 15 Jun 2026 21:47:17 +0000 (23:47 +0200)] 
doc: board: renesas: Document Renesas Ironhide board support

Document support for Renesas Ironhide development board
based on Renesas R-Car X5H (R8A78000) SoC.

Fixes: cf71963778ee ("arm64: dts: renesas: Add Renesas R-Car X5H R8A78000 Ironhide board code")
Fixes: 9d47a5a4d560 ("arm: renesas: Add Renesas R-Car R8A78000 X5H Cortex-M33 RSIP port")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agodoc: board: renesas: Document Renesas Gray Hawk board support
Marek Vasut [Mon, 15 Jun 2026 21:47:16 +0000 (23:47 +0200)] 
doc: board: renesas: Document Renesas Gray Hawk board support

Document support for Renesas Gray Hawk Single development board
based on Renesas R-Car V4M (R8A779H0) SoC.

Fixes: 53066deccbed ("ARM: renesas: Add Renesas R8A779H0 V4M Gray Hawk board code")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agodoc: board: renesas: Document Renesas Geist board support
Marek Vasut [Mon, 15 Jun 2026 21:47:15 +0000 (23:47 +0200)] 
doc: board: renesas: Document Renesas Geist board support

Document support for Renesas Geist development board
based on Renesas R-Car M3Le (R8A779MD) SoC.

Fixes: c8523795d796 ("arm64: dts: renesas: r8a779md: Add support for R-Car M3Le R8A779MD Geist")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agodoc: board: renesas: Document Renesas RZ/N1D and RZ/N1S as arm
Marek Vasut [Tue, 16 Jun 2026 03:36:05 +0000 (05:36 +0200)] 
doc: board: renesas: Document Renesas RZ/N1D and RZ/N1S as arm

The RZ/N1D and RZ/N1S contain Cortex-A7 core, which is 32bit ARM core.
Document the SoC as 32bit ARM instead of aarch64.

Fixes: a5b9f959439b ("doc: renesas: add Renesas board docs")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Thu, 18 Jun 2026 17:41:22 +0000 (11:41 -0600)] 
Merge branch 'master' of git://source.denx.de/u-boot-usb

- usb: tcpm: fix inverted poll condition in tcpm_pd_transmit()

5 weeks agousb: tcpm: fix inverted poll condition in tcpm_pd_transmit()
Peng Fan [Thu, 18 Jun 2026 06:48:48 +0000 (14:48 +0800)] 
usb: tcpm: fix inverted poll condition in tcpm_pd_transmit()

The read_poll_timeout() macro breaks out of its loop when the condition
evaluates to true. The current code uses "!tx_complete" as the
condition, which means it exits immediately when tx_complete is false
(i.e., transmission has NOT completed yet), rather than waiting for
completion.

Fix the condition to "tx_complete" so that the poll loop waits until
the TCPC signals transmission success/failure/discard before
proceeding.

Without this fix, tcpm_pd_transmit() returns before the TCPC has
finished transmitting, causing the PD state machine to proceed with
stale tx_status values.

Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 weeks agoMerge patch series "Fixes, cleanup and a test for the SPL FIT "full" loader"
Tom Rini [Wed, 17 Jun 2026 20:25:13 +0000 (14:25 -0600)] 
Merge patch series "Fixes, cleanup and a test for the SPL FIT "full" loader"

Francesco Valla <francesco@valla.it> says:

This patch set contains a collection of small fixes and cleanups for the
"full" FIT loader that can be used for the SPL. The main beneficiary is
the falcon boot flow, but the same loader can be used also for U-Boot
proper.

Patch 1 was part of another set, but I decided to put it here for a
better separation between plumbing (here) and new features (there).  I
kept the Reviewed-by tag collected from Simon in that occasion.

Patch 6 introduces a new unit test covering most of the code that is
being cleaned up.

The set was tested on a i.MX93 FRDM, both with and without signature and
to boot both U-Boot proper and the Linux kernel directly (i.e., falcon
boot).

Link: https://lore.kernel.org/r/20260604-spl_fit_full_cleanup-v1-0-ec036b5872e2@valla.it
5 weeks agotest: spl: add unit test for the "full" FIT loader
Francesco Valla [Thu, 4 Jun 2026 20:41:40 +0000 (22:41 +0200)] 
test: spl: add unit test for the "full" FIT loader

Following what is already done for the "simple" FIT loader, add a unit
test for the "full" loader.

Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agospl: fit: use CONFIG_IS_ENABLED whenever possible
Francesco Valla [Thu, 4 Jun 2026 20:41:39 +0000 (22:41 +0200)] 
spl: fit: use CONFIG_IS_ENABLED whenever possible

Replace #ifdef directives with the CONFIG_IS_ENABLED() for better
coverage and cleaner code. In the mean time, convert the last
IS_ENABLED() to CONFIG_IS_ENABLED().

Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agospl: fit: drop the 'standalone' load attempt
Francesco Valla [Thu, 4 Jun 2026 20:41:38 +0000 (22:41 +0200)] 
spl: fit: drop the 'standalone' load attempt

The 'standalone =' config property has been deprecated for ~5 years [1],
with the loud warn about the deprecation lasting much more than the
foreseen couple of releases.

Remove the attempt to load the primary image through this property to
save some boot time and code complexity.

[1] https://lore.kernel.org/u-boot/20210401182531.2147653-5-mr.nuke.me@gmail.com/

Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agospl: fit: rework the FDT load hack
Francesco Valla [Thu, 4 Jun 2026 20:41:37 +0000 (22:41 +0200)] 
spl: fit: rework the FDT load hack

U-Boot proper expects its FDT to be right after its binary image; the
"full" FIT image loader thus adopts an hack to relocate it, ignoring
the specified load address.

Rework the current form of the hack to:

- support the 'sandbox' environment with a sysmem-aware memcpy;
- use the ALIGN() macro instead of raw alignment logic;
- align the FDT to 8-byte boundary as per FDT specifications;
- fix the debug print (which was reporting the source address for the
  relocation instead of the destination one).

Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agospl: fit: fix loadables load under sandbox
Francesco Valla [Thu, 4 Jun 2026 20:41:36 +0000 (22:41 +0200)] 
spl: fit: fix loadables load under sandbox

Align the fit_image_load() call done for the loadables to the ones for
other artifatcs (firmware, kernel, fdt), calling virt_to_phys() on the
pointer that contains the FIT location.

This is needed to support the 'sandbox' environment.

Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agoboot: fit: fix FIT verification in SPL
Francesco Valla [Thu, 4 Jun 2026 20:41:35 +0000 (22:41 +0200)] 
boot: fit: fix FIT verification in SPL

Align the behavior of fit_image_verify() called in SPL to the one in
full U-Boot. In particular, this function is called when both
CONFIG_SPL_LOAD_FIT_FULL and CONFIG_SPL_FIT_SIGNATURE are set (which can
happen e.g. in case of secure falcon boot).

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Francesco Valla <francesco@valla.it>
5 weeks agoMerge patch series "dtc: Resync fdt_check_full function"
Tom Rini [Wed, 17 Jun 2026 20:13:00 +0000 (14:13 -0600)] 
Merge patch series "dtc: Resync fdt_check_full function"

Tom Rini <trini@konsulko.com> says:

As part of the resync to dtc version v1.7.2-35-g52f07dcca47c from the
Linux Kernel, we missed updating the fdt_check_full function because it
exists in its own file in upstream dtc and the kernel doesn't import it,
as reported by Anton Ivanov. This short series brings in the upstream
fdt_check.c file and then implements our size-saving option, but in the
modern way.

The size-saving portion has been upstreamed.

Link: https://lore.kernel.org/r/20260526202218.4004070-1-trini@konsulko.com
5 weeks agodtc: libfdt: Introduce a can_assume check in fdt_check_full
Tom Rini [Tue, 26 May 2026 20:19:28 +0000 (14:19 -0600)] 
dtc: libfdt: Introduce a can_assume check in fdt_check_full

The current upstream method of having a function omit various tests is
to use the can_assume macro. Take the logic we had previously been using
and instead make it a can_assume(PERFECT) check within fdt_check_full
itself.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agodtc: Resync fdt_check_full() with upstream version v1.7.2-35-g52f07dcca47c
Tom Rini [Tue, 26 May 2026 20:19:27 +0000 (14:19 -0600)] 
dtc: Resync fdt_check_full() with upstream version v1.7.2-35-g52f07dcca47c

In the upstream project, the function fdt_check_full has been moved from
fdt_ro.c to its own file, fdt_check.c. This file is not included in the
Linux kernel copy and so has not been synced over. As we do need and use
the fdt_check_full function, bring that file over as of the current
upstream we are synced to. Remove our copy of this function from
fdt_ro.c and add fdt_check.o and 1-liner fdt_check.c where needed. Note
that for now, this will increase size in some cases as upstream does not
have a size reduction method here.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agoconfigs: phycore_am62x_a53_defconfig: Enable fastboot
Wadim Egorov [Wed, 3 Jun 2026 06:19:46 +0000 (08:19 +0200)] 
configs: phycore_am62x_a53_defconfig: Enable fastboot

Enable USB fastboot support for downloading and flashing images via
the fastboot protocol.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
5 weeks agoMerge patch series "armv8: mmu: fix region unmapping and optimise set_one_region()"
Tom Rini [Wed, 17 Jun 2026 15:55:31 +0000 (09:55 -0600)] 
Merge patch series "armv8: mmu: fix region unmapping and optimise set_one_region()"

Casey Connolly <casey.connolly@linaro.org> says:

Currently trying to unmap a region results in slow and largely broken
behaviour as we unnecessarily split blocks and manually set thousands of
individual 4k pages instead of higher level blocks.

This series fixes the behaviour of set_one_region() so that it works
properly when called to unmap regions. See patch 4 for details.

Patches 1 & 2 improve the existing debug functionality, the pagetable
dumper will now print most explicitly unmapped regions (since they still
have their PA intact), as well as adding a new function which does a
very basic software TLB lookup to help with debugging.

Patch 3 de-duplicates some code by moving the loop that always surrounds
set_one_region() calls into its own function, this also helps with
readability in the calling functions.

Link: https://lore.kernel.org/r/20260608-b4-mmu-unmap-fixes-v6-0-ac0764cccf40@linaro.org
5 weeks agoarmv8: mmu: fix and optimise explicitly unmapping regions
Casey Connolly [Mon, 8 Jun 2026 17:13:51 +0000 (19:13 +0200)] 
armv8: mmu: fix and optimise explicitly unmapping regions

As more platforms start ensuring they explicitly unmap reserved-memory
regions a few issues have appeared with how the existing dynamic mapping
code works. Fix these and get a small optimisation as well.

1. Teach pte_type() to actually respect the PTE_TYPE_VALID bit
2. Don't walk the TLB a second time if we call mmu_change_region_attr()
   with PTE_TYPE_FAULT (since it would just be a slow nop)
3. Fix how set_one_region() decides to split blocks.

Today set_one_region() will always split blocks until it reaches the
smallest granule size (4k) and then update all of these pages. This
appears to be due to a big in how is_aligned() is implemented, since
it only evaluates to true if addr and size are both multiples of the
current granule size, so a mapping aligned to 2M which is 4M in size
will cleanly result in 2 blocks being set, but a mapping aligned to
2M which is 4M + 8k in size will result in blocks being split and 1026
individual pages being set.

While for the address it is correct to enforce that it is aligned to
the current granule size, we only need to check if the region size is
greater than the current granule size. This allows us to simplify our
second example above to only 4 entries being updated (assuming no blocks
have to be split) since we only need to update 2 blocks to map the first
4M, drastically improving the best-case performance.

In the case where the address is 4k aligned rather than 2M aligned we
will still be restricted to mapping 4k pages until we reach 2M alignment
where we could then map a larger 2M granule which previously would never
happen.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agoarmv8: mmu: commonize the set_one_region() loop
Casey Connolly [Mon, 8 Jun 2026 17:13:50 +0000 (19:13 +0200)] 
armv8: mmu: commonize the set_one_region() loop

This loop is duplicated 3 times, put it into its own function and call
it instead. This simplifies the logic in a few functions.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoarmv8: mmu: teach the pagetable dumper to show explicit FAULT maps
Casey Connolly [Mon, 8 Jun 2026 17:13:49 +0000 (19:13 +0200)] 
armv8: mmu: teach the pagetable dumper to show explicit FAULT maps

When a region is explicitly unmapped (like with
mmu_change_region_attr(.... PTE_TYPE_FAULT)) the address translation
still remains but won't be used since the region is marked invalid.
Print these regions when we dump the pagetable to help with debugging.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoarmv8: mmu: add a function to help debug TLB lookups
Casey Connolly [Mon, 8 Jun 2026 17:13:48 +0000 (19:13 +0200)] 
armv8: mmu: add a function to help debug TLB lookups

Implement a super basic software TLB walk which can look up a single
address in the TLB and print each stage of the translation. This is
helpful for debugging TLB issues and will be compiled out if unused.

Example output on QEMU aarch64:

Performing software TLB lookup of address 0x50100000 va_bits: 40
  PTE: 0x47fe0000. addr[47:39]: 0x000 (offset 0x00000)
  L0: 0x47fe0000 -> TABLE (0x47fe1000)
    PTE: 0x47fe1000. addr[38:30]: 0x001 (offset 0x00008)
    L1: 0x47fe1008 -> BLOCK (0x40000000)
      [0x40000000 - 0x80000000]

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoMerge patch series "bootm: bound noload kernel decompression to the allocated buffer"
Tom Rini [Wed, 17 Jun 2026 15:54:27 +0000 (09:54 -0600)] 
Merge patch series "bootm: bound noload kernel decompression to the allocated buffer"

Aristo Chen <aristo.chen@canonical.com> says:

For a compressed kernel_noload image, bootm_load_os() allocates a
decompression buffer of ALIGN(image_len * 4, SZ_1M) and then passes
CONFIG_SYS_BOOTM_LEN (typically 128 MiB on arm64) to image_decomp() as
the output limit. The decompressors honour whatever limit they are
given, so a kernel that decompresses to more than four times its
compressed size runs past the end of the allocated buffer and silently
corrupts adjacent memory.

A 4x compression ratio is at the edge of what modern compressors
(zstd, xz) achieve on real kernels, and is trivially exceeded by
crafted, highly compressible payloads, so this is reachable both
accidentally and intentionally. The overflow can land on already-loaded
boot artefacts (FDT, ramdisk, loadables), U-Boot's own data, or
memory-mapped device registers; the existing post-decompression overlap
check in bootm_load_os() only catches overlap with the FIT itself.

Patch 1 plumbs the actual allocation size through to image_decomp() and
handle_decomp_error() via a single decomp_len variable, so
decompression stops at the buffer boundary and fails cleanly when the
image is too large. The non-noload code path is unchanged and continues
to use CONFIG_SYS_BOOTM_LEN. A clarifying note is printed when the
failure is gated by the per-image buffer, so the generic
"increase CONFIG_SYS_BOOTM_LEN" advice does not mislead.

Patch 2 raises the noload-decompression headroom from 4x to 8x. The 4x
factor is at the edge of what zstd and xz achieve on real kernels, so
well-compressed vendor kernels can fail to boot at runtime once the
bound is enforced. 8x covers them comfortably while remaining bounded.

Patch 3 adds two sandbox py-tests against the per-image buffer at the
final 8x value: one that exceeds the buffer and must be rejected, and
one that matches the buffer exactly and must succeed (guarding the
boundary).

Tested on sandbox: both new tests pass; the existing
test_fit_compressed_images_load (which covers the load-address path)
and the other tests in test/py/tests/test_fit.py continue to pass.

Link: https://lore.kernel.org/r/20260605154255.833334-1-aristo.chen@canonical.com
5 weeks agotest/py: test kernel_noload decompression buffer overflow
Aristo Chen [Fri, 5 Jun 2026 15:42:51 +0000 (15:42 +0000)] 
test/py: test kernel_noload decompression buffer overflow

Add sandbox tests that exercise the per-image decompression buffer that
bootm_load_os() allocates for a compressed kernel_noload image
(ALIGN(image_len * 8, SZ_1M)).

The overflow test builds a FIT whose decompressed size far exceeds the
per-image buffer and asserts that 'bootm loados' rejects it with a
decompression error rather than overflowing.

The boundary test builds a FIT whose decompressed size equals the
per-image buffer exactly and asserts that 'bootm loados' succeeds,
guarding against an off-by-one rejection at the buffer limit.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
5 weeks agobootm: increase kernel_noload decompression headroom from 4x to 8x
Aristo Chen [Fri, 5 Jun 2026 15:42:50 +0000 (15:42 +0000)] 
bootm: increase kernel_noload decompression headroom from 4x to 8x

For a compressed kernel_noload image, bootm_load_os() allocates a buffer
of ALIGN(image_len * 4, SZ_1M). The 4x factor is at the edge of what
modern compressors (zstd, xz) achieve on real kernels, so a
well-compressed vendor kernel can fail to boot at runtime with no
intervening warning.

Bump the headroom to 8x. The buffer is still bounded by the compressed
image size, and the SZ_1M alignment keeps the overhead below 1 MiB on
small kernels.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
5 weeks agobootm: fix overflow of the noload kernel decompression buffer
Aristo Chen [Fri, 5 Jun 2026 15:42:49 +0000 (15:42 +0000)] 
bootm: fix overflow of the noload kernel decompression buffer

For a compressed kernel_noload image, bootm_load_os() allocates a
decompression buffer sized to ALIGN(image_len * 4, SZ_1M), assuming the
kernel compresses by no more than a factor of four. It then passes
CONFIG_SYS_BOOTM_LEN, rather than the size of that buffer, to
image_decomp() as the output limit. The decompressors honour the limit
they are given, so a kernel that decompresses to more than four times
its compressed size is written past the end of the allocated buffer and
corrupts adjacent memory.

Pass the allocation size to image_decomp() and handle_decomp_error() so
decompression stops at the buffer boundary and fails cleanly when the
image is too large, instead of overflowing. The regular non-noload
paths are unchanged and continue to use CONFIG_SYS_BOOTM_LEN. When the
failure is triggered by the smaller per-image buffer, print a note so
that handle_decomp_error()'s generic advice to increase
CONFIG_SYS_BOOTM_LEN does not mislead the reader.

Fixes: 69544c4fd8b1 ("bootm: Support kernel_noload with compression")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
5 weeks agoMerge patch series "arm: omap: Add back omap4 support"
Tom Rini [Wed, 17 Jun 2026 15:52:33 +0000 (09:52 -0600)] 
Merge patch series "arm: omap: Add back omap4 support"

Bastien Curutchet <bastien.curutchet@bootlin.com> says:

This series aims to add back the omap4 support. This support was removed
by commit b0ee3fe642c ("arm: ti: Remove omap4 platform support") because
at that moment, none of the OMAP4-based boards had done the migration to
DM_I2C.
My use case is an old product based on the Variscite's omap4 system on
module. I needed to upgrade U-Boot on it for security reasons. I think
that this work could benefit to other people who may have same kind of
product to maintain.

Patch 1 to 3 remove the omap's clock driver dependency to the AM33xx
as it is also present in omap4 platforms. I tested these changes on the
beaglebone black to ensure I didn't break the AM33xx case.

Patch 4 & 5 revert the deletion of the omap4 support. The revert makes
checkpatch.pl angry. I fixed quite a lots of warnings already but it
remains two kinds of warnings:
- CamelCase on timings structure, I left the CamelCase because IMHO it's
  more readable this way.
- #ifdef CONFIG_XYZ shouldn't be used anymore. I left one of this because
  I didn't find a clean way to get rid of it.

Patch 6 adds support for the Variscite's system on module. This system on
module is supported by the Linux project through
ti/omap/omap4-var-som-om44.dtsi

Link: https://lore.kernel.org/r/20260608-omap4-support-v3-0-8595ccd203f0@bootlin.com
5 weeks agoboard: variscite: add support for the omap4_var_som
Bastien Curutchet [Mon, 8 Jun 2026 13:12:02 +0000 (15:12 +0200)] 
board: variscite: add support for the omap4_var_som

OMAP4 support is present but there isn't any board using it.

Add minimal support for the Variscite OMAP4-SoM (debug console + boot
from SD card).
Use the ti/omap/omap4-var-stk-om44 device-tree from the Linux kernel. The
real representation of the SoM's hardware is located in
ti/omap/omap4-var-som-om44.dtsi included in it.

Set myself as maintainer for it.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoarm: ti: Introduce back omap4 support
Bastien Curutchet [Mon, 8 Jun 2026 13:12:01 +0000 (15:12 +0200)] 
arm: ti: Introduce back omap4 support

omap4 support was dropped by b0ee3fe642c ("arm: ti: Remove omap4 platform
support") because the supported boards hadn't done the conversion to
CONFIG_DM_I2C in time. It still exists some omap4-based products and
they could benefit from the latest U-Boot support for obvious security
reasons.

Revert part of b0ee3fe642c to introduce back a minimal support for the
omap4 platform.
Fix the checkpatch's warning/errors induced by this revert. Following
warnings are still present:
| arch/arm/include/asm/arch-omap4/clock.h:445: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
| arch/arm/mach-omap2/omap4/hwinit.c:24: WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible
| arch/arm/mach-omap2/omap4/sdram_elpida.c:142: CHECK: Avoid CamelCase: <tRPab>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:143: CHECK: Avoid CamelCase: <tRCD>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:144: CHECK: Avoid CamelCase: <tWR>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:145: CHECK: Avoid CamelCase: <tRASmin>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:146: CHECK: Avoid CamelCase: <tRRD>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:147: CHECK: Avoid CamelCase: <tWTRx2>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:148: CHECK: Avoid CamelCase: <tXSR>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:149: CHECK: Avoid CamelCase: <tXPx2>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:150: CHECK: Avoid CamelCase: <tRFCab>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:151: CHECK: Avoid CamelCase: <tRTPx2>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:152: CHECK: Avoid CamelCase: <tCKE>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:153: CHECK: Avoid CamelCase: <tCKESR>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:154: CHECK: Avoid CamelCase: <tZQCS>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:155: CHECK: Avoid CamelCase: <tZQCL>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:156: CHECK: Avoid CamelCase: <tZQINIT>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:157: CHECK: Avoid CamelCase: <tDQSCKMAXx2>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:158: CHECK: Avoid CamelCase: <tRASmax>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:159: CHECK: Avoid CamelCase: <tFAW>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:209: CHECK: Avoid CamelCase: <tRL>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:210: CHECK: Avoid CamelCase: <tRP_AB>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:213: CHECK: Avoid CamelCase: <tRAS_MIN>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:215: CHECK: Avoid CamelCase: <tWTR>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:216: CHECK: Avoid CamelCase: <tXP>
| arch/arm/mach-omap2/omap4/sdram_elpida.c:217: CHECK: Avoid CamelCase: <tRTP>
I didn't find an clean way to fix the "don't use #ifdef" warning as we
need to define the gpio_bank for the SPL build only.
For the CamelCase warnings, the incriminated attributes represent
timings, so IMHO, it is more readable with CamelCase.

Set myself as OMAP4 maintainer.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoconfigs: omap4: remove unused boot target devices
Bastien Curutchet [Mon, 8 Jun 2026 13:12:00 +0000 (15:12 +0200)] 
configs: omap4: remove unused boot target devices

This include file isn't used since the omap4 support has been dropped.
Since this support is about to be reintroduced, this file is going to be
used again. The upcoming support is minimal and doesn't include network,
therefore leaving PXE and DHCP in the BOOT_TARGET_DEVICES list would lead
to build errors.

Remove PXE and DHCP from the list of BOOT_TARGET_DEVICES.
Remove the LEGACY_MMC macros and the findfdt script that looks for
no-longer supported boards.
Remove the empty #ifdef XPL_BUILD

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoclk: ti: Remove AM33xx dependency
Bastien Curutchet [Mon, 8 Jun 2026 13:11:59 +0000 (15:11 +0200)] 
clk: ti: Remove AM33xx dependency

The clock controller driven by this driver exists on other OMAP platforms
than the AM33xx. Yet, it uses functions provided by
arch/arm/mach-omap2/am33xx/clock.c making it unusable by other OMAPs.

Replace am33xx-specific do_{enable/disable}_clocks() with new static
functions implemented locally.
Replace the am33xx-specific clock header with the one shared by all OMAP
platforms.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoarm: ti: omap: Extract common clock definitions
Bastien Curutchet [Mon, 8 Jun 2026 13:11:58 +0000 (15:11 +0200)] 
arm: ti: omap: Extract common clock definitions

Lots of clock definitions are common to OMAP3, OMAP4 and OMAP5. So the
same macros are defined both in arch-am33xx/clock.h and in
arch-omap5/clock.h. Upcoming support for OMAP4 will again need the same
macros.

Group these common macro definitions into a common omap_clock header
shared across the OMAP2+ families.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoarm: omap: Move PRM I2C channel frequency to vc.c
Bastien Curutchet [Mon, 8 Jun 2026 13:11:57 +0000 (15:11 +0200)] 
arm: omap: Move PRM I2C channel frequency to vc.c

PRM_VC_I2C_CHANNEL_FREQ_KHZ is defined in omap5/clock.h but isn't really
related to clocks.

Since it's only used by mach-omap2/vc.c, move its definition there.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
5 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Tue, 16 Jun 2026 23:01:20 +0000 (17:01 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

This is a DRAM controller driver for the R-Car X5H and its enablement.
This makes the U-Boot on RSIP usable beyond U-Boot shell running on
Cortex-M33, as the U-Boot on RSIP can now load not only SCP firmware
into the SCP core STCM, but also TFA BL31, OPTEE-OS and U-Boot into DRAM
and start them on the Cortex-A720AE core. This is self-contained and
affects only the R-Car X5H and a bit of R-Car V4H, besides it went
through rounds of testing until now, therefore it is safe to include it
this late in the release cycle. I know this will make rc5 massive, sorry
about that.

5 weeks agoMerge tag 'u-boot-dfu-20260616' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Tue, 16 Jun 2026 14:57:04 +0000 (08:57 -0600)] 
Merge tag 'u-boot-dfu-20260616' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20260616

CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/30480

Android:
* Fix A/B slot selection when marked successful and tries = 0

Fastboot:
* Handle partial blk_dwrite() as errors instead of success

Usb Gadget:
* Atmel: Use calloc() to initialize endpoint list

5 weeks agoMakefile: let 'make clean' remove files created by DEVICE_TREE_DEBUG
Rasmus Villemoes [Thu, 11 Jun 2026 14:08:57 +0000 (16:08 +0200)] 
Makefile: let 'make clean' remove files created by DEVICE_TREE_DEBUG

Originally, 'make DEVICE_TREE_DEBUG=1' only generated extra output on
the console. But since 6cdd7597a2f ("kbuild: Produce diff between base
DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1"), that has also
left behind lots of files that clutter the repo and are hard to get
rid of manually.

Make sure that a 'make clean' will remove those files, and add them to
.gitignore.

Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoarm: dts: renesas: Enable DBSC5 on R-Car R8A78000 X5H Cortex-M33 RSIP port
Marek Vasut [Wed, 10 Jun 2026 18:20:59 +0000 (20:20 +0200)] 
arm: dts: renesas: Enable DBSC5 on R-Car R8A78000 X5H Cortex-M33 RSIP port

Bind the DBSC5 DRAM controller driver on boot in board_early_init_r(),
which brings up the DBSC5 DRAM controller and its PHY and which enables
access to DRAM present on this system.

Add default boot command which loads additional bootloader components
from HF and UFS storage into SRAM and DRAM, and starts those components
on SCP and AP core 0. The system is then capable of reaching U-Boot on
the AP core 0. Specifically, the following components are loaded:
- SCP firmware, 384 kiB from HF offset 0x4c0000 to SCP STCM
- TFA BL31, 256 kiB from UFS0 offset 0x5000 * 4 kiB sectors to DRAM 0x8c200000
- TEE, 2 MiB from UFS0 offset 0x5200 * 4 kiB sectors to DRAM 0x8c400000
- U-Boot, 1 MiB from UFS0 offset 0x7200 * 4 kiB sectors to DRAM 0x8c300000
- IPL parameters table is generated at DRAM address 0x8c100000

Enable pstore command support to allow dumping kernel console from
pstore/ramoops, which is convenient for debugging. Use as follows:
=> pstore set 0x80000000 0x10000 0x400 0x8000 0 0 0
=> pstore display console

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoram: renesas: dbsc5: Add Renesas R-Car Gen5 DBSC5 driver
Marek Vasut [Wed, 10 Jun 2026 18:20:58 +0000 (20:20 +0200)] 
ram: renesas: dbsc5: Add Renesas R-Car Gen5 DBSC5 driver

Add Renesas R-Car Gen5 DBSC5 DRAM controller driver. This driver is currently
capable of bringing LPDDR5X DRAM on Renesas R-Car X5H Ironhide board. Further
boards can be supported by supplying board specific DRAM configuration data
via dbsc5_get_board_data().

The driver reuses parts of previous DBSC5 driver, but due to hardware changes,
can not be fully integrated into existing DBSC and DRAM driver, therefore the
currentl DBSC and DRAM drivers are moved into R8A779G0 V4H specific files, and
the R8A78000 X5H files are added in parallel.

The Gen5 DBSC driver is meant to be used in RSIP context, while the Gen4 DBSC
driver is meant to be used in SPL, therefore the Kconfig conditionals have been
adjusted to match.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoram: renesas: rtvram: Add support for Renesas R-Car Gen5
Marek Vasut [Wed, 10 Jun 2026 18:20:57 +0000 (20:20 +0200)] 
ram: renesas: rtvram: Add support for Renesas R-Car Gen5

Add support for Renesas R-Car Gen5 R8A78000 SoC into RT-VRAM
initialization driver. The changes are only a slight adjustment
to the register programming, therefore reuse the existing RT-VRAM
driver and parametrize those changes using driver data.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agolmb: Add the Rockchip architecture as requiring DMA below 4G
Heiko Stuebner [Sat, 13 Jun 2026 17:24:44 +0000 (19:24 +0200)] 
lmb: Add the Rockchip architecture as requiring DMA below 4G

Loading EFI parts like a Debian-Installer on Rockchip SoCs creates
interesting results, in that on some boards the Grub bootloader can't
find any partitions on a USB-Stick, or loading a kernel from Grub spews
    EHCI fail timeout STS_IAA set
messages before failing and on others the loading something like efivars
from an eMMC creates read errors and making the MMC vanish from U-Boot.

This only affected boards with at least 4GB of RAM.

These boards have at least 256MB of memory placed above the actual 4GB
address space (due to the iomem being in between) and while kernel,
initramfs, dt are generally loaded to predefined addresses, additional
EFI parts (efivars, etc) are likely just loaded "somewhere" and it seems
this always landed in that higher up memory part.

Also in the Linux-kernel peripherals like EMMC, USB, etc already run
with a 32bit dma-mask set.

So far, I've seen this on RK3568 and RK3588, but as the same peripherals
are used on most Rockchip SoCs, it makes sense to limit this on all.

So add ARCH_ROCKCHIP to the default-y list of LMB_LIMIT_DMA_BELOW_RAM_TOP.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
5 weeks agoMerge patch series "Repair boards broken by the 6.1 kbuild bump"
Tom Rini [Mon, 15 Jun 2026 18:50:04 +0000 (12:50 -0600)] 
Merge patch series "Repair boards broken by the 6.1 kbuild bump"

Simon Glass <sjg@chromium.org> says:

Commit bd3f9ee679b4 added FORCE to several if_changed rules whose
recipes expand $^, so FORCE leaks in as a stray argument and the
command fails. Use $< to restore the Edison and i.MX23/28 images.

Link: https://lore.kernel.org/r/20260613130519.1516808-1-sjg@chromium.org
5 weeks agoarm: mxs: Avoid passing FORCE to commands
Simon Glass [Sat, 13 Jun 2026 13:05:13 +0000 (07:05 -0600)] 
arm: mxs: Avoid passing FORCE to commands

Commit bd3f9ee679b4 ("kbuild: Bump the build system to 6.1") adds FORCE
as a prerequisite to the if_changed rules here, but the commands use $^
so FORCE leaks in as a stray operand. The dd in cmd_mkalign_mxs fails
(silently, since its stderr is discarded) and the binary is never
aligned, stat in cmd_mkivt_mxs emits an error and cst receives a bogus
argument.

Use $< and $(real-prereqs) instead, which exclude FORCE.

Fixes: bd3f9ee679b4 ("kbuild: Bump the build system to 6.1")
Signed-off-by: Simon Glass <sjg@chromium.org>
5 weeks agox86: edison: Avoid passing FORCE to the align command
Simon Glass [Sat, 13 Jun 2026 13:05:12 +0000 (07:05 -0600)] 
x86: edison: Avoid passing FORCE to the align command

Commit bd3f9ee679b4 ("kbuild: Bump the build system to 6.1") adds FORCE
as a prerequisite to the u-boot-align.bin rule, but cmd_mkalign_eds
expands $^, so FORCE leaks in as a stray operand. The dd then fails
(silently, since its stderr is discarded) and the following mv never
runs, so u-boot.bin never gains its 4096-byte zero prefix. The mask ROM
enters U-Boot 0x1000 (4KB) into the image and the board never starts,
sitting in BootROM download mode (DnX).

Use $< instead of $^, which excludes FORCE and restores the prefix.

Fixes: bd3f9ee679b4 ("kbuild: Bump the build system to 6.1")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
5 weeks agoMerge patch series "various memory related fixups"
Tom Rini [Mon, 15 Jun 2026 17:04:48 +0000 (11:04 -0600)] 
Merge patch series "various memory related fixups"

rs@ti.com <rs@ti.com> says:

From: Randolph Sapp <rs@ti.com>

Nitpicks and fixes from the discovery thread on adding PocketBeagle2 support
[1]. This does a lot of general setup required for the device, but these
modifications themselves aren't device specific. For those specifically
interested in PocketBeagle2 support and don't care about these details, my
development branch is public [2].

That first patch may provoke some opinions, but honestly if that warning was
still present I wouldn't have spent a week poking holes in both the EFI and LMB
allocations systems. Please let me know if there is a specific usecase that it
breaks though.

[1] https://lore.kernel.org/all/DHHC66BBMD27.YHGIH43C6XBK@ti.com/
[2] https://github.com/StaticRocket/u-boot/tree/feature/pocketbeagle2

Link: https://lore.kernel.org/r/20260604155038.3182-1-rs@ti.com
5 weeks agomemory: reserve from start_addr_sp to initial_relocaddr
Randolph Sapp [Thu, 4 Jun 2026 15:50:38 +0000 (10:50 -0500)] 
memory: reserve from start_addr_sp to initial_relocaddr

Add a new global data struct member called initial_relocaddr. This
stores the original value of relocaddr, directly from setup_dest_addr.
This is specifically to avoid any adjustments made by other init
functions.

Reserve the memory from gd->start_addr_sp - CONFIG_STACK_SIZE to
gd->initial_relocaddr instead of gd->ram_top. This allows platform
specific relocation addresses to work without unnecessarily painting
over a large range.

Signed-off-by: Randolph Sapp <rs@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotest: boot: add a fdt reserved region check
Randolph Sapp [Thu, 4 Jun 2026 15:50:37 +0000 (10:50 -0500)] 
test: boot: add a fdt reserved region check

Add a image_fdt suite and a check for boot_fdt_add_mem_rsv_regions. This
will ensure the user is properly informed of any reservation failures.
It will also validate that reservations are cleaned up correctly when
switching FDTs.

Signed-off-by: Randolph Sapp <rs@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotest_ut: add a ut_ubman fixture to clean up tests
Randolph Sapp [Thu, 4 Jun 2026 15:50:36 +0000 (10:50 -0500)] 
test_ut: add a ut_ubman fixture to clean up tests

Add a ut_ubman fixture to clean up after certain problematic tests
without negatively affecting the current assert based testing.

Currently this catches "bootstd bootflow_cmd_boot" and "bootstd
bootflow_scan_boot" ut_subtests, as these will change the sandbox state
a little too much to be recoverable from.

Signed-off-by: Randolph Sapp <rs@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoboot: image-fdt: free old dtb reservations
Randolph Sapp [Thu, 4 Jun 2026 15:50:35 +0000 (10:50 -0500)] 
boot: image-fdt: free old dtb reservations

Add a free flag and an initial call to free allocations covered by the
global FDT. This assumes that all calls to boot_fdt_add_mem_rsv_regions
occur before the transition to the new device tree, thus we can access
the currently active device tree through the global data pointer.

This allows us to clearly indicate to the user when a device tree
reservation fails. How we handle this can still use some improvement.
Right now we'll keep the default behavior and try to boot anyway.

Fixes: 5a6aa7d5913 ("boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()")
Signed-off-by: Randolph Sapp <rs@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fixes: tag with a 12-char hash:
Fixes: 5a6aa7d59133 ("boot: fdt: Handle already reserved memory in
5 weeks agousb: gadget: atmel: use calloc() to allocate endpoint list
Zixun LI [Sat, 6 Jun 2026 08:27:09 +0000 (10:27 +0200)] 
usb: gadget: atmel: use calloc() to allocate endpoint list

malloc() doesn't zero out memory, leaving ep->ep.enabled uninitiated,
which could make this flag falsely true.

In next usb_ep_enable() call since this flag is true, ep->ops->enable()
will be skipped. Then usb_ep_queue() will fail on uninitialized endpoint.

Fixes: 59310d1ecb9f ("usb: gadget: introduce 'enabled' flag in struct usb_ep")
Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Marek Vasut <marek.vasut+usb@mailbox.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://patch.msgid.link/20260606-udc_malloc-v2-1-1155326b182b@hifiphile.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 weeks agoandroid_ab: fix slot selection
Colin Pinnell McAllister [Mon, 25 May 2026 00:31:58 +0000 (00:31 +0000)] 
android_ab: fix slot selection

The boot selection rules state that a slot is bootable if it is not
corrupted and either has tries remaining or has already booted
successfully. However, slots that have tries_remaining == 0 and
successful_boot == 1 will be disregarded when picking the slot to
attempt.

Updates the selection logic so slots marked successful remain eligible
even when their tries counter is zero. Debug message now also includes
the successful_boot value.

Signed-off-by: Colin Pinnell McAllister <colinmca242@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://patch.msgid.link/20260525003158.11319-1-colinmca242@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 weeks agofastboot: Fix blk_dwrite error checking
Francois Berder [Sun, 24 May 2026 19:25:47 +0000 (21:25 +0200)] 
fastboot: Fix blk_dwrite error checking

blk_dwrite() returns the number of blocks written.
The code was only checking if the return value was different
than 0. Hence, partial writes were considered successful.
Fix blk_dwrite error handling by checking that all blocks
are written.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://patch.msgid.link/BESP194MB2805BBD03E7C92727F116585DA0D2@BESP194MB2805.EURP194.PROD.OUTLOOK.COM
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 14 Jun 2026 21:35:00 +0000 (15:35 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

Two fixes for R-Car Gen5 RSIP, one to surely build u-boot-elf.shdr and
one to make u-boot-elf.shdr compatible with tooling.

Two fixes for R-Car Gen4, which could hang in SPL without them.

5 weeks agoarm64: renesas: Initialize GIC600 fully on R-Car S4/V4H/V4M
Marek Vasut [Sun, 14 Jun 2026 01:52:21 +0000 (03:52 +0200)] 
arm64: renesas: Initialize GIC600 fully on R-Car S4/V4H/V4M

ARM GIC-600 IP complies with ARM GICv3 architecture, but among others,
implements a power control register in the Redistributor frame. This
register must be programmed to mark the frame as powered on, before
accessing other registers in the frame.

Before the switch to generic lowlevel_init function, this did not pose
a problem as the previous custom lowlevel_init did not access the GICR
registers. The generic function does and that does lead to a hang early
in SPL. Enable the GIC600 initialization variant to mitigate the hang.

Fixes: 37997a214ed1 ("arm: renesas: Use stock lowlevel_init function and remove s_init")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoarm64: renesas: Fold mach_cpu_init into board_init_f on R-Car S4/V4H/V4M SPL
Marek Vasut [Sun, 14 Jun 2026 01:52:08 +0000 (03:52 +0200)] 
arm64: renesas: Fold mach_cpu_init into board_init_f on R-Car S4/V4H/V4M SPL

The mach_cpu_init() function is not invoked in SPL. Instead of
having two functions, fold mach_cpu_init() into board_init_f(),
which is called very early in the boot process and assures that
the CPG and APMU setup will be invoked before DM is brought up.

Fixes: 37997a214ed1 ("arm: renesas: Use stock lowlevel_init function and remove s_init")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoMerge branch 'assorted-fit-validation-fixes' into next
Tom Rini [Sat, 13 Jun 2026 16:38:08 +0000 (10:38 -0600)] 
Merge branch 'assorted-fit-validation-fixes' into next

This brings in a number of FIT image validation fixes from Anton Ivanov
<anton@binarly.io> that have security implications.

5 weeks agofdt: Check return value of fdt_get_name() calls
Anton Ivanov [Tue, 2 Jun 2026 18:27:52 +0000 (19:27 +0100)] 
fdt: Check return value of fdt_get_name() calls

fdt_get_name() can return NULL and set len to a negative error code.
fdt_find_regions() does not check for this, leading to a potential NULL
pointer dereference and a buffer out-of-bounds write during signature
verification of an untrusted FIT. fdt_next_region(), fdt_check_full(),
and display_fdt_by_regions() also lack validation.

Add NULL checks and propagate the error code from fdt_get_name()
to the caller.

Signed-off-by: Anton Ivanov <anton@binarly.io>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoarm: renesas: Make R-Car Gen5 u-boot-elf.shdr compatible with SDK flash_writer
Marek Vasut [Thu, 11 Jun 2026 18:05:58 +0000 (20:05 +0200)] 
arm: renesas: Make R-Car Gen5 u-boot-elf.shdr compatible with SDK flash_writer

The SDK 4.32 flash_writer tool, built from the SDK IPL source, requires
SREC S7 "Start address (termination)" record [1] at the end of the SREC
file that is sent to it during installation of content into storage,
otherwise the tool waits for the S7 record indefinitelly and the payload
does not get installed into storage.

Specifically, the tool considers SREC S3 and S7 records as mandatory,
S0, S5, S6 as ignored, and any other records as unsupported.

Configure srec_cat such that it explicitly generates the trailing S7
record, and also that it never generates the ignored S5 Count record.
This fixes installation of u-boot-elf.shdr using the flash_writer tool,
which can not finish successfully without the trailing S7 record.

[1] https://en.wikipedia.org/wiki/Motorola_S-record#Record_types

Fixes: 3b2ce3743c1a ("arm: renesas: Generate u-boot-elf.shdr for R-Car Gen5 RSIP")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoarm: renesas: Build u-boot-elf.shdr for R-Car X5H Cortex-M33 RSIP port
Marek Vasut [Thu, 11 Jun 2026 18:04:26 +0000 (20:04 +0200)] 
arm: renesas: Build u-boot-elf.shdr for R-Car X5H Cortex-M33 RSIP port

Currently, the default build target for all R-Car Gen3/4/5 is the
u-boot-elf.srec, which depends on u-boot.bin and other vital build
artifacts, which get built as prerequisites. The R-Car Gen5 RSIP
port benefits from u-boot-elf.shdr being built as well, because the
u-boot-elf.shdr contains header used by the BootROM to load and
start U-Boot on the RSIP core. Because u-boot-elf.shdr depends on
u-boot-elf.srec, switch the default build target for R-Car Gen5
RSIP port to u-boot-elf.shdr. This way, both u-boot-elf.shdr and
u-boot-elf.srec are built for R-Car Gen5 RSIP port.

Fixes: 9d47a5a4d560 ("arm: renesas: Add Renesas R-Car R8A78000 X5H Cortex-M33 RSIP port")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoimage-fit: Validate external data offset and size
Anton Ivanov [Thu, 4 Jun 2026 10:39:50 +0000 (11:39 +0100)] 
image-fit: Validate external data offset and size

fit_image_get_data() uses the data-position, data-offset, and
data-size FIT properties without bounds checking. A crafted FIT
image can specify values that cause out-of-bounds read during
signature verification of an untrusted FIT.

Validate that the external data offset and size are non-negative,
and that the data region fits within the FIT image bounds.

Signed-off-by: Anton Ivanov <anton@binarly.io>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoimage-fit: Limit recursion depth in fdt_check_no_at()
Anton Ivanov [Tue, 2 Jun 2026 18:31:30 +0000 (19:31 +0100)] 
image-fit: Limit recursion depth in fdt_check_no_at()

fdt_check_no_at() recurses into every subnode without a depth
limit. A deeply nested FIT image can exhaust the stack and crash
U-Boot during signature verification of an untrusted FIT.

Add a depth check using FDT_MAX_DEPTH to bound the recursion.

Signed-off-by: Anton Ivanov <anton@binarly.io>
5 weeks agofdt_region: Check return value of fdt_get_property_by_offset() calls
Anton Ivanov [Tue, 2 Jun 2026 18:30:17 +0000 (19:30 +0100)] 
fdt_region: Check return value of fdt_get_property_by_offset() calls

fdt_get_property_by_offset() returns NULL for FDT with version
less than 0x10. fdt_find_regions() dereferences the result without
checking, leading to a NULL pointer dereference during signature
verification of an untrusted FIT. fdt_add_alias_regions() and
fdt_next_region() also lack validation.

Add NULL checks before accessing the returned property pointer.
Also add a missing NULL check for fdt_string() in
fdt_add_alias_regions() and fdt_next_region().

Signed-off-by: Anton Ivanov <anton@binarly.io>
5 weeks agoimage-fit-sig: Validate hashed-strings region size
Anton Ivanov [Tue, 2 Jun 2026 18:29:25 +0000 (19:29 +0100)] 
image-fit-sig: Validate hashed-strings region size

fit_config_check_sig() reads the hashed-strings property and uses
its size value without validation when building the region list for
signature verification. A crafted FIT image can specify an arbitrary
size, causing the hash calculation to read beyond the end of the FIT
image. The property length is also not checked, so a truncated
hashed-strings property causes strings[1] to be read past the end of
the property. This may result in the out-of-bounds read during signature
verification of an untrusted FIT.

Validate both the property length and that the declared strings region
fits within bounds before adding it to the region list.

Signed-off-by: Anton Ivanov <anton@binarly.io>
5 weeks agoMerge patch series "arm: am335x: Switch to upstream devicetree"
Tom Rini [Fri, 12 Jun 2026 19:01:32 +0000 (13:01 -0600)] 
Merge patch series "arm: am335x: Switch to upstream devicetree"

"Markus Schneider-Pargmann (TI)" <msp@baylibre.com> says:

The series is split into two logical groups:

- Patches 1-3: Fixes for am335x-evm to boot and support the LCD panel
  with the current u-boot devicetree.
- Patches 4-17: Make upstream devicetree working with uboot. This
  adds tick-timer, adds compatibility of the board code for different
  USB probing, makes SPL smaller and updates the defconfig.

The series has been tested on am335x-evm. Note that I don't have all
other boards built with the am335x_*evm_*defconfig, so tests are
appreciated. buildman reports builds are working.

Link: https://lore.kernel.org/r/20260601-topic-am33-evm-oftree-v2026-01-v8-0-2c33c98e7ce5@baylibre.com/
5 weeks agoarm: dts: Move remaining am335x-bone* to OF_UPSTREAM
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:52 +0000 (11:30 +0200)] 
arm: dts: Move remaining am335x-bone* to OF_UPSTREAM

These boards are not yet in the CONFIG_OF_LIST of the defconfigs, add
them and remove the local devicetrees.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoarm: mach-omap2: Use dt_dir for devicetree paths
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:51 +0000 (11:30 +0200)] 
arm: mach-omap2: Use dt_dir for devicetree paths

Use dt_dir for the substitution of the DT paths to get the correct paths
even when switching to OF_UPSTREAM.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoMakefile: Move dt_dir definition
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:50 +0000 (11:30 +0200)] 
Makefile: Move dt_dir definition

dt_dir should be usable within architecture Makefiles. Move the
definition of dt_dir above the architecture include.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agodm: core: Remove dependency on CLK
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:49 +0000 (11:30 +0200)] 
dm: core: Remove dependency on CLK

CLK is an optional dependency of simple-pm-bus. Remove the dependency.

Fixes: 447bd8f1e5cf ("simple-pm-bus: Make clocks optional")
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoarm: dts: am335x: Remove unused uboot devicetrees
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:48 +0000 (11:30 +0200)] 
arm: dts: am335x: Remove unused uboot devicetrees

These devicetrees are not used anymore because the boards are using
upstream devicetrees now.

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoconfigs: am335x_evm_defconfig: Switch to upstream devicetree
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:47 +0000 (11:30 +0200)] 
configs: am335x_evm_defconfig: Switch to upstream devicetree

The upstream devicetree uses simple-pm-bus, so CONFIG_POWER_DOMAIN is
required now. CONFIG_POWER_DOMAIN enables probing power domains, the PRM
power domain driver is requierd as well now.

CONFIG_PHANDLE_CHECK_SEQ is now needed as many device nodes are now
named for example mmc@0.

This switches all evm defconfig variants to use the upstream devicetree.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
5 weeks agodm: core: Split SIMPLE_PM_BUS into phases
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:46 +0000 (11:30 +0200)] 
dm: core: Split SIMPLE_PM_BUS into phases

Similar to SIMPLE_BUS, create a SPL_SIMPLE_PM_BUS additional to the
SIMPLE_PM_BUS. Most boards will not need SIMPLE_PM_BUS in SPL.

This is currently needed to reduce the SPL size for beagle bone black
with OF_UPSTREAM enabled.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoam33xx: Support upstream devicetree USB device
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:45 +0000 (11:30 +0200)] 
am33xx: Support upstream devicetree USB device

Support musb being probed by ti,musb-am33xx. The non-upstream DT probing
used a wrapper driver that probed ti-musb-peripheral and ti-musb-host.
This wrapper registered as UCLASS_MISC, which is why it is requested in
this board.c file.

With the new devicetree the wrapper that registers as UCLASS_MISC is
gone, instead the UCLASS_USB and UCLASS_USB_GADGET_GENERIC have to be
requested.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoam33xx: Fix comment about config symbols
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:44 +0000 (11:30 +0200)] 
am33xx: Fix comment about config symbols

Fix #else and #endif comments to match actual #if condition. Comments
incorrectly referenced CONFIG_USB_MUSB_* instead of CONFIG_AM335X_USB*
and CONFIG_XPL_BUILD.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoarm: dts: am335x-boneblack-u-boot: Add lcdc to all boot phases
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:43 +0000 (11:30 +0200)] 
arm: dts: am335x-boneblack-u-boot: Add lcdc to all boot phases

This is required for am335x to boot correctly.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoarm: dts: am335x-*-u-boot: Add chosen tick-timer
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:42 +0000 (11:30 +0200)] 
arm: dts: am335x-*-u-boot: Add chosen tick-timer

Upstream devicetrees do not have a binding for the tick-timer. Add it
for all boards built with the am335x_evm_defconfig.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoam33xx: Avoid hard failure on USB probe issue
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:41 +0000 (11:30 +0200)] 
am33xx: Avoid hard failure on USB probe issue

Currently if USB fails to probe, U-Boot does not reach the console.

This patch does not fail if USB fails to probe making it easier to debug
in case of issues.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoconfigs: am335x_evm: Unify evm board defconfigs
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:40 +0000 (11:30 +0200)] 
configs: am335x_evm: Unify evm board defconfigs

Much of the config symbols between the evm boards are the same
independent of the actual board. This patch creates a hierarchy for the
am335x_evm configs:

  am335x_evm.config
  `-> am335x_evm_defconfig
  `-> am335x_evm_spiboot_defconfig
  `-> am335x_hs_evm.config
      `-> am335x_hs_evm_defconfig
      `-> am335x_hs_evm_uart_defconfig

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoconfigs: am335x_evm: Enable SPL_OPTIMIZE_INLINING
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:39 +0000 (11:30 +0200)] 
configs: am335x_evm: Enable SPL_OPTIMIZE_INLINING

Enable SPL inline optimization to shrink the size. After enabling
OF_UPSTREAM the size is otherwise too big. Enable it before enabling
OF_UPSTREAM to maintain bisect ability.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
5 weeks agoinclude: configs: am335x_evm: Enable vidconsole
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:38 +0000 (11:30 +0200)] 
include: configs: am335x_evm: Enable vidconsole

Enable vidconsole for the am335x-evm board.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
5 weeks agoconfigs: am335x_evm_defconfig: Enable panel
Markus Schneider-Pargmann (TI) [Mon, 1 Jun 2026 09:30:37 +0000 (11:30 +0200)] 
configs: am335x_evm_defconfig: Enable panel

Enable LCD panel support on am335x-evm:
 - CLK_CCF and CLK_TI_* for display clock tree
 - DM_PWM and PWM_TI_ECAP for backlight control
 - VIDEO and AM335X_LCD for display controller

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>