]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
12 days agonitrogen6x: change maintainer
Simon Gaynor [Thu, 4 Dec 2025 21:29:21 +0000 (13:29 -0800)] 
nitrogen6x: change maintainer

Simon Gaynor shall be the new maintainer

Signed-off-by: Simon Gaynor <simon.gaynor@ezurio.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 days agoconfigs: colibri-imx8x: use default for SYS_MALLOC_F_LEN
Max Krummenacher [Thu, 4 Dec 2025 16:41:29 +0000 (17:41 +0100)] 
configs: colibri-imx8x: use default for SYS_MALLOC_F_LEN

Drop setting an explicit value for SYS_MALLOC_F_LEN. This increases
the available space to 0x10000.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
12 days agoconfigs: apalis-imx8: use default for SYS_MALLOC_F_LEN
Max Krummenacher [Thu, 4 Dec 2025 16:41:28 +0000 (17:41 +0100)] 
configs: apalis-imx8: use default for SYS_MALLOC_F_LEN

Drop setting an explicit value for SYS_MALLOC_F_LEN. This increases
the available space to 0x10000.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
12 days agoimx9: scmi: soc: USB instance number change for silicon revision B0
Fedor Ross [Mon, 1 Dec 2025 16:08:06 +0000 (17:08 +0100)] 
imx9: scmi: soc: USB instance number change for silicon revision B0

For silicon revision A1, the USB instance number for USB1 is 3 and for
USB2 it is 4. This changed for revision B0 where the USB instance number
for USB1 is 0 and for USB2 it is 1, which is the intended instance
number. Select the correct numbering according to the selected SoC
(IMX95) and its revision.

This patch is based on the information provided by:
"AN14750 Migration Guide from i.MX 95 A1 to B0; Rev. 1.0" .

Reviewed-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
12 days agoimx93-u-boot: use nxp-imx9image etype for binman node
Jérémie Dautheribes (Schneider Electric) [Thu, 27 Nov 2025 17:29:20 +0000 (18:29 +0100)] 
imx93-u-boot: use nxp-imx9image etype for binman node

Similar to the imx95, use the nxp-imx9image etype for the binman node to
facilitate further modifications.

Signed-off-by: Jérémie Dautheribes (Schneider Electric) <jeremie.dautheribes@bootlin.com>
12 days agoimx93-u-boot: move binman description
Jérémie Dautheribes (Schneider Electric) [Thu, 27 Nov 2025 17:29:19 +0000 (18:29 +0100)] 
imx93-u-boot: move binman description

No functional changes, only cosmetic adjustments to prepare for the next
commit.

Signed-off-by: Jérémie Dautheribes (Schneider Electric) <jeremie.dautheribes@bootlin.com>
13 days agoMerge patch series "clk: Return value calculated by ERR_PTR"
Tom Rini [Fri, 5 Dec 2025 23:03:36 +0000 (17:03 -0600)] 
Merge patch series "clk: Return value calculated by ERR_PTR"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported an error where a value calculated by ERR_PTR was not
used. Fixing this to return the generated value led to a test failure
which meant updating the sandbox clock code so that it would still cause
the tests to pass with the above correction.
Debugging this problem led to a SIGSEGV which is addressed in 1/3.
Possible memory leaks noticed are addressed in 3/3.

Link: https://lore.kernel.org/r/20251121-clk_uclass_fix-v2-0-74f4ea10e194@linaro.org
13 days agoclk: Prevent memory leak on error
Andrew Goodbody [Fri, 21 Nov 2025 17:34:33 +0000 (17:34 +0000)] 
clk: Prevent memory leak on error

In clk_set_default_rates() memory is allocated to store the clock rates
that are read. Direct returns fail to free this memory leading to a
memory leak so instead use 'goto fail;' which will then perform the free
before exiting the function.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
13 days agoclk: Return value calculated by ERR_PTR
Andrew Goodbody [Fri, 21 Nov 2025 17:34:32 +0000 (17:34 +0000)] 
clk: Return value calculated by ERR_PTR

In clk_set_default_get_by_id ret is passed to ERR_PTR but nothing is
done with the value that this calculates which is obviously not the
intention of the code. This is confirmed by the code around where this
function is called.
Instead return the value from ERR_PTR.

Then fixup the sandbox code so that the test dm_test_clk does not fail
as it relied on the broken behaviour.

Finally disable part of the test that does not work correctly with
CLK_AUTO_ID

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
13 days agoclk: Prevent SIGSEGV on debug
Andrew Goodbody [Fri, 21 Nov 2025 17:34:31 +0000 (17:34 +0000)] 
clk: Prevent SIGSEGV on debug

If LOG_DEBUG is defined and a NULL clk is passed to clk_enable or
clk_disable then an attempt is made to dereference NULL in the debug
statement. Guard against this.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
13 days agoreboot-mode: Correct macro name from U_BOOT_DEVICE to U_BOOT_DRVINFO
Cibil Pankiras [Thu, 20 Nov 2025 13:32:00 +0000 (14:32 +0100)] 
reboot-mode: Correct macro name from U_BOOT_DEVICE to U_BOOT_DRVINFO

