]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 weeks agodrivers/net/airoha_eth: add missing terminator for compatible devices list
Mikhail Kshevetskiy [Wed, 9 Jul 2025 09:28:07 +0000 (12:28 +0300)] 
drivers/net/airoha_eth: add missing terminator for compatible devices list

Compatible device list must have a terminator. If terminator is missed
the u-boot driver subsystem will access random data placed after the
list in the memory.

The issue can be observed with the "dm compat" command.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agoMerge patch series "board: ti: am33xx: Add Ethernet support for Beaglebone Green...
Tom Rini [Wed, 9 Jul 2025 14:45:33 +0000 (08:45 -0600)] 
Merge patch series "board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco"

Romain Gantois <romain.gantois@bootlin.com> says:

This is version one of my series which enables Ethernet support on the BBGE
board. This requires three main changes:

 - Describing the MAC<->PHY link and DP83867 PHY accurately in the device
   tree
 - Enabling the RGMII1 pinmux configuration
 - Enabling the DP83867 driver

These changes are all applied in patch 2.

Patch 1 enables excluding the DP83867 driver from SPL. This is done to
avoid size issues when adding the DP83867 driver to the am335x-evm
defconfig.

Link: https://lore.kernel.org/r/20250626-bbge-ethernet-v1-0-5b544fb1898f@bootlin.com
3 weeks agoboard: ti: am33xx: Add Ethernet support for Beaglebone Green Eco
Romain Gantois [Thu, 26 Jun 2025 16:20:25 +0000 (18:20 +0200)] 
board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco

Currently, the Ethernet interface of the BBGE board isn't properly
supported.

To support this interface, describe the MAC<->PHY RGMII link and the
DP83867 PHY in the BBGE device tree. Enable the DP83867 PHY driver in
U-Boot Proper and mux the relevant RGMII lines.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Tested-by: Judith Mendez <jm@ti.com>
3 weeks agonet: phy: dp83867: Allow excluding driver from SPL
Romain Gantois [Thu, 26 Jun 2025 16:20:24 +0000 (18:20 +0200)] 
net: phy: dp83867: Allow excluding driver from SPL

The DP83867 PHY driver is used by the BeagleBoneGreen Eco board, but adding
it to the am335x-evm defconfig causes SPL to overflow its size limits.

Add a separate option to enable this driver in SPL, so that it can be
enabled in U-Boot without adding unnecessary volume to SPL.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Tested-by: Judith Mendez <jm@ti.com>
3 weeks agoMerge patch series "Improve Verdin AM62P thermal setup by generalizing ft_board_setup...
Tom Rini [Wed, 9 Jul 2025 14:40:36 +0000 (08:40 -0600)] 
Merge patch series "Improve Verdin AM62P thermal setup by generalizing ft_board_setup_ex()"

João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com> says:

In some use cases, board-specific device tree changes must not be overwritten
by system fixups. Although U-Boot provides ft_board_setup_ex() for this
purpose, it is currently only used on TI Keystone. This series makes
ft_board_setup_ex() a generic option, allowing its use by other architectures
and boards.

Additionally, considering that Toradex Verdin-AM62P hardware lifetime
guarantees are based on a 105°C junction temperature (while TI AM62Px supports
up to 125°C), this series implements necessary changes within TI K3 AM62P and
Toradex board code. These changes include exporting common fixup device Tree
functions used in TI K3 for board-code access and also fixup for AM62P thermal
zones to correctly reflect the number of CPU nodes according to the SoC part
number.

Link: https://lore.kernel.org/r/20250623-am62p-fdt-fixup-trip-points-v1-0-12355eb6a72f@toradex.com
3 weeks agoboard: toradex: verdin-am62p: Add fixup for critical trip points
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:57 +0000 (14:39 -0300)] 
board: toradex: verdin-am62p: Add fixup for critical trip points

While TI AM62P supports up to 125°C junction temperature, Tj, for
industrial and automotive parts, Toradex Verdin-AM62P hardware lifetime
guarantees consider a 105°C Tj. Fixup the device tree temperature
critical trip points to match the hardware specifications. The
implementation ensures the architecture code will not overwrite the
board specific changes by enabling CONFIG_OF_BOARD_SETUP_EXTENDED for
the Verdin-AM62P.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoarm: mach-k3: am62p: fixup thermal cooling device by cpu number
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:56 +0000 (14:39 -0300)] 
arm: mach-k3: am62p: fixup thermal cooling device by cpu number

TI AM62Px devices support CPU throttling based on thermal alerts.
However, the device tree assumes a 4-core configuration. Since the AM62P
also supports 2-core configurations, add a fixup to dynamically adjust
the cooling-device nodes within thermal zones based on the actual number
of CPU cores available.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoarm: mach-k3: Export common fdt fixups for use in board code
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:55 +0000 (14:39 -0300)] 
arm: mach-k3: Export common fdt fixups for use in board code

Avoid code duplication by making the common TI K3 device tree fixup
functions to be reusable by board-specific code.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoboot: Make ft_board_setup_ex() generic
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:54 +0000 (14:39 -0300)] 
boot: Make ft_board_setup_ex() generic

In some use cases, board-specific device tree changes must not be
overwritten by system fixups. Although U-Boot provides
ft_board_setup_ex() for this purpose, it is currently only used on TI
Keystone. Make ft_board_setup_ex() to be a generic option, allowing its
use by other architectures/boards. To maintain backward compatibility,
enable it by default on TI Keystone.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoboot: menu: Do not dereference pointer if pointer is NULL
Andrew Goodbody [Wed, 2 Jul 2025 09:24:16 +0000 (10:24 +0100)] 
boot: menu: Do not dereference pointer if pointer is NULL

scene_obj_find can return NULL but this is not checked for before
the return is dereferenced. Add a NULL check.

This issue was found by Smatch.

Also add a NULL check for str.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agoboot: pxe: Prevent evaluation of uninitialised variable
Andrew Goodbody [Mon, 30 Jun 2025 11:57:10 +0000 (12:57 +0100)] 
boot: pxe: Prevent evaluation of uninitialised variable

In the case where parse_sliteral returns an error then label_name
will not have been assigned to. In order to prevent evaluating
label_name in this case add a check for the return value of parse_sliteral.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoenv: Fix possible out-of-bound access in env_do_env_set
Christian Marangi [Sun, 29 Jun 2025 13:21:18 +0000 (15:21 +0200)] 
env: Fix possible out-of-bound access in env_do_env_set

It was discovered that env_do_env_set() currently suffer from a long
time of a possible out-of-bound access for the argv array handling.

The BUG is present in the function env_do_env_set() line:

name = argv[1];