The macro U_BOOT_DEVICE has been renamed to U_BOOT_DRVINFO.
This patch updates the reference in reboot-mode-gpio.h.

Signed-off-by: Cibil Pankiras <cibil.pankiras@egym.com>
13 days agoboot: Check noffset before use
Marek Vasut [Thu, 20 Nov 2025 04:15:30 +0000 (05:15 +0100)] 
boot: Check noffset before use

If noffset is negative, do not pass it to fit_get_name() and then further to
libfdt, this will crash sandbox with SIGSEGV because libfdt can not handle
negative node offsets without full tree check, which U-Boot inhibits to keep
size lower.

Instead, always check noffset before use, and if the return value indicates
failure, exit right away.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
13 days agoconfigs: am64x, am65x: add CONFIG_DA8XX_GPIO
Anshul Dalal [Thu, 20 Nov 2025 09:31:27 +0000 (15:01 +0530)] 
configs: am64x, am65x: add CONFIG_DA8XX_GPIO

The DA8xx GPIO driver was not being built as part of the A53 U-Boot
image on AM64x and AM65x. This meant only i2c GPIO expanders were
accessible to the users from the U-Boot prompt.

This patch fixes it by setting CONFIG_DA8XX_GPIO.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
13 days agoboard: ti: CAT24C256WI-GT3 require min. 5ms delay (tWR) between write/read
Marian Cingel [Sat, 8 Nov 2025 23:23:25 +0000 (23:23 +0000)] 
board: ti: CAT24C256WI-GT3 require min. 5ms delay (tWR) between write/read

Otherwise the custom-cape eeprom (at address 57) reports NACK which
results into "i2c_write: error waiting for data ACK (status=0x116)" and
terminates further scanning.

Signed-off-by: Marian Cingel <cingel.marian@gmail.com>
13 days agoautoboot: Fix inconsistent countdown output
Sam Protsenko [Mon, 27 Oct 2025 00:24:58 +0000 (19:24 -0500)] 
autoboot: Fix inconsistent countdown output

Commit 5f70be08b015 ("Fix autoboot countdown printing wrong") introduces
inconsistency in how the countdown is displayed. For example, in case
when BOOTDELAY=5, the next output is observed during the boot:

    Hit any key to stop autoboot:  5
    Hit any key to stop autoboot: 4
    Hit any key to stop autoboot: 3

That happens due to different printf format (%2d vs %1d). Moreover, the
mentioned commit fails to handle the case when the user is holding some
key before the countdown is shown. E.g. if BOOTDELAY=101, the next
malformed output is being produced:

    Hit any key to stop autoboot: 1 0

That's because the fast path code wasn't modified accordingly, and still
tries to erase the number using '\b\b\b' format.

Fix both issues by introducing a dedicated routine for printing the
whole countdown line.

Fixes: 5f70be08b015 ("Fix autoboot countdown printing wrong")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: David Zang <davidzangcs@gmail.com>
13 days agoexamples: Fix checking id parameter in thread_start
Francois Berder [Sat, 22 Nov 2025 20:45:02 +0000 (21:45 +0100)] 
examples: Fix checking id parameter in thread_start

lthreads is of size MAX_THREADS, hence id must be lower than
MAX_THREADS to avoid any potential buffer overflow in
thread_start function.

Signed-off-by: Francois Berder <fberder@outlook.fr>
13 days agofs/erofs: Fix realloc error handling
Francois Berder [Tue, 11 Nov 2025 12:49:30 +0000 (13:49 +0100)] 
fs/erofs: Fix realloc error handling

If realloc failed, raw was not freed and thus memory
was leaked.

Signed-off-by: Francois Berder <fberder@outlook.fr>
13 days agofirmware: ti_sci: Fix memory leaks in devm_ti_sci_get_of_resource
Francois Berder [Tue, 11 Nov 2025 10:30:19 +0000 (11:30 +0100)] 
firmware: ti_sci: Fix memory leaks in devm_ti_sci_get_of_resource

- Fix temp memory leak
- Free memory during error handling

Signed-off-by: Francois Berder <fberder@outlook.fr>
13 days agoclk: ti: Tighten some TI clock driver dependencies
Tom Rini [Mon, 6 Oct 2025 15:38:59 +0000 (09:38 -0600)] 
clk: ti: Tighten some TI clock driver dependencies

Attempting to build with "allyesconfig" means that we try and build all
available options for the sandbox platforms. Doing so exposes that the
drivers under drivers/clk/ti/ can only be compiled or linked on
ARCH_OMAP2PLUS platforms as some drivers require platform specific
headers while other drivers depend on these first drivers to link.
Express those requirements in Kconfig as well.

Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
13 days agomtd: Tighten some driver dependencies
Tom Rini [Fri, 26 Sep 2025 15:31:40 +0000 (09:31 -0600)] 
mtd: Tighten some driver dependencies