where the function at this point assume the argv at index 1 is always
present and can't be NULL. Aside from the fact that it's always
better to validate argv entry with the argc variable, situation where
the argv[1] is NULL is actually possible and not an error condition.

A example of where an out-of-bound access is triggered is with the
command "askenv - Press ENTER to ...".
This is a common pattern for bootmenu entry to ask the user input after
a bootmenu command succeeded.

In the context of such command, the while loop before "name = argv[1];"
parse the "-" char as an option arg and increment the argv pointer by
one (to make the rest of the logic code ignore the option argv) and
decrement argc value.

The while loop logic is correct but at the "name = argv[1];" line, the
argv have only one element left (the "-" char) and accessing argv[1]
(aka the secong element from argv pointer) cause an out-of-bound access
(making the bootloader eventually crash with strchr searching in invalid
data)

To better handle this and prevent the out-of-bound access, actually
check the argv entry left (with the use of the argc variable) and exit
early before doing any kind of array access.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 weeks agofit-dtb.blob.gz: Pass "-n" to gzip
Tom Rini [Fri, 27 Jun 2025 17:29:47 +0000 (11:29 -0600)] 
fit-dtb.blob.gz: Pass "-n" to gzip

Sometimes when building a platform such as imx28_btt3 we can get an
error such as:

gzip: fit-dtb.blob: warning: file timestamp out of range for gzip format
make[1]: *** [Makefile:1219: fit-dtb.blob.gz] Error 2
make[1]: *** Deleting file 'fit-dtb.blob.gz'
make: *** [Makefile:186: sub-make] Error 2

This is typically resolved by telling gzip to ignore the timestamp.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agotools: termios_linux.h: Fix build error on ppc64
Javier Martinez Canillas [Fri, 27 Jun 2025 13:53:37 +0000 (15:53 +0200)] 
tools: termios_linux.h: Fix build error on ppc64

Commit 93b55636b09f ("tools: kwboot: Allow any baudrate on Linux") added a
tcgetattr() function to be used, instead of the libc's termios functions.

This was done to allow using the raw TCGETS2/TCSETS2 ioctls that allow to
support arbitrary baud rates.

This breaks the build for PowerPC, because that architecture does not have
a struct termios2 defined because the termios and ktermios are the same.

On PowerPC, the termios ioctl() emulates the TCGETS2/TCSETS*2 ioctls with
tcgetattr/tcsetattr using just the struct termios (that's as mentioned the
same than what is defined as struct termios2 in other architectures).

So there is no need to use the TCGETS2/TCSETS2 ioctls on that architecture
and just TCGETS/TCSETS ioctls with termios as defined by PowerPC is enough.

Fixes: 93b55636b09f ("tools: kwboot: Allow any baudrate on Linux")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agopci_endpoint: pci_cdns_ti_ep: Fix the include path for header file
Hrushikesh Salunke [Fri, 27 Jun 2025 05:55:46 +0000 (11:25 +0530)] 
pci_endpoint: pci_cdns_ti_ep: Fix the include path for header file

The commit under fixes tag includes "pcie-cadence.h" using angle
brackets. Since the header file is not in standard include path change
it to double quotes to ensure proper inclusion and avoid build issues,
especially on older compilers.

Fixes: a4a0edc6046 ("pci_endpoint: Add TI K3 Cadence PCIe Endpoint Controller driver")
Signed-off-by: Hrushikesh Salunke <h-salunke@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
3 weeks agoboard: phytec: rm-cfg: Update rm-cfg to reflect new resource reservation
Wadim Egorov [Thu, 26 Jun 2025 12:39:30 +0000 (14:39 +0200)] 
board: phytec: rm-cfg: Update rm-cfg to reflect new resource reservation

With the latest TIFS firmware, an additional virtual interrupt and
event is reserved for TIFS usage on am62x and am62ax devices.

Update the rm-cfg to reflect this new reservation.