The ALTERA_QSPI driver conflicts with the regular FLASH_CFI_DRIVER as
both implement the same high level functionality and so use the same
global namespace. In a similar fashion, all NAND drivers are mutually
exclusive due to namespace collisions. For the remaining drivers which
did not already have some architecture specific dependency, add them.

Signed-off-by: Tom Rini <trini@konsulko.com>
13 days agoMerge patch series "led: remove unused legacy LED code"
Tom Rini [Fri, 5 Dec 2025 19:38:32 +0000 (13:38 -0600)] 
Merge patch series "led: remove unused legacy LED code"

Quentin Schulz <quentin.schulz@cherry.de> says:

Only the Siemens corvus board seems to be using these two status LEDs
from the legacy LED API.

Since we're trying to get rid of the last users of the legacy LED API,
let's migrate Corvus to the modern LED API instead, which uses DM. For
Corvus's case, it also uses DM_GPIO (already enabled in defconfig).

Since there was no use for the green status_led (not compiled in), it
simply is removed without migrating it to the modern API. If need be, we
can always add a new gpio-led in the FDT.

Note that I do not own a Siemens Corvus board so it's a bit of a shot in
the dark whether it'll work on the first try, only build tested.

The red LED should be on whenever reaching U-Boot proper CLI, if not we
have an issue.

The LED should be controllable with the led command from U-Boot proper
CLI.

Link: https://lore.kernel.org/r/20251119-corvus-led-red-green-v1-0-ce86b8d59dfc@cherry.de
13 days agoled: remove support for red LED in legacy API
Quentin Schulz [Wed, 19 Nov 2025 17:01:15 +0000 (18:01 +0100)] 
led: remove support for red LED in legacy API

To the exception of red_led_on in the arm-specific assembly code, all
code interacting with the red status LED was guarded by the
CONFIG_LED_STATUS_RED symbol, which is enabled in none of the upstream
defconfigs.

Since the last board which overrode the weak red_led_on function got
migrated to the new LED mechanism, there's also no user of the
arm-specific assembly code anymore, therefore it can be removed along
the other unreachable code sections.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
13 days agocorvus: migrate red LED to the modern API
Quentin Schulz [Wed, 19 Nov 2025 17:01:14 +0000 (18:01 +0100)] 
corvus: migrate red LED to the modern API

red_led_on is either called from the legacy LED shell command (which is
disabled for corvus) or from arm-specific assembly code right before
jumping into board_init_r() in U-Boot proper.

Let's migrate to use the more modern LED subsystem by migrating to DM.

The default-state is set to on to mimic red_led_on() from the
arm-specific assembly code as a missing default-state FDT property
currently means the LED is not probed except if explicitly done via the
led shell command. Note though that this is running much later in the
boot process, once DM is started.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
13 days agoled: remove support for green status led in legacy API
Quentin Schulz [Wed, 19 Nov 2025 17:01:13 +0000 (18:01 +0100)] 
led: remove support for green status led in legacy API

The last user of it was removed in a previous commit so let's remove its
support entirely.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
13 days agocorvus: remove green led support
Quentin Schulz [Wed, 19 Nov 2025 17:01:12 +0000 (18:01 +0100)] 
corvus: remove green led support

green_led_on and green_led_off are only called by the legacy LED command
(CONFIG_LED_STATUS_CMD) when CONFIG_LED_STATUS_GREEN is enabled, both of
which aren't enabled for corvus, so let's simply remove it as it's dead
code.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
13 days agoMerge patch series "led: remove unused legacy LED code"
Tom Rini [Fri, 5 Dec 2025 16:35:49 +0000 (10:35 -0600)] 
Merge patch series "led: remove unused legacy LED code"

Quentin Schulz <quentin.schulz@cherry.de> says:

This is a follow-up to:
- https://lore.kernel.org/u-boot/20251112-led-old-dt-v1-0-2892d49517db@cherry.de/
- https://lore.kernel.org/u-boot/20251114162417.4054006-1-patrice.chotard@foss.st.com/

to continue the effort of getting rid of the legacy LED API. This series
depends on the series listed above.

Link: https://lore.kernel.org/r/20251119-legacy-led-unused-code-v1-0-bc0ae1235baa@cherry.de
13 days agopowerpc: remove unused legacy LED API
Quentin Schulz [Wed, 19 Nov 2025 16:43:49 +0000 (17:43 +0100)] 
powerpc: remove unused legacy LED API

No PPC upstream defconfig actually enables CONFIG_LED_STATUS and we're
trying to get rid of the legacy LED API, so let's remove one of its last
users.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agonet: remove unreachable legacy LED code
Quentin Schulz [Wed, 19 Nov 2025 16:43:48 +0000 (17:43 +0100)] 
net: remove unreachable legacy LED code

The code is guarded by a condition none of the defconfigs meet (that is
CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled),
so we can remove the unreachable code sections.

When doing that, there's no caller for miiphy_link anymore, so it can be
removed.

This in turns makes CONFIG_SYS_FAULT_ECHO_LINK_DOWN and
CONFIG_SYS_FAULT_MII_ADDR unused so they are removed as well.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
13 days agoarm: omap3: remove leftover from CM_T35 support removal
Quentin Schulz [Wed, 19 Nov 2025 16:43:47 +0000 (17:43 +0100)] 
arm: omap3: remove leftover from CM_T35 support removal

Commit 76386d6195a1 ("arm: Remove cm_t35 board") removed support for the
board that was built when TARGET_CM_T35 is selected, but removal of the
symbol was forgotten, so let's fix this oversight.

While at it, update the README for omap3 to remove the last mention of
cm_t35.

Fixes: 76386d6195a1 ("arm: Remove cm_t35 board")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
13 days agoled: remove coloured_LED_init, yellow and blue status LEDs in legacy API
Quentin Schulz [Wed, 19 Nov 2025 16:43:46 +0000 (17:43 +0100)] 
led: remove coloured_LED_init, yellow and blue status LEDs in legacy API

The last user of coloured_LED_init has been recently removed, so we can
remove all places it's called and defined as it does nothing now.

Nobody makes use of the yellow and blue status LEDs from the legacy API,
so let's remove all references to it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoled: remove code guarded by always false conditions
Quentin Schulz [Wed, 19 Nov 2025 16:43:45 +0000 (17:43 +0100)] 
led: remove code guarded by always false conditions

The last CONFIG_MVS in code was removed almost 12 years ago in commit
3b98b57fa796 ("include: delete unused header files").

STATUS_LED_PAR was last seen 8 years ago when removed in commit
5b8e76c35ec3 ("powerpc, 8xx: remove support for 8xx").

If CONFIG_LED_STATUS_BOARD_SPECIFIC is not defined, the build will fail
so we won't even reach this part of the code.

Let's simplify the if block to actually possible configurations.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
13 days agoMerge patch series "test: let UNIT_TEST imply CONSOLE_RECORD"
Tom Rini [Fri, 5 Dec 2025 14:55:19 +0000 (08:55 -0600)] 
Merge patch series "test: let UNIT_TEST imply CONSOLE_RECORD"

Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:

Many C unit tests are not executed if CONFIG_CONSOLE_RECORD is not set.
Hence Tom suggested to let UNIT_TEST imply CONSOLE_RECORD.

The first patch makes the skipped C unit tests visible.

The rest of the series deals with hidden bugs in our tests.

The 'fdt get value' command returned incorrect values on low-endian
systems. So this needed fixing too.

Link: https://lore.kernel.org/r/20251123225711.227016-1-heinrich.schuchardt@canonical.com
13 days agotest: let UNIT_TEST imply CONSOLE_RECORD
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:11 +0000 (23:57 +0100)] 
test: let UNIT_TEST imply CONSOLE_RECORD

The cmd and the log test suites rely on CONFIG_CONSOLE_RECORD.
The log test suite is always built if CONFIG_UNIT_TEST=y.

The print_do_hex_dump test relies on CONFIG_HEXDUMP. Imply it too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agocmd: fix 'fdt get value'
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:10 +0000 (23:57 +0100)] 
cmd: fix 'fdt get value'

The 32bit cells of a device-tree property are big-endian. When printing
them via 0x08x we must first convert to the host endianness.

Remove the restriction to 20 bytes length. This would not allow to read an
SHA256 value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: cmd/bdinfo: consider PPC architecture specific info
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:09 +0000 (23:57 +0100)] 
test: cmd/bdinfo: consider PPC architecture specific info

On the power architecture the bdinfo command prints architecture specific
information. The test needs to accept these output lines.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: relax cread_test time constraint
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:08 +0000 (23:57 +0100)] 
test: relax cread_test time constraint

The ppce500 is not as fine grained as expected.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: fix cmt/msr test
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:07 +0000 (23:57 +0100)] 
test: fix cmt/msr test

The original value of the first variable msr (0x200) is not controlled by
U-Boot. Don't make any assumption.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: consider endianness in print_display_buffer
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:06 +0000 (23:57 +0100)] 
test: consider endianness in print_display_buffer

Hexdumps for types other then byte look different in dependence of the
endianness.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agomalta: increase SYS_MALLOC_F_LEN and SYS_MALLOC_LEN
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:05 +0000 (23:57 +0100)] 
malta: increase SYS_MALLOC_F_LEN and SYS_MALLOC_LEN

If CONFIG_CONSOLE_RECORD_INIT_F=y we need additional memory according to
CONFIG_CONSOLE_RECORD_OUT_SIZE_F. Similarly CONFIG_SYS_MALLOC_LEN must be
increased by CONSOLE_RECORD_OUT_SIZE.

Go with the default values for CONFIG_CONSOLE_RECORD_INIT_F and
CONFIG_SYS_MALLOC_LEN.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: fix bdinfo_test_all boot_params expectation
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:04 +0000 (23:57 +0100)] 
test: fix bdinfo_test_all boot_params expectation