Based on commit 87720385ab69 ("board: ti: rm-cfg: Update rm-cfg to
reflect new resource reservation").

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
3 weeks agoMakefile: Fix of_list_dirs with EXT_DTB
Manorit Chawdhry [Thu, 26 Jun 2025 10:43:32 +0000 (16:13 +0530)] 
Makefile: Fix of_list_dirs with EXT_DTB

EXT_DTB overrides the of_list_dirs that is passed to binman during
builds. This causes binman to not find the normal DTB paths and instead
it just is able to use the path for EXT_DTB only.

Add the default of_list_dirs that is used for normal binman builds to
EXT_DTB usecase as well.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
3 weeks agolib/rsa: allow matching pkcs11 path by object id
Tobias Olausson [Thu, 26 Jun 2025 06:54:20 +0000 (08:54 +0200)] 
lib/rsa: allow matching pkcs11 path by object id

The object= part matches against the label that the pkcs11 token uses
for that object, but in some cases, specifically with a Yubikey using
ykcs11, where the keys have been imported, the labels differ between the
private and public keys [1], making the object= matching useless. These
keys will have the same id however, so matching against that works for
both the private and public part.

[1]: https://github.com/Yubico/yubico-piv-tool/blob/master/doc/YKCS11/Functions_and_values.adoc#key-alias-per-slot-and-object-type

Signed-off-by: Tobias Olausson <tobias@eub.se>
3 weeks agocommon: readline: Fix always true test
Andrew Goodbody [Wed, 25 Jun 2025 09:50:30 +0000 (10:50 +0100)] 
common: readline: Fix always true test

The variable base is unsigned so >= 0 is always true. Fix this test
so that it is actually useful. The fix prevents the code from causing
a segfault in the case where Ctrl-w is pressed on a line consisting
only of spaces.

Fixes: dcc18ce0dbaf ("cli: Implement delete-word in cread_line()")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoMerge patch series "include/ndisc.h: Audit include list"
Tom Rini [Tue, 8 Jul 2025 19:11:19 +0000 (13:11 -0600)] 
Merge patch series "include/ndisc.h: Audit include list"

This series from myself largely completes an audit of extraneous include
directives in 'include/*.h' and does not go in to other directories.

Link: https://lore.kernel.org/r/20250628224352.85694-1-trini@konsulko.com
3 weeks agoinclude/vsc9953.h: Audit include list
Tom Rini [Sat, 28 Jun 2025 22:43:52 +0000 (16:43 -0600)] 
include/vsc9953.h: Audit include list

This file does not need <config.h> nor <miiphy.h> so remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoinclude/spl_gpio.h: Audit include list
Tom Rini [Sat, 28 Jun 2025 22:43:51 +0000 (16:43 -0600)] 
include/spl_gpio.h: Audit include list

This file does not need <asm/gpio.h> so remove it. This file does
however need <linux/types.h> so add that in. This also shows that
arch/arm/mach-rockchip/rk3399/rk3399.c and board/lg/star/star.c were
indirectly getting <asm/gpio.h> from here, so add <asm/gpio.h> to them.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoinclude/sata.h: Audit include list
Tom Rini [Sat, 28 Jun 2025 22:43:50 +0000 (16:43 -0600)] 
include/sata.h: Audit include list

This file does not need <part.h> so remove it. This file does however
need <stdbool.h> so add that in.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoinclude/part.h: Audit include list
Tom Rini [Sat, 28 Jun 2025 22:43:49 +0000 (16:43 -0600)] 
include/part.h: Audit include list

This file does not need <linker_lists.h> so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoinclude/ndisc.h: Audit include list
Tom Rini [Sat, 28 Jun 2025 22:43:48 +0000 (16:43 -0600)] 
include/ndisc.h: Audit include list

This file should not include itself, drop that.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge patch series "kbuild: Update Makefile.extrawarn to 5.1"
Tom Rini [Tue, 8 Jul 2025 19:10:12 +0000 (13:10 -0600)] 
Merge patch series "kbuild: Update Makefile.extrawarn to 5.1"

This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> largely
finishes the re-sync with the Linux Kernel v5.1 kbuild system.

Link: https://lore.kernel.org/r/20250627185723.342553-1-ilias.apalodimas@linaro.org
3 weeks agokbuild: Bump the build system to 5.1
Ilias Apalodimas [Fri, 27 Jun 2025 18:57:16 +0000 (21:57 +0300)] 
kbuild: Bump the build system to 5.1

Our last sync with the kernel was 5.1. Even that was a partial one
as some patches from 4.x kernels were already missing making the
transition to a modern kbuild infeasible.

We are so out of sync now, that tracking the patches and backporting
them one by one makes little sense and it's going to take ages.

This is an attempt to sync up Makefile[.lib/.kbuild].
Unfortunately due to sheer amount of patches this is not easy to review,
but that's what we decided during a community call.

One of the biggest changes is get rid of partial linking entirely and
build .a archives isntead of .o.
We diaviate from the kernel on that. Instead of calling a custom script
to create the archive symbol table, we call ar with rcTP (isntead of
rcSTP) since we want a resulting archive that's sauble with the linker.

The only affected platforms are PPC ones. Unfortunately I don't have any
of them around to test, but the objdump of the resulting files --
arch/powerpc/lib/built-in.[oa] looks identical.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agokbuild: Update Makefile.extrawarn to 5.1
Ilias Apalodimas [Fri, 27 Jun 2025 18:57:15 +0000 (21:57 +0300)] 
kbuild: Update Makefile.extrawarn to 5.1

Since we are updating our kbuild system to 5.1, add the relevant
clang changes from upstream

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agoMerge tag 'xilinx-for-v2025.10-rc1' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 8 Jul 2025 15:40:39 +0000 (09:40 -0600)] 
Merge tag 'xilinx-for-v2025.10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx changes for v2025.10-rc1

cmd:
- Introduce CMD_HELP Kconfig option

fpga:
- Fix in intel_smd_mb

mini:
- Remove simple-bus driver and description
- Disable CMD_HELP

firmware:
- Fix dependencies
- Switch to new SMC firmware format

cadence qspi:
- Fix read/write STIG mode
- Set tshsl_ns to at least one sclk_ns

sdhci:
- Call sdhci reset if wired

zynqmp-clk:
- Add support for DPLL clock source

zynqmp:
- Sync clock ID bindings with Linux
- defconfig updates
- Enable rng-seed generation

versal:
- Fix clock dependency

versal2:
- defconfig updates
- Enable sysreset

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYIAB0WIQSXAixArPbWpRanWW+rB/7wTvUR9QUCaG0Z7AAKCRCrB/7wTvUR
# 9YyCAQCseYDzYZbdh4e2g6LirVovzPv2LUNRFInYSKleegOjiwEAgQ0p9wZ0hNNj
# TpWf6sOKa/0ad3bZBtvbuV0G9WpqWAA=
# =2pbC
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 08 Jul 2025 07:15:24 AM CST
# gpg:                using EDDSA key 97022C40ACF6D6A516A7596FAB07FEF04EF511F5
# gpg: Can't check signature: No public key

3 weeks agoMerge tag 'net-next-20250708' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Tue, 8 Jul 2025 15:34:47 +0000 (09:34 -0600)] 
Merge tag 'net-next-20250708' of https://source.denx.de/u-boot/custodians/u-boot-net

Pull request net-next-20250708

lwip:
- Call sys_check_timeouts() and schedule() on RX to fix an issue on
  boards with a watchdog and simplify the code
- Enable IP_FRAG and IP_REASSEMBLY
- Add support for setting the TFTP blocksize at runtime
- Fix DNS initialization in wget
- Add the sntp command
- Move code from net/lwip/${cmd}.c to cmd/lwip/${cmd}.c

3 weeks agoarm64: versal2: Remove the ZynqMP Firmware from mini ospi
Venkatesh Yadav Abbarapu [Mon, 7 Jul 2025 09:21:02 +0000 (14:51 +0530)] 
arm64: versal2: Remove the ZynqMP Firmware from mini ospi

Remove the config ZYNQMP_FIRMWARE and also update the initial
stack address.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250707092102.831697-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agocadence_qspi: fix odd byte read issue in STIG mode
Venkatesh Yadav Abbarapu [Wed, 2 Jul 2025 05:39:53 +0000 (11:09 +0530)] 
cadence_qspi: fix odd byte read issue in STIG mode

In DDR mode, even bytes are read using DMA, while the remaining odd
bytes are read using STIG mode. However, the data is not correctly
transferred into the flash read data lower register because the
supplementary byte of the STIG opcode is not being written to the
opcode extension register, resulting in incorrect data being read.

To resolve this issue, when using STIG transactions, the corresponding
supplementary byte of any STIG opcode must be defined in the Opcode
Extension Register (Lower). Issue has been observed on the Macronix
MX66UM2G45G flashes.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250702053953.640046-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agospi: cadence_qspi: Set tshsl_ns to at least one sclk_ns
Venkatesh Yadav Abbarapu [Wed, 2 Jul 2025 06:57:17 +0000 (12:27 +0530)] 
spi: cadence_qspi: Set tshsl_ns to at least one sclk_ns

tshsl_ns is the clock delay for chip select deassert. This is the delay in
master reference clocks for the length that the master mode chip select
outputs are de-asserted between transactions.

The minimum delay is always SCLK period to ensure the chip select is never
re-asserted within one SCLK period.