The value of boot_params is device specific and non-zero on many boards.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: correct comments in test/cmd/font.c
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:03 +0000 (23:57 +0100)] 
test: correct comments in test/cmd/font.c

The test relates to the 'font' and not to the 'fdt' command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: the cmd/font test requires the sandbox
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:02 +0000 (23:57 +0100)] 
test: the cmd/font test requires the sandbox

The font test makes assumptions about video devices and selected fonts that
may not hold true on other configurations like qemu-x86_64_defconfig.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agoppce500: increase SYS_MALLOC_F_LEN to 0x800
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:01 +0000 (23:57 +0100)] 
ppce500: increase SYS_MALLOC_F_LEN to 0x800

If CONFIG_CONSOLE_RECORD_INIT_F=y we need additional memory according to
CONFIG_CONSOLE_RECORD_OUT_SIZE_F.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: do not assume memory size 256 MiB in cmd_test_meminfo
Heinrich Schuchardt [Sun, 23 Nov 2025 22:57:00 +0000 (23:57 +0100)] 
test: do not assume memory size 256 MiB in cmd_test_meminfo

256 GiB is the default memory size of the sandbox. But in our CI other
boards like qemu-x86_64_defconfig run with a different memory size.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
13 days agotest: cmd_exit_test depends on CONFIG_HUSH_PARSER
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:59 +0000 (23:56 +0100)] 
test: cmd_exit_test depends on CONFIG_HUSH_PARSER

The exit command is not available if CONFIG_HUSH_PARSER=n

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: bdinfo: correct expected X86 arch info
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:58 +0000 (23:56 +0100)] 
test: bdinfo: correct expected X86 arch info

Skipping to the line starting with tsc reaches the tsc_base output not the
final tsc output.

Expect all the X86 specific lines in the bdinfo output.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: print_do_hex_dump test depends on HEXDUMP
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:57 +0000 (23:56 +0100)] 
test: print_do_hex_dump test depends on HEXDUMP

Skip the test if CONFIG_HEXDUMP=n

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
13 days agotest: don't test for CONFIG_UNIT_TEST twice
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:56 +0000 (23:56 +0100)] 
test: don't test for CONFIG_UNIT_TEST twice

Makefile already checks CONFIG_UNIT_TEST.
There is point in checking it in test/Makefile again.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
13 days agotest: print_display_buffer must consider 64bit support
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:55 +0000 (23:56 +0100)] 
test: print_display_buffer must consider 64bit support

Function print_buffer() does not support printing u64 on 32bit systems.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
13 days agotest: cmd/bdinfo: consider ARM architecture specific info
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:54 +0000 (23:56 +0100)] 
test: cmd/bdinfo: consider ARM architecture specific info

On ARM the bdinfo command prints architecture specific information.
The test needs to accept these output lines.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
13 days agotest: Let pytest indicate skipped C unit tests
Heinrich Schuchardt [Sun, 23 Nov 2025 22:56:53 +0000 (23:56 +0100)] 
test: Let pytest indicate skipped C unit tests

We invoke the ut command in test_ut.py. Currently we only check for
failures. Instead we should also indicate if sub-tests were skipped.

With this change we will get output like the following for skipped tests:

test/py/tests/test_ut.py ..sssss......ss..............s.sssss.s.s...
================================ short test summary info ================================
SKIPPED [1] test/py/tests/test_ut.py:597: Test addrmap addrmap_test_basic has 1 skipped sub-test(s).
SKIPPED [1] test/py/tests/test_ut.py:597: Test bdinfo bdinfo_test_eth has 4 skipped sub-test(s).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
13 days agoMerge tag 'u-boot-stm32-20251205' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 5 Dec 2025 14:33:49 +0000 (08:33 -0600)] 
Merge tag 'u-boot-stm32-20251205' of https://source.denx.de/u-boot/custodians/u-boot-stm into next

CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/28641

_ update LED management for STMicroelectronics boards
_ Add 1 GiB DRAM support for STM32MP13x DHCOR SoM
_ Fix 512 MiB DRAM support for STM32MP13x DHCOR SoM
_ Fix handling OPTEE in middle of the DRAM
_ Add missing debug UART build for STM32MP1 DHSOM

13 days agoARM: dts: stm32: Drop "u-boot-led" from stm32mp257f-ev1-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:57 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" from stm32mp257f-ev1-u-boot

Remove obsolete property "u-boot, u-boot-led" from
stm32mp257f-ev1-u-boot.dtsi.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" from stm32mp235f-dk-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:56 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" from stm32mp235f-dk-u-boot

Remove obsolete property "u-boot, u-boot-led" from
stm32mp235f-dk-u-boot.dtsi.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157c-ed1-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:55 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157c-ed1-u-boot

Remove obsolete properties "u-boot, u-boot-led" and "u-boot,error-led"
from stm32mp157cf-ed1-u-boot.dtsi.

Remove led-red and led-blue nodes which are available in kernel DT.
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157c-ed1-scmi-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:54 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157c-ed1-scmi-u-boot

Remove obsolete properties "u-boot, u-boot-led" and "u-boot,error-led"
from stm32mp157c-ed1-scmi-u-boot.dtsi.

Remove led-red and led-blue nodes which are available in kernel DT.
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157a-dk1-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:53 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157a-dk1-u-boot

Remove obsolete properties "u-boot, u-boot-led" and "u-boot,error-led"
from stm32mp135f-dk-u-boot.dtsi.

Remove led-red which is now available in kernel DT.
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157a-dk1-scmi-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:52 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp157a-dk1-scmi-u-boot

Remove obsolete properties "u-boot, u-boot-led" and "u-boot,error-led"
from stm32mp157a-dk1-scmi-u-boot.dtsi.

Remove led-red node which is now available in kernel DT.
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp135f-dk-u-boot
Patrice Chotard [Fri, 14 Nov 2025 16:23:51 +0000 (17:23 +0100)] 
ARM: dts: stm32: Drop "u-boot-led" and "error-led" from stm32mp135f-dk-u-boot

Remove obsolete properties "u-boot, u-boot-led" and "u-boot,error-led"
from stm32mp135f-dk-u-boot.dtsi.

Remove also led-red node which is now part of kernel DT.
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp2: Enable LED_BOOT for stm32mp23_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:50 +0000 (17:23 +0100)] 
configs: stm32mp2: Enable LED_BOOT for stm32mp23_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp2: Enable LED_BOOT for stm32mp25_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:49 +0000 (17:23 +0100)] 
configs: stm32mp2: Enable LED_BOOT for stm32mp25_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp15: Enable LED_BOOT for stm32mp15_trusted_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:48 +0000 (17:23 +0100)] 
configs: stm32mp15: Enable LED_BOOT for stm32mp15_trusted_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp15: Enable LED_BOOT for stm32mp15_basic_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:47 +0000 (17:23 +0100)] 
configs: stm32mp15: Enable LED_BOOT for stm32mp15_basic_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp15: Enable LED_BOOT for stm32mp15_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:46 +0000 (17:23 +0100)] 
configs: stm32mp15: Enable LED_BOOT for stm32mp15_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32mp13: Enable LED_BOOT for stm32mp13_defconfig
Patrice Chotard [Fri, 14 Nov 2025 16:23:45 +0000 (17:23 +0100)] 
configs: stm32mp13: Enable LED_BOOT for stm32mp13_defconfig