That is why tshsl_ns delay should be at least one sclk_ns value. If it is
less than sclk_ns, set it equal to sclk_ns.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250702065717.3871435-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoxilinx: Disable help command for all mini configurations
Michal Simek [Mon, 30 Jun 2025 12:21:08 +0000 (14:21 +0200)] 
xilinx: Disable help command for all mini configurations

There is no reason to have help command available because none is calling
it and only make binary bigger that's why disable it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/885a74b7f5b28ea7850a6ebaaf879dd8b13e18c8.1751286059.git.michal.simek@amd.com
3 weeks agocmd: Introduce CMD_HELP
Michal Simek [Mon, 30 Jun 2025 12:21:07 +0000 (14:21 +0200)] 
cmd: Introduce CMD_HELP

Add option to disable help command in size constrained systems to save some
space. There is also no need to have ifdefs around CMDLINE because all
commands depends on it.
And also mark cmd_help dependency in test_help.py.

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c17f825fb8a74e1d1912a3fd09a9a880c84a8bfd.1751286059.git.michal.simek@amd.com
3 weeks agoarm64: zynqmp: Enable rng-seed generation
Michal Simek [Wed, 2 Jul 2025 07:44:08 +0000 (09:44 +0200)] 
arm64: zynqmp: Enable rng-seed generation

SOM has TPM with RNG in it that's why enable rng-seed generation.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/0e55eb3eade94e9cd0ffe04da0618aa6b1589f01.1751442246.git.michal.simek@amd.com
3 weeks agospi: cadence_qspi: Fix odd byte write issue in STIG mode
Venkatesh Yadav Abbarapu [Fri, 4 Jul 2025 04:04:44 +0000 (09:34 +0530)] 
spi: cadence_qspi: Fix odd byte write issue in STIG mode

Starting from 'commit <8077d296adff> ("spi: cadence-quadspi: Use STIG
mode for all ops with small payload") the utilization of STIG mode
has been implemented for read and write operations involving less
than 8 bytes of data.

However, following this commit, encountering timeout issues occurs when
writing odd bytes of data in DDR mode, as indicated below:
"jedec_spi_nor flash@0: flash operation timed out
SF: 3 bytes @ 0x0 Written: ERROR -110"

To resolve this issue, the number of bytes to write has been updated
specifically for DDR mode.

Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250704040444.671604-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoconfig: versal2: Update timer clock to 100Mhz
Venkatesh Yadav Abbarapu [Fri, 4 Jul 2025 09:09:20 +0000 (14:39 +0530)] 
config: versal2: Update timer clock to 100Mhz

U-Boot timer clock is not updated when it is migrated from
emulator to silicon. Update CONFIG_COUNTER_FREQUENCY to 100Mhz.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250704090920.678557-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoarm64: versal2: Enable reset and poweroff via sysreset framework
Venkatesh Yadav Abbarapu [Mon, 7 Jul 2025 04:06:06 +0000 (09:36 +0530)] 
arm64: versal2: Enable reset and poweroff via sysreset framework

reset and poweroff are called via hooks in psci driver which is going
around sysreset framework that's why enable sysreset drivers and do
reset and poweroff via this framework.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250707040607.758919-2-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoarm64: versal2: Do not define do_reset() if sysreset is enabled
Venkatesh Yadav Abbarapu [Mon, 7 Jul 2025 04:06:07 +0000 (09:36 +0530)] 
arm64: versal2: Do not define do_reset() if sysreset is enabled

If sysreset is enabled reset_cpu is defined in sysreset uclass
that's why it can't be in platform/board code.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250707040607.758919-3-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoxilinx: zynqmp: disable CONFIG_SPI_FLASH_BAR
Venkatesh Yadav Abbarapu [Mon, 7 Jul 2025 04:37:38 +0000 (10:07 +0530)] 
xilinx: zynqmp: disable CONFIG_SPI_FLASH_BAR

Legacy SPI flash devices used a 24-bit (3-byte) addressing scheme,
limiting the addressable memory to 16 MB. To support larger densities
(256 Mbit and higher), extended addressing schemes, such as 32-bit
(4-byte) addressing, were introduced. If the flash density exceeds
16 MB and CONFIG_SPI_FLASH_BAR is disabled, the device will use a
4-byte addressing mode.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250707043738.795179-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoconfig: amd: Enable the SPI_STACKED_PARALLEL config option
Venkatesh Yadav Abbarapu [Mon, 7 Jul 2025 04:30:37 +0000 (10:00 +0530)] 
config: amd: Enable the SPI_STACKED_PARALLEL config option

Enable the SPI_STACKED_PARALLEL config option for
AMD versal2 platform, as this is required for parallel and
stacked memories.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250707043037.792987-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agodrivers: fpga: intel_sdm_mb: Check SIP SMC status in send_bitstream()
Naresh Kumar Ravulapalli [Tue, 1 Jul 2025 04:43:11 +0000 (21:43 -0700)] 
drivers: fpga: intel_sdm_mb: Check SIP SMC status in send_bitstream()

While sending bitstream via SIP SMC, busy status received does not
correspond to error, instead it means transfer is accepted but SDM
doesn't have any more free buffer space. Hence, data transmission
is continued when busy status is received.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Link: https://lore.kernel.org/r/20250701044311.3670-1-nareshkumar.ravulapalli@altera.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoxilinx: Remove simple-bus description from mini configurations
Michal Simek [Fri, 27 Jun 2025 09:20:40 +0000 (11:20 +0200)] 
xilinx: Remove simple-bus description from mini configurations

simple bus node and drivers not bringing up any value for mini
configuration that's why remove it and disable drivers for it to save some
space.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a51b11fa21c504a19701ebdccc1e61e899e1aed5.1751016029.git.michal.simek@amd.com
3 weeks agommc: zynq_sdhci: Reset the host controller
Venkatesh Yadav Abbarapu [Thu, 26 Jun 2025 06:24:40 +0000 (11:54 +0530)] 
mmc: zynq_sdhci: Reset the host controller

Reset the host controller at the early stage of probe so that the
configuration will be done properly for reboot cases.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250626062440.295301-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agofirmware: xilinx: Prepare code for new SMC firmware format
Michal Simek [Wed, 25 Jun 2025 13:29:27 +0000 (15:29 +0200)] 
firmware: xilinx: Prepare code for new SMC firmware format

Separate code to own function to be able to add new enhancement format.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cf99fe1af82bc004de3e313d4018464f4504f380.1750858165.git.michal.simek@amd.com
3 weeks agofirmware: xilinx: Tighten dependencies for ZYNQMP_FIRMWARE
Tom Rini [Wed, 2 Jul 2025 01:04:10 +0000 (19:04 -0600)] 
firmware: xilinx: Tighten dependencies for ZYNQMP_FIRMWARE