Enable LED_BOOT to use led_boot_on/off() API in board file.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32h747-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:44 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32h747-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32h743-eval
Patrice Chotard [Fri, 14 Nov 2025 16:23:43 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32h743-eval

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32h743-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:42 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32h743-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32f769-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:41 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32f769-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32f746-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:40 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32f746-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32f429-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:39 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32f429-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoconfigs: stm32: Enable LED config flags for stm32f429-disco
Patrice Chotard [Fri, 14 Nov 2025 16:23:38 +0000 (17:23 +0100)] 
configs: stm32: Enable LED config flags for stm32f429-disco

Enable LED, LED_BOOT and LED_GPIO flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoboard: st: Update LED management for stm32mp2
Patrice Chotard [Fri, 14 Nov 2025 16:23:37 +0000 (17:23 +0100)] 
board: st: Update LED management for stm32mp2

Remove get_led() and setup_led() which became obsolete since
led_boot_on() introduction. led_boot_on() is automatically called
from board_r.c

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoboard: st: Update LED management for stm32mp1
Patrice Chotard [Fri, 14 Nov 2025 16:23:36 +0000 (17:23 +0100)] 
board: st: Update LED management for stm32mp1

Remove get_led() and setup_led() which became obsolete since
led_boot_on() introduction. led_boot_on() is automatically called
from board_r.c

Regarding "u-boot,error-led" property can't be used anymore since commit
Since commit 516a13e8db32 ("led: update LED boot/activity to new property implementation")

Instead get the LED labeled "red:status".
See kernel series: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=1022570

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 days agoboard: st: Drop old LED code from stm32f429-disco
Simon Glass [Fri, 14 Nov 2025 16:23:35 +0000 (17:23 +0100)] 
board: st: Drop old LED code from stm32f429-disco

This predates the LED framework, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
13 days agoARM: stm32: Add missing build of debug UART init code on DH STM32MP1 DHSOM
Marek Vasut [Tue, 18 Nov 2025 23:17:23 +0000 (00:17 +0100)] 
ARM: stm32: Add missing build of debug UART init code on DH STM32MP1 DHSOM

Commit c37a6684818d ("stm32mp: fix compilation issue with DEBUG_UART")
split the debug UART initialization code into two files, but failed to
update other non-ST boards. This did not lead to noticeable breakage
until debug UART is enabled, which is not the default. Update the
Makefile accordingly to allow debug UART to work.

Fixes: c37a6684818d ("stm32mp: fix compilation issue with DEBUG_UART")
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 days agoARM: dts: stm32: Add 1 GiB DRAM settings for DH STM32MP13xx DHCOR SoM
Marek Vasut [Tue, 18 Nov 2025 23:19:36 +0000 (00:19 +0100)] 
ARM: dts: stm32: Add 1 GiB DRAM settings for DH STM32MP13xx DHCOR SoM

Add DRAM settings for 1 GiB variant of DH STM32MP13xx DHCOR SoM
and support for SoM DRAM coding HW straps decoding and automatic
DRAM configuration selection. Enable CONFIG_BOARD_EARLY_INIT_F on
all STM32MP1 DHSOM, as it is required for the HW straps decoding.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 days agoARM: dts: stm32: Fix 512 MiB DRAM settings for DH STM32MP13xx DHCOR SoM
Marek Vasut [Tue, 18 Nov 2025 23:19:17 +0000 (00:19 +0100)] 
ARM: dts: stm32: Fix 512 MiB DRAM settings for DH STM32MP13xx DHCOR SoM

Update DRAM chip type and density comment for 512 MiB DRAM settings for
DH STM32MP13xx DHCOR DHSBC to match the chip on the SoM. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
13 days agostm32mp: Fix handling of OPTEE in the middle of DRAM
Marek Vasut [Tue, 18 Nov 2025 23:17:14 +0000 (00:17 +0100)] 
stm32mp: Fix handling of OPTEE in the middle of DRAM

STM32MP13xx may have OPTEE-OS at 0xdd000000 even on systems with 1 GiB
of DRAM at 0xc0000000, which is not the end of DRAM anymore. This puts
the OPTEE-OS in the middle of DRAM. Currently, the code sets RAM top to
0xdd000000 and prevents the DRAM range past OPTEE at 0xe0000000..0xffffffff
from being set as cacheable and from being usable. The code also sets the
area over OPTEE as invalid region in MMU tables, which is not correct.

Adjust the code such, that it only ever sets RAM top just before OPTEE
in case the OPTEE is really at the end of DRAM, mainly to be backward
compatible. Furthermore, adjust the MMU table configuration such, that
the regions over the OPTEE are simply skipped and not reconfigured, and
the regions between end of OPTEE and RAM top are set as cacheable, if
any actually exist.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 weeks agovexpress_aemv8: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:41 +0000 (08:55 -0600)] 
vexpress_aemv8: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agopcm052: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:33 +0000 (08:55 -0600)] 
pcm052: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoomap3_evm: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:32 +0000 (08:55 -0600)] 
omap3_evm: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agohikey960: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:27 +0000 (08:55 -0600)] 
hikey960: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agohikey: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:25 +0000 (08:55 -0600)] 
hikey: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agobcmstb: Make use of bootm_size rather than fdt_high
Tom Rini [Wed, 19 Nov 2025 14:55:22 +0000 (08:55 -0600)] 
bcmstb: Make use of bootm_size rather than fdt_high

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS. However, this platform also has a large comment
block that explains that given previous stage loaders and other parts of
the memory map (that may not be in the device tree we see?), adjust this
to use bootm_size to restrict relocation to be below the CMA area and
update the comment to match.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoam335x_shc: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:20 +0000 (08:55 -0600)] 
am335x_shc: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Reviewed-by: Heiko Schocher <hs@nabladev.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoqemu-arm-sba: Stop disabling device tree relocation
Tom Rini [Wed, 19 Nov 2025 14:55:17 +0000 (08:55 -0600)] 
qemu-arm-sba: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoarm: Remove remainder of xpress board code
Tom Rini [Wed, 19 Nov 2025 14:55:15 +0000 (08:55 -0600)] 
arm: Remove remainder of xpress board code

When this platform was removed the config header file was missed. Remove
that now.

Fixes: ddfc00400965 ("arm: Remove xpress board")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoarm: Remove remainder of zc5xxx board code
Tom Rini [Wed, 19 Nov 2025 14:55:14 +0000 (08:55 -0600)] 
arm: Remove remainder of zc5xxx board code

When these platforms were removed the common config header file was
missed. Remove that now.

Fixes: a0cacddcafe5 ("arm: Remove zc5202 and zc5601 boards")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoadi: Stop disabling device tree relocation
Tom Rini [Tue, 18 Nov 2025 14:26:40 +0000 (08:26 -0600)] 
adi: Stop disabling device tree relocation

Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Tested-by: Greg Malysa <malysagreg@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoboot/image-fit.c: Use aligned_alloc(...) not memalign(...)
Tom Rini [Tue, 2 Dec 2025 21:20:33 +0000 (15:20 -0600)] 
boot/image-fit.c: Use aligned_alloc(...) not memalign(...)