The ZYNQMP_FIRMWARE code  cannot build without platform specific headers
being available. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Link: https://lore.kernel.org/r/20250702010410.18828-1-trini@konsulko.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoxilinx: zynqmp: Enable xilinx ethernet phy
Padmarao Begari [Tue, 24 Jun 2025 08:46:45 +0000 (14:16 +0530)] 
xilinx: zynqmp: Enable xilinx ethernet phy

Enable xilinx ethernet phy on ZynqMP by default.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250624084645.1185428-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoclk: zynqmp: Add support for dpll clock source
Padmarao Begari [Wed, 18 Jun 2025 09:43:29 +0000 (15:13 +0530)] 
clk: zynqmp: Add support for dpll clock source

The clock driver fails to correctly calculate the PLL clock
rate for peripherals when using the DPLL as the clock source.
The DPLL operates within the full power domain, while peripheral
clocks reside in the low power domain. To ensure accurate PLL
clock rate computation when the peripheral clock source is set
to DPLL, the DPLL-to-LPD cross divisor is used.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250618094329.296731-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoarm: zynqmp: Remove local copy of 'dt-bindings/clock/xlnx-zynqmp-clk.h'
Tom Rini [Thu, 12 Jun 2025 18:11:28 +0000 (12:11 -0600)] 
arm: zynqmp: Remove local copy of 'dt-bindings/clock/xlnx-zynqmp-clk.h'

As part of the recent cleanup of dt-bindigns header files we did not
remove our copy of dt-bindings/clock/xlnx-zynqmp-clk.h at the time. This
is because the difference between ours and current upstream is that
current upstream has a #warning to not use it and to instead use
xlnx-zynqmp-clk.h. So we change zynqmp-clk-ccf.dtsi to use the other
and upstream-only file and then delete our dt-bindings file.

Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20250612181128.340232-1-trini@konsulko.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoclk: versal: Fix clock driver dependency
Michal Simek [Thu, 5 Jun 2025 06:17:17 +0000 (08:17 +0200)] 
clk: versal: Fix clock driver dependency

Driver fully depends on firmware driver to be present that's why change
imply to depends on to cover it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/bd18a4ce3e65411bb956636d4a2ef4b5fbe8b9e1.1749104235.git.michal.simek@amd.com
3 weeks agoconfigs: qemu_arm64_lwip_defconfig: enable CMD_SNTP
Jerome Forissier [Wed, 25 Jun 2025 13:19:21 +0000 (15:19 +0200)] 
configs: qemu_arm64_lwip_defconfig: enable CMD_SNTP

Enable the sntp command by default in the arm64 QEMU defconfig for lwIP
since this config is meant to have all the features supported by lwIP.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agodoc: add doc/cmd/sntp.rst and remove doc/README.SNTP
Jerome Forissier [Wed, 25 Jun 2025 13:19:20 +0000 (15:19 +0200)] 
doc: add doc/cmd/sntp.rst and remove doc/README.SNTP

Add a proper documentation file for the sntp command in RST format and
drop doc/README.SNTP. The documentation now includes the NET_LWIP
specificities.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: add sntp command
Jerome Forissier [Wed, 25 Jun 2025 13:19:19 +0000 (15:19 +0200)] 
lwip: add sntp command

Implement the sntp command when NET_LWIP=y.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agonet: extract function net_sntp_set_rtc() from sntp_handler()
Jerome Forissier [Wed, 25 Jun 2025 13:19:18 +0000 (15:19 +0200)] 
net: extract function net_sntp_set_rtc() from sntp_handler()

Extract the code that sets the RTC clock from sntp_handler() in
net/sntp.c and make it a new function net_sntp_set_rtc() in
net/net-common.c. This will allow re-use with NET_LWIP.

According to [1] it is safe to assume that all devices have been
converted to DM_RTC so drop the useless code.

[1] https://lists.denx.de/pipermail/u-boot/2025-June/591376.html

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: ping: accept host name when CONFIG_CMD_DNS=y
Jerome Forissier [Wed, 25 Jun 2025 13:19:17 +0000 (15:19 +0200)] 
lwip: ping: accept host name when CONFIG_CMD_DNS=y

Update the ping command so that a host name is accepted in addition to
an IP address, provided DNS support is enabled.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: add net_lwip_dns_resolve()
Jerome Forissier [Wed, 25 Jun 2025 13:19:16 +0000 (15:19 +0200)] 
lwip: add net_lwip_dns_resolve()

Add a helper fonction to convert an IP address (supplied as a text
string) or a host name to an ip_addr_t.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: dns: do not print IP address when a variable is specified
Jerome Forissier [Wed, 25 Jun 2025 13:19:15 +0000 (15:19 +0200)] 
lwip: dns: do not print IP address when a variable is specified

When calling "dns <hostname> <varname>", do not print out the IP address
of <hostname> onto the console. Print it only when no variable is
passed. The reason is to be able to call do_dns() from another command
in need of the DNS services without polluting the output.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: dns: do not return CMD_RET_FAILURE on successful resolution
Jerome Forissier [Wed, 25 Jun 2025 13:19:14 +0000 (15:19 +0200)] 
lwip: dns: do not return CMD_RET_FAILURE on successful resolution

The DNS loop checks for a non-zero IP address after DNS resolution, but
the address is in fact never copied into the context. Fix that.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: split net/lwip/wget.c
Jerome Forissier [Wed, 25 Jun 2025 13:19:13 +0000 (15:19 +0200)] 
lwip: split net/lwip/wget.c

Split net/lwip/wget.c in two: one part which implements CONFIG_WGET
stays in net/ while the part that implements CONFIG_CMD_WGET is moved
into cmd/.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: split cmd/net-lwip.c into one file per command
Jerome Forissier [Wed, 25 Jun 2025 13:19:12 +0000 (15:19 +0200)] 
lwip: split cmd/net-lwip.c into one file per command

Move each command in cmd/net-lwip.c into its own file
(cmd/lwip/${cmd}.c).

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: move net/lwip/ping.c to cmd/lwip
Jerome Forissier [Wed, 25 Jun 2025 13:19:11 +0000 (15:19 +0200)] 
lwip: move net/lwip/ping.c to cmd/lwip

Prepare to split the ping command from cmd/net-lwip.c by moving the
implementation from net/lwip/dns.c to cmd/lwip.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: move net/lwip/dns.c to cmd/lwip
Jerome Forissier [Wed, 25 Jun 2025 13:19:10 +0000 (15:19 +0200)] 
lwip: move net/lwip/dns.c to cmd/lwip

Prepare to split the dns command from cmd/net-lwip.c by moving the
implementation from net/lwip/dns.c to cmd/lwip.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agolwip: remove net/lwip/eth_internal.h
Jerome Forissier [Wed, 25 Jun 2025 13:19:09 +0000 (15:19 +0200)] 
lwip: remove net/lwip/eth_internal.h

net/lwip/eth_internal.h is not used. Remove it.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agonet: lwip: wget: initialize dns if a hostname is used in a URL
Tim Harvey [Fri, 30 May 2025 15:38:26 +0000 (08:38 -0700)] 
net: lwip: wget: initialize dns if a hostname is used in a URL

Initialize dns servers if a hostname (vs ipaddr) is used in a URL.
Otherwise the wget will fail without displaying an error due to
dns_gethostbyname failing silently when no DNS servers are set unless
you have previously performed a 'dns <arg>' command.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agonet: lwip: move dns init to common function
Tim Harvey [Fri, 30 May 2025 15:38:25 +0000 (08:38 -0700)] 
net: lwip: move dns init to common function

move the dns init including setting the dns servers from env vars to a
common function as other commands that support hostname lookups will
need this.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[jf: add CMD_DNS conditional to support NET_LWIP && !CMD_DNS]
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agonet: lwip: tftp: add support for setting blocksize at runtime
Tim Harvey [Fri, 30 May 2025 15:38:24 +0000 (08:38 -0700)] 
net: lwip: tftp: add support for setting blocksize at runtime

Add support for setting the blocksize at runtime via the tftpblocksize env
variable as such is done with the legacy stack (CONFIG_NET).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agonet: lwip: enable IP_FRAG and IP_REASSEMBLY
Tim Harvey [Fri, 30 May 2025 15:38:23 +0000 (08:38 -0700)] 
net: lwip: enable IP_FRAG and IP_REASSEMBLY

Enable IP_FRAG and IP_REASSEMBLY to allow packets larger than MTU.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 weeks agonet: lwip: call sys_check_timeouts and schedule on rx
Tim Harvey [Fri, 30 May 2025 15:38:22 +0000 (08:38 -0700)] 
net: lwip: call sys_check_timeouts and schedule on rx

Call schedule() in net_lwip_rx() to service U-Boot tasks and
actions during packet rx.

As a cleanup also move sys_check_timeouts() here and remove it from the
functions that call net_lwip_rx().

This resolves the issue of an active watchdog resetting the board on
long network activities.

Suggested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 7 Jul 2025 20:15:18 +0000 (14:15 -0600)] 
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge branch 'next'
Tom Rini [Mon, 7 Jul 2025 20:10:59 +0000 (14:10 -0600)] 
Merge branch 'next'

3 weeks agoPrepare v2025.07 v2025.07
Tom Rini [Mon, 7 Jul 2025 15:48:28 +0000 (09:48 -0600)] 
Prepare v2025.07

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoconfigs: legoev3: adjust to reduce binary size
David Lechner [Fri, 4 Jul 2025 20:39:27 +0000 (15:39 -0500)] 
configs: legoev3: adjust to reduce binary size

Adjust legoev3_defconfig to reduce the binary output size.

As u-boot has bloated a bit over the years, the legoev3_defconfig can no
longer build something that fits in the 256kB size limit of the EV3.
This drops a few unused features, but the real difference-makers are
enabling thumb instructions and using link time optimization to reduce
the size.

This reduced u-boot.bin from 279,920 to 198,416 bytes on my local
machine with arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009.

HAS_BOARD_SIZE_LIMIT is also added to catch any future regressions.

Signed-off-by: David Lechner <david@lechnology.com>
3 weeks agomx6sabresd: Reduce U-Boot proper size to fix boot regression
Fabio Estevam [Fri, 4 Jul 2025 14:40:22 +0000 (11:40 -0300)] 
mx6sabresd: Reduce U-Boot proper size to fix boot regression

The mx6sabresd U-Boot proper binary size has grown beyond the
CONFIG_BOARD_SIZE_LIMIT.

Reduce its size by removing the CONFIG_MULTI_DTB_FIT, BOOTM_PLAN9 and
BOOTM_RTEMS options.

According to doc/README.multi-dtb-fit:

"Usually the DTB is selected by the SPL and passed down to U-Boot. But some
platforms don't use the SPL. In this case MULTI_DTB_FIT can used to provide
U-Boot with a choice of DTBs"

mx6sabresd uses SPL, so MULTI_DTB_FIT can be safely dropped as the DTB
selection in SPL is done by board_fit_config_name_match().

Tested boot on the imx6dl and imx6q variants.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 weeks agoMerge tag 'u-boot-dfu-next-20250703' of https://source.denx.de/u-boot/custodians... next
Tom Rini [Thu, 3 Jul 2025 14:27:29 +0000 (08:27 -0600)] 
Merge tag 'u-boot-dfu-next-20250703' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

u-boot-dfu-next-20250703

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

Android:
- Fix uninitialized vhdr pointer in image-android.c
- Fix uninitialized vhdr pointer in abootimg cmd

DFU:
- Update maintainers file to include spl/spl_dfu

4 weeks agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into...
Tom Rini [Thu, 3 Jul 2025 14:26:50 +0000 (08:26 -0600)] 
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/26936

- RISC-V: Add big-endian build support
- Board: aclint_ipi: Support T-Head C900 CLINT
- Board: mpfs_icicle: Implement
  board_fdt_blob_setup()/board_fit_config_name_match()
- Driver: pinctrl: Port pin controller driver for T-Head TH1520 SoC
- Driver: cache: Update dependency for ANDES_L2_CACHE

4 weeks agoMerge tag 'efi-next-03072025' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 3 Jul 2025 14:25:38 +0000 (08:25 -0600)] 
Merge tag 'efi-next-03072025' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next

Sughosh added EFI HTTP(s) support into our eficonfig application. Up to
now we could only enable that via our efidebug command. Users now get that
option on the eficonfig menu.

Javier implemented support for the EFI_PARTITION_INFO_PROTOCOL,
to provide cached partition information for GPT partition types.
The protocol describes legacy MBR partition types, but that's for backward
compatibility and not implemented by this series.
The protocol is needed by [0], an implementation of a UEFI based A/B boot
protocol for the root filesystem.

Paul added support for EFI_DEBUG_IMAGE_INFO_TABLE. This is part of the EFI
spec and is defining a debug protocol that Google currently uses to debug
their Generic Bootloader project [1][2], using EFI to load Android.
Heinrich contributed a test EFI application for it as well.
The efi_realloc() function he added will realloc any type of memory to
BootServicesData, but keeping in mind the new protocol is the only consumer
he will fix that on a followup patch.

Finally another round of smatch fixes from Andrew cleans up coding errors.

The CI https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/26935
seems happy