With the changes in commit 8fbcc0e0e839 ("boot: Assure FDT is always at
8-byte aligned address") to call memalign(...) we now always call
memalign(...) rather than malloc(...) when allocating a buffer that may
contain a device tree. However, memalign(...) is not portable among all
of the host OSes we support. The C11 standard does require that
aligned_alloc(...) exist and it takes the same parameters as
memalign(...) does. Change this file to call aligned_alloc rather than
memalign, and for the non-USE_HOSTCC case define that function back to
memalign.

Fixes: 8fbcc0e0e839 ("boot: Assure FDT is always at 8-byte aligned address")
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoclk: Only enable the parent clock if the clock was enabled before reparenting
Maksim Kiselev [Fri, 29 Aug 2025 08:25:00 +0000 (11:25 +0300)] 
clk: Only enable the parent clock if the clock was enabled before reparenting

The current implementation of clk_set_parent() unconditionally enables
the new parent clock, even if the target clock was not previously enabled.

To avoid this implicit behavior, this patch adds a check for whether
the target clock has been enabled before parent enabling..

Fixes: ac30d90f336 ("clk: Ensure the parent clocks are enabled while reparenting")
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2 weeks agoMerge patch series "Add support for SM3 secure hash"
Tom Rini [Thu, 4 Dec 2025 15:39:11 +0000 (09:39 -0600)] 
Merge patch series "Add support for SM3 secure hash"

Heiko Schocher <hs@nabladev.com> says:

Add SM3 secure hash, as specified by OSCCA GM/T 0004-2012 SM3 and described
at https://datatracker.ietf.org/doc/html/draft-sca-cfrg-sm3-02

TPMv2 defines hash algo sm3_256, which is currently
not supported and prevented TPMv2 chip with newer
firmware to work with U-Boot. Seen this on a ST33TPHF2XI2C

    u-boot=> tpm2 init
    u-boot=> tpm2 autostart
    tpm2_get_pcr_info: too many pcrs: 5
    Error: -90
    u-boot=>

Implement sm3 hash, so we can fix this problem.

Link: https://lore.kernel.org/r/20251118043042.27726-1-hs@nabladev.com
2 weeks agotest: cmd: fix a typo in md5 test
Heiko Schocher [Tue, 18 Nov 2025 04:30:42 +0000 (05:30 +0100)] 
test: cmd: fix a typo in md5 test

In dm_test_cmd_hash_md5 accidentially sha256 hash
ist used. Use the correct md5 hash instead.

Signed-off-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 weeks agotpm2: add sm3 256 hash support
Heiko Schocher [Tue, 18 Nov 2025 04:30:41 +0000 (05:30 +0100)] 
tpm2: add sm3 256 hash support

add sm3 256 hash support, so TPM2 chips which report
5 pcrs with sm3 hash do not fail with:

  u-boot=> tpm2 autostart
  tpm2_get_pcr_info: too many pcrs: 5
  Error: -90

Signed-off-by: Heiko Schocher <hs@nabladev.com>
2 weeks agotest: cmd: hash: add unit test for sm3_256
Heiko Schocher [Tue, 18 Nov 2025 04:30:40 +0000 (05:30 +0100)] 
test: cmd: hash: add unit test for sm3_256

add simple test for sm3 256 hash

Signed-off-by: Heiko Schocher <hs@nabladev.com>
2 weeks agolib: sm3: implement U-Boot parts
Heiko Schocher [Tue, 18 Nov 2025 04:30:39 +0000 (05:30 +0100)] 
lib: sm3: implement U-Boot parts

add the U-Boot specific parts for the SM3 hash
implementation:

Signed-off-by: Heiko Schocher <hs@nabladev.com>
2 weeks agolib: import sm3 256 hash parts from linux
Heiko Schocher [Tue, 18 Nov 2025 04:30:38 +0000 (05:30 +0100)] 
lib: import sm3 256 hash parts from linux

Implement SM3_256 Hash algorithm, based on
linux commit f83a4f2a4d8c: ("Merge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs")

Therefore add the needed parts from linux.

Signed-off-by: Heiko Schocher <hs@nabladev.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 weeks agolib: Import rol32 function from Linux
Heiko Schocher [Tue, 18 Nov 2025 04:30:37 +0000 (05:30 +0100)] 
lib: Import rol32 function from Linux

sm3 crypto algorithm uses rol32 function from linux, so
import it. Linux base was:

commit ca91b9500108:("Merge tag 'v6.15-rc4-ksmbd-server-fixes' of git://git.samba.org/ksmbd")

Signed-off-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 weeks agoMerge patch series "clk: Fix some error detection"
Tom Rini [Thu, 4 Dec 2025 15:38:46 +0000 (09:38 -0600)] 
Merge patch series "clk: Fix some error detection"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

The function clk_get_rate() returns a ulong with 0 meaning an invalid
clock rate and also negative error codes being returned for other
errors. But being an unsigned return value this cannot simply be tested
for with a < 0 test. Instead use the IS_ERR_VALUE() macro to check for
negative errors appearing as very large positive values. Fix those
places that test for <= 0. Also fix some places checking the return of
clk_register() that incorrectly used ERR_PTR().

Link: https://lore.kernel.org/r/20251021-clk_funcs-v1-0-acf51a40eea7@linaro.org