[0] https://gitlab.com/CentOS/automotive/src/ukiboot
[1] https://lpc.events/event/18/contributions/1704/attachments/1550/3231/Android%20Generic%20Boot%20Loader.pdf
[2] https://source.android.com/docs/core/architecture/bootloader/generic-bootloader

4 weeks agocache: Update dependency for ANDES_L2_CACHE
Tom Rini [Wed, 2 Jul 2025 01:04:26 +0000 (19:04 -0600)] 
cache: Update dependency for ANDES_L2_CACHE

The cache driver here can only build on RISCV due to header
dependencies. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoboard: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match()
Conor Dooley [Mon, 23 Jun 2025 11:51:36 +0000 (12:51 +0100)] 
board: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match()

The firmware on the Icicle is capable of providing a devicetree in a1 to
U-Boot, but until now the devicetree has been packaged in a "payload" [1]
alongside U-Boot (or other bootloaders/RTOSes) and appended to the image.
The address of this appended devicetree is placed in a1 by the firmware.
This meant that the mechanism used by OF_SEPARATE to locate the
devicetree at the end of the image would pick up the one provided by the
firmware when u-boot-nodtb.bin was in the payload and U-Boot's devicetree
when u-boot.bin was.

The firmware is now going to be capable of providing a minimal devicetree
(quite cut down due to severe space constraints), but this devicetree is
linked into the firmware that runs out of the L2 rather than at the end
of the U-Boot image.

Implement board_fdt_blob_setup() so that this devicetree can be
optionally used, and the devicetree provided in the "payload" can be
used without relying on "happening" to implement the same strategy as
OF_SEPARATE expects in combination with u-boot-nodtb.bin.
Unlike other RISC-V boards, the firmware provided devicetree is only
used when OF_BOARD is set, so that the almost certainly more complete
devicetree in U-Boot will be used unless explicitly requested otherwise.

Implement board_fit_config_name_match(), so that, using the firmware
provided cut-down/minimal dtb, U-Boot can select one of several
devicetrees when MULTI_DTB_FIT is enabled.

Enabling both MULTI_DTB_FIT and OF_BOARD will lead to a conflict
between the two options, with the latter taking priority due to
board_fdt_blob_setup() being executed before board_fit_config_name_match(),
which causes gd->fdt_blob to be overwritten with a pointer to the
minimal devicetree rather than the location of the fit image containing
the multiple dtbs. Let MULTI_DTB_FIT take priority in this case, by
explicitly blocking the override when MULTI_DTB_FIT is enabled.

Link: https://github.com/polarfire-soc/hart-software-services/blob/master/tools/hss-payload-generator/README.md
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: cpu: th1520: Enable pinctrl by default
Yao Zi [Wed, 18 Jun 2025 09:54:57 +0000 (09:54 +0000)] 
riscv: cpu: th1520: Enable pinctrl by default

Select PINCTRL_TH1520 in CPU Kconfig entry and update defconfig for
existing TH1520-based boards to ensure PINCTRL is enabled.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: dts: th1520: Add pin controllers
Yao Zi [Wed, 18 Jun 2025 09:54:56 +0000 (09:54 +0000)] 
riscv: dts: th1520: Add pin controllers

Describe the three pin controllers integrated in TH1520 SoC. Since we
don't have support for clocks in the AON region, a dummy fixed-clock
node is added to supply the pin controller locating in it.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agopinctrl: Port pin controller driver for T-Head TH1520 SoC
Yao Zi [Wed, 18 Jun 2025 09:54:55 +0000 (09:54 +0000)] 
pinctrl: Port pin controller driver for T-Head TH1520 SoC

The SoC pads of TH1520 are separated into three groups (AP 1, AP 2 and
AON) controlled by independent pin controllers. This patch ports their
driver from Linux kernel with most code for setting pinconf and pinmux
kept as is.

The dt-binding of TH1520 pin controller uses a schema where pins to
configure are specfied as strings and looked up at runtime, which the
generic pinctrl helpers of U-Boot cannot parse, thus a customized
set_state() callback is implemented to parse pinconfig nodes and setup
the configuration.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: byteorder: add test for big-endian
Ben Dooks [Fri, 13 Jun 2025 16:12:58 +0000 (17:12 +0100)] 
riscv: byteorder: add test for big-endian

Test for big-endian either via __RISCVEB__ which migth be
rather old, or check the BYTE_ORDER if the compiler defines
it (which should be any modern gcc like v12)

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: add build support for big-endian
Ben Dooks [Fri, 13 Jun 2025 16:12:57 +0000 (17:12 +0100)] 
riscv: add build support for big-endian

Add support to build code big-endian if the board supports
it. Updates the makefile to pass the correct compiler and
elf flags.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 weeks agoefi_loader: add dbginfodump.efi
Heinrich Schuchardt [Tue, 29 Apr 2025 08:41:38 +0000 (10:41 +0200)] 
efi_loader: add dbginfodump.efi

Provide a test application to dump the EFI_DEBUG_IMAGE_INFO_TABLE
as implemented in EDK II.

EFI_DEBUG_IMAGE_INFO is not packed in contrast to many other EFI
structures.

As of today EDK II when removing an entry in the EfiDebugImageInfoTable
just sets NormalImage = NULL but does not compact the array. So
TableSize reflects the number of non-NULL entries and not the array
size as reported independently in
https://github.com/tianocore/edk2/pull/11013 and
https://github.com/tianocore/edk2/pull/11019.

The current implementation tolerates this deviation from the UEFI
specification.

This is what the output may look like:

    Debug Info Table Dump
    =====================

    => dump
    Modified
    Number of entries: 0x0000004a
    Info type 0x00000001
      Address: [0x000000008315a000, 0x00000000831bafff]
      File: FvFile(D6A2CB7F-6A18-4E2F-B43B-9920A733700A)
      Handle: 0x000000017fe3cb18
    ...
    Info type 0x00000001
      Address: [0x000000017e8db000, 0x000000017ea00f3f]
      File: FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
      Handle: 0x000000017f358e98
    Info type 0x00000001
      Address: [0x000000017eae5000, 0x000000017eae81ff]
      File: \dbginfodump.efi
      Handle: 0x000000017eaf0298
    =>

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi: selftest: add selftest for EFI_DEBUG_SUPPORT
Ying-Chun Liu (PaulLiu) [Thu, 3 Jul 2025 06:28:11 +0000 (07:28 +0100)] 
efi: selftest: add selftest for EFI_DEBUG_SUPPORT

Add selftest to check the installed configuration table that has
the correct GUID.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi: add EFI_DEBUG_IMAGE_INFO for debug
Ying-Chun Liu (PaulLiu) [Thu, 3 Jul 2025 06:28:10 +0000 (07:28 +0100)] 
efi: add EFI_DEBUG_IMAGE_INFO for debug

This commit adds the functionality of generate EFI_DEBUG_IMAGE_INFO
while loading the image.

This feature is described in UEFI Spec 2.10. Section 18.4.3.
The implementation ensures support for hardware-assisted debugging and
provides a standardized mechanism for debuggers to discover the load
address of an EFI application.

Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agolib: efi_loader: efi_memory.c: add efi_realloc() for realloc memory
Ying-Chun Liu (PaulLiu) [Thu, 3 Jul 2025 06:28:09 +0000 (07:28 +0100)] 
lib: efi_loader: efi_memory.c: add efi_realloc() for realloc memory

Add efi_realloc() for realloc memory that previously alloc by efi_alloc().
Note that if realloced memory is explicitly allocated as BootServicesData.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi: add EFI_DEBUG_IMAGE_INFO_TABLE for debug
Ying-Chun Liu (PaulLiu) [Thu, 3 Jul 2025 06:28:08 +0000 (07:28 +0100)] 
efi: add EFI_DEBUG_IMAGE_INFO_TABLE for debug

EFI_DEBUG_IMAGE_INFO_TABLE is used to store EFI_LOADED_IMAGE for
debug purpose. This commit adds the table to the EFI_CONFIGURATION_TABLE.

This feature is described in UEFI Spec version 2.10. Section 18.4.
The implementation ensures support for hardware-assisted debugging and
provides a standardized mechanism for debuggers to discover and interact
with system-level debug resources.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi: add EFI_SYSTEM_TABLE_POINTER for debug
Ying-Chun Liu (PaulLiu) [Thu, 3 Jul 2025 06:28:07 +0000 (07:28 +0100)] 
efi: add EFI_SYSTEM_TABLE_POINTER for debug

Add EFI_SYSTEM_TABLE_POINTER structure for remote debugger to locate
the address of EFI_SYSTEM_TABLE.

This feature is described in UEFI SPEC version 2.10. Section 18.4.2.
The implementation ensures support for hardware-assisted debugging and
provides a standardized mechanism for debuggers to discover the EFI
system table.

Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> # change memset(systab_pointer, 0 ...) -> systab_pointer->crc32 = 0;
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agotest: wget: add a test case for validating URI
Sughosh Ganu [Thu, 3 Jul 2025 06:43:08 +0000 (12:13 +0530)] 
test: wget: add a test case for validating URI

The wget module has a function wget_validate_uri() which is used for
validating the URI to be used by wget. Add a basic test case for this
function.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agocmd: eficonfig: add support for URI device path based boot options
Sughosh Ganu [Thu, 3 Jul 2025 06:43:07 +0000 (12:13 +0530)] 
cmd: eficonfig: add support for URI device path based boot options

The eficonfig command provides a menu based interface for maintenance
of the EFI boot options. Add support for adding a URI based boot
option. This boot option can then be used for HTTP boot.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi_loader: Prevent free of uninitialised pointer
Andrew Goodbody [Wed, 2 Jul 2025 10:01:38 +0000 (11:01 +0100)] 
efi_loader: Prevent free of uninitialised pointer

Taking a goto to out_of_resources before receive_lengths is assigned
will result in an attempt to free an unitialised pointer. Instead
initialise receive_lengths to NULL on declaration to prevent this from
occurring.

This issue was found by Smatch.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi_loader: Prevent dereference of uninitialised variable
Andrew Goodbody [Wed, 2 Jul 2025 10:01:37 +0000 (11:01 +0100)] 
efi_loader: Prevent dereference of uninitialised variable

If phandler is returned as NULL from efi_search_protocol then
protocol_interface is never assigned to. Instead return
EFI_UNSUPPORTED as per the spec.

This issue found by Smatch.

Also eliminate the use of the variable protocol_interface as it is not
needed.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi_loader: Prevent dereferencing NULL pointer
Andrew Goodbody [Wed, 2 Jul 2025 10:01:36 +0000 (11:01 +0100)] 
efi_loader: Prevent dereferencing NULL pointer

Taking the first goto error: in file_open could either result in an
attempt to dereference fh when NULL or else free fh->path which has
not been assigned to and so will be unknown. Avoid both of these
problems by passing path to free instead of fh->path.

This issue found by Smatch.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi_selftest: Add basic partition info check to block io test
Javier Martinez Canillas [Thu, 19 Jun 2025 08:34:02 +0000 (10:34 +0200)] 
efi_selftest: Add basic partition info check to block io test

Test the EFI_PARTITION_INFO_PROTOCOL in the existing EFI_BLOCK_IO_PROTOCOL
unit test. It is fairly basic, since it only checks that the values of the
struct efi_partition_info .revision, .type and .system fields are correct.

It doesn't check the MBR partition record information, because that's not
supported by the EFI_PARTITION_INFO_PROTOCOL implementation yet. The test
can be extended once the support is implemented, or if the in-memory disk
image used for the test is modified to have a GPT partition type instead.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoefi_loader: disk: add EFI_PARTITION_INFO_PROTOCOL support
Javier Martinez Canillas [Thu, 19 Jun 2025 08:34:01 +0000 (10:34 +0200)] 
efi_loader: disk: add EFI_PARTITION_INFO_PROTOCOL support

The UEFI 2.10 specification mentions that this protocol shall be installed
along with EFI_BLOCK_IO_PROTOCOL. It provides cached partition information
for MBR and GPT partition types.

This patch just implements support for GPT partition types. The legacy MBR
partition types is only needed for backward compatibility and can be added
as a follow-up if needed, to make it fully compliant with the EFI spec.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agodisk: efi: expose the part_get_gpt_pte() helper function
Javier Martinez Canillas [Thu, 19 Jun 2025 08:34:00 +0000 (10:34 +0200)] 
disk: efi: expose the part_get_gpt_pte() helper function

This function will be used by the EFI application disk support code
to provide data required by the EFI_PARTITION_INFORMATION_PROTOCOL.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agodisk: efi: Move logic to get a GPT entry into a helper function
Javier Martinez Canillas [Thu, 19 Jun 2025 08:33:59 +0000 (10:33 +0200)] 
disk: efi: Move logic to get a GPT entry into a helper function

Factor out the logic to get the Partition Table Entry (PTE) of a given
partition into a helper function, since it could be used by other code.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoboard: thead: licheepi4a: Bring up secondary cores in SPL
Yao Zi [Fri, 6 Jun 2025 04:28:04 +0000 (04:28 +0000)] 
board: thead: licheepi4a: Bring up secondary cores in SPL

Setup core information and bring secondary HARTs up for a functional
multi-core system.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>