Paresh Bhagat [Wed, 25 Mar 2026 07:08:04 +0000 (12:38 +0530)]
board: ti: am62dx: Separate resource management config from am62ax
AM62d currently shares resource management configuration files with
AM62a. However, AM62a resource management needs to be modified for DMA
resource sharing scheme for CPSW3G Ethernet functionality to support
multi-core traffic handling.
Add separate AM62d-specific resource management configuration files to
decouple from the AM62a changes and maintain proper resource allocation
for AM62d.
Tom Rini [Tue, 7 Apr 2026 19:51:37 +0000 (13:51 -0600)]
Merge tag 'mediatek-for-master-2026-04-07' of https://source.denx.de/u-boot/custodians/u-boot-mediatek
This is the first wave of MediaTek changes for this merge window. We
also expect to be sending another decent-sized pull request later for
the backlog of patches that are currently waiting on dependencies or
need little more time for review.
* Fixes for cargo-culted issues in mach-mediatek init.c files.
* Some consistency cleanups of recently added Genio boards (510/700/1200).
* Some pinctrl improvements to support newer MediaTek SOCs (mt8189 compatible).
* New devicetree and config for Genio 520/720 EVK boards (can boot to eMMC or SD).
* New CPU-specific functions to read vendor-specific CPU info at runtime.
David Lechner [Mon, 30 Mar 2026 20:23:18 +0000 (15:23 -0500)]
arm: mediatek: add SIP platform bininfo lookups
Add a couple of functions to look up the segment and part name using SIP
calls. These will be used to print more accurate CPU information in
print_cpuinfo().
Simon Glass [Tue, 24 Mar 2026 19:45:20 +0000 (13:45 -0600)]
sandbox: Adjust how OS-interface files are built
The current mechanism uses a completely separate build rule for each
file which must be built with system headers. This is tricky to
maintain.
Add a foreach template in the sandbox cpu Makefile which generates the
custom compile rules from a CFLAGS_USE_SYSHDRS list. This keeps the
rules data-driven without needing changes to the common
scripts/Makefile.lib, which could affect other architectures.
Move initjmp.o into the template since it uses the same pattern. Add
sdl.o to the list too, with an override for its command since it also
needs -fshort-wchar removed and -fno-lto added.
Philip Molloy [Tue, 24 Mar 2026 10:09:44 +0000 (10:09 +0000)]
arm: mach-sc5xx: Align header paths with SYS_SOC convention
Define CONFIG_SYS_SOC in the mach-sc5xx Kconfig. Follow the standard
U-Boot include path convention by moving the SC5xx SoC headers from
arch/arm/include/asm/arch-adi/sc5xx/ to the conventional
arch/arm/include/asm/arch-sc5xx/ location. Update includes from
<asm/arch-adi/sc5xx/*.h> to <asm/arch/*.h> across mach-sc5xx and board
files.
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
The U_BOOT_DRIVER macro creates a list of drivers used at link time, and
all entries here must be unique. This in turn means that all entries in
the code should also be unique in order to not lead to build failures
later with unexpected build combinations. Typically, the problem we have
here is when a driver is obviously based on another driver and didn't
update this particular field and so while the name field reflects
something unique the linker entry itself is not. In a few places this
provides a more suitable string name as well, however.
Reviewed-by: Marek Vasut <marek.vasut+usb@mailbox.org> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> # Tegra Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Heiko Schocher <hs@nabladev.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 23 Mar 2026 19:53:13 +0000 (13:53 -0600)]
tpl: Correct dependencies for TPL_OF_CONTROL
The TPL_OF_CONTROL option can only select TPL_OF_LIBFDT functionality if
we also have enabled TPL_LIBGENERIC_SUPPORT, so express this dependency
in Kconfig.
Tom Rini [Mon, 23 Mar 2026 19:53:06 +0000 (13:53 -0600)]
serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y
The definition of our ID table (and of_to_plat function) is guarded with
OF_REAL however the U_BOOT_DRIVER that would in turn use the table is
guarded with SERIAL_PRESENT. To avoid a potential warning we must also
guard both with SERIAL_PRESENT.
Tom Rini [Mon, 23 Mar 2026 19:53:04 +0000 (13:53 -0600)]
serial: ns16550: Fix an "unused" warning with SERIAL_PRESENT=n and OF_REAL=y
The definition of our ID table is guarded with OF_REAL however the
U_BOOT_DRIVER that would in turn use the table is guarded with
SERIAL_PRESENT. To avoid a potential warning we must also guard the
ID table with SERIAL_PRESENT.
Tom Rini [Mon, 23 Mar 2026 19:52:55 +0000 (13:52 -0600)]
spl: env: Correct dependencies for SPL_SAVEENV and MMC
The SPL_SAVEENV functionality, when working with an MMC device, can only
work with SPL_MMC_WRITE enabled. This however only works with SPL_MMC
also being enabled. Update the dependencies to show that if we have
enabled SPL_ENV_IS_IN_MMC then we select SPL_MMC_WRITE and make
SPL_ENV_IS_IN_MMC depends on SPL_MMC.
Tom Rini [Mon, 23 Mar 2026 19:52:47 +0000 (13:52 -0600)]
lmb: boot: Update dependencies within BOOT_DEFAULTS_CMDS
The CMD_BOOT[IZ] symbols have a dependency on LMB, correctly,
currently. Make sure that in BOOT_DEFAULTS_CMDS we only select these
commands if LMB is enabled.
Tom Rini [Mon, 23 Mar 2026 19:52:45 +0000 (13:52 -0600)]
lmb: Rework the LMB_ARCH_MEM_MAP symbol
This symbol should not be enabled by the user directly but rather
selected when implemented in a given platform. This converts all of the
current users of this feature and hides the symbol.
Tom Rini [Mon, 23 Mar 2026 19:51:06 +0000 (13:51 -0600)]
env: remote: Disallow CMD_SAVEENV
Looking at how the saveenv portion of this driver was implemented, it
does not appear that it could actually result in changes being saved on
the remote end. Update Kconfig to disallow CMD_SAVEENV for
ENV_IS_IN_REMOTE and then remove the relevant code.
Tom Rini [Mon, 23 Mar 2026 19:51:05 +0000 (13:51 -0600)]
env: Make more use of the ENV_SAVE_PTR macro
With commit 82b2f4135719 ("env_internal.h: add alternative ENV_SAVE_PTR
macro") we introduced the ENV_SAVE_PTR macro but as explained in the
commit message, left full conversion for a later time. This commit
makes more progress on that front by doing the remaining easy
conversions to the new macro.
Signed-off-by: Tom Rini <trini@konsulko.com>
Changes in v2:
- Reduce the number of conversions, some didn't work as expected once
CMD_SAVEENV was actually disabled.
- Finish converting UBI
David Lechner [Mon, 16 Mar 2026 21:55:15 +0000 (16:55 -0500)]
arm: dts: add U-Boot overrides for Genio 520 and 720 SD card
Add U-Boot-specific device tree overrides for the Genio 520 and 720 EVK
boards. These are needed to enable SD card support in U-Boot due to
current driver limitations. It is expected that these files will remain
after eventually converting these to CONFIG_OF_UPSTREAM, so we use
separate .u-boot.dtsi files for this.
David Lechner [Mon, 16 Mar 2026 21:55:14 +0000 (16:55 -0500)]
arm: dts: mt8371: add SD card nodes
Add SD card nodes to the MT8371 Genio common and MT8189 SoC device tree
files. This is coming from what has been submitted upstream in Linux
[1]. The process is going slow, so we a copy in U-Boot until we can
switch to CONFIG_OF_UPSTREAM.
David Lechner [Mon, 30 Mar 2026 16:00:36 +0000 (11:00 -0500)]
pinctrl: mediatek: mtk8189: set get_pinconf functions
Set the get_pinconf functions for the mt8189 pinctrl driver. This will
append pinconf bias info to the output of the pinmux status command.
This is useful for debugging pin configuration issues.
David Lechner [Mon, 30 Mar 2026 16:00:34 +0000 (11:00 -0500)]
pinctrl: mediatek: mt8189: fix pinconf bias
Fix setting pinconf bias for MT8189.
Using mtk_pinconf_bias_set_v1() was wrong because MT8189 does not have
PULLEN/PULLSEL registers. It has PU and PD registers for most pins.
MSDC pins need special handling since they have PUPD/R1/R0 registers.
I2C pins need special handling since they have PU/PD/RSEL registers.
New groups are added for MSDC and I2C pins and the bias_set callback
is now set appropriately for all groups.
A new table is needed for the RSEL registers since those were missing.
Some new macros are introduced to avoid repeating the same info many
times in MTK_TYPED_PIN(). This also fixes the semantically incorrect
use of DRV_GRPX for the IO_TYPE_GRPX field.
David Lechner [Thu, 19 Mar 2026 20:00:20 +0000 (15:00 -0500)]
arm: mediatek: mt8518: remove call to fdtdec_setup_memory_banksize()
Remove an incorrect call to fdtdec_setup_memory_banksize() in
dram_init() for mt8518.
fdtdec_setup_memory_banksize() populates gd->bd->bi_dram[bank].start
and gd->bd->bi_dram[bank].size base on the "memory" node in the device
tree. However, calling it from dram_init() is too early because gd->bd
has not been allocated yet.
gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size are already
correctly initialized later in dram_init_banksize(), so we do not need
to replace the removed function call with anything else.
David Lechner [Thu, 19 Mar 2026 20:00:19 +0000 (15:00 -0500)]
arm: mediatek: mt8518: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8518. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:18 +0000 (15:00 -0500)]
arm: mediatek: mt8516: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8516. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:17 +0000 (15:00 -0500)]
arm: mediatek: mt8512: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8512. This is
exactly the same as the default implementation, so we do not need to
override it.
David Lechner [Thu, 19 Mar 2026 20:00:16 +0000 (15:00 -0500)]
arm: mediatek: mt8365: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8365. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:15 +0000 (15:00 -0500)]
arm: mediatek: mt8195: fix gd->ram_top limit
Fix the implementation of the gd->ram_top limit for mt8195.
The intention of the comment about MMC/DMA is correct, but the
implementation was wrong. gd->mon_len is set to the code size of U-Boot,
so trying to set it to limit gd->ram_top does not make sense.
Instead, there is already a get_effective_memsize() weak function that
we can override to implement the required limit on the usable memory
size. This is used to set gd->ram_top in setup_dest_addr().
The comment about the extra SZ_1M needing to be reserved is not correct
as U-Boot already takes care of this (with the actual size of U-Boot) in
the various board_f functions, so it is removed.
David Lechner [Thu, 19 Mar 2026 20:00:14 +0000 (15:00 -0500)]
arm: mediatek: mt8195: remove call to fdtdec_setup_memory_banksize()
Remove an incorrect call to fdtdec_setup_memory_banksize() in
dram_init() for mt8195.
fdtdec_setup_memory_banksize() populates gd->bd->bi_dram[bank].start
and gd->bd->bi_dram[bank].size base on the "memory" node in the device
tree. However, calling it from dram_init() is too early because gd->bd
has not been allocated yet.
gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size are already
correctly initialized later in dram_init_banksize(), so we do not need
to replace the removed function call with anything else.
David Lechner [Thu, 19 Mar 2026 20:00:13 +0000 (15:00 -0500)]
arm: mediatek: mt8195: check return value of fdtdec_setup_mem_size_base()
Check and propagate the return value of fdtdec_setup_mem_size_base() in
dram_init() for mt8195. This function could fail if the device tree is
malformed.
David Lechner [Thu, 19 Mar 2026 20:00:12 +0000 (15:00 -0500)]
arm: mediatek: mt8195: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8195. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:11 +0000 (15:00 -0500)]
arm: mediatek: mt8188: fix gd->ram_top limit
Fix the implementation of the gd->ram_top limit for mt8188.
The intention of the comment about MMC/DMA is correct, but the
implementation was wrong. gd->mon_len is set to the code size of U-Boot,
so trying to set it to limit gd->ram_top does not make sense.
Instead, there is already a get_effective_memsize() weak function that
we can override to implement the required limit on the usable memory
size. This is used to set gd->ram_top in setup_dest_addr().
The comment about the extra SZ_1M needing to be reserved is not correct
as U-Boot already takes care of this (with the actual size of U-Boot) in
the various board_f functions, so it is removed.
David Lechner [Thu, 19 Mar 2026 20:00:10 +0000 (15:00 -0500)]
arm: mediatek: mt8188: remove call to fdtdec_setup_memory_banksize()
Remove an incorrect call to fdtdec_setup_memory_banksize() in
dram_init() for mt8188.
fdtdec_setup_memory_banksize() populates gd->bd->bi_dram[bank].start
and gd->bd->bi_dram[bank].size base on the "memory" node in the device
tree. However, calling it from dram_init() is too early because gd->bd
has not been allocated yet.
gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size are already
correctly initialized later in dram_init_banksize(), so we do not need
to replace the removed function call with anything else.
David Lechner [Thu, 19 Mar 2026 20:00:09 +0000 (15:00 -0500)]
arm: mediatek: mt8188: check return value of fdtdec_setup_mem_size_base()
Check and propagate the return value of fdtdec_setup_mem_size_base() in
dram_init() for mt8188. This function could fail if the device tree is
malformed.
David Lechner [Thu, 19 Mar 2026 20:00:08 +0000 (15:00 -0500)]
arm: mediatek: mt8188: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8188. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:07 +0000 (15:00 -0500)]
arm: mediatek: mt8183: remove call to fdtdec_setup_memory_banksize()
Remove an incorrect call to fdtdec_setup_memory_banksize() in
dram_init() for mt8183.
fdtdec_setup_memory_banksize() populates gd->bd->bi_dram[bank].start
and gd->bd->bi_dram[bank].size base on the "memory" node in the device
tree. However, calling it from dram_init() is too early because gd->bd
has not been allocated yet.
gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size are already
correctly initialized later in dram_init_banksize(), so we do not need
to replace the removed function call with anything else.
David Lechner [Thu, 19 Mar 2026 20:00:06 +0000 (15:00 -0500)]
arm: mediatek: mt8183: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt8183. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:05 +0000 (15:00 -0500)]
arm: mediatek: mt7988: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt7988. This is
effectively the same as the default implementation, so we do not need
to override it.
David Lechner [Thu, 19 Mar 2026 20:00:04 +0000 (15:00 -0500)]
arm: mediatek: mt7987: drop dram_init_banksize()
Drop override of dram_init_banksize() weak function for mt7987. This is
effectively the same as the default implementation, so we do not need
to override it.
Peter Robinson [Mon, 6 Apr 2026 17:28:00 +0000 (18:28 +0100)]
Add an initial CONTRIBUTE.rst
Add a contributors file to provide a high level overview
for people who wish to contribute to the project outlining
basic details and setting some project expectations.
This isn't intended to replace any of the existing documentation
but rather provide a succinct top level document that's easy
to find to enable users to understand the project and get
started as quickly as possible.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
[trini: Correct merge window length, release day and typo in the main
index] Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 5 Apr 2026 15:10:21 +0000 (09:10 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Two trivial fixes for 2026.04 , one fix for possible NULL pointer
dereference which was not triggered thus far but got detected on Gen5
RSIP, and one basic disablement of SCIF1 in DT to which a driver was
never bound. But it would be nice to have them corrected.
Disable incorrectly enabled SCIF1 in Renesas R-Car X5H R8A78000 SoC DT.
The SCIF1 should be enabled on board DT level in case it is needed, but
should be disabled in SoC DT by default. This had no adverse effect on
the currently upstream platforms, because those managed to probe only
the HSCIF0 device and SCIF1 was ignored.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 25 Mar 2026 01:09:05 +0000 (02:09 +0100)]
net: rswitch: Avoid NULL pointer dereference during PHY access
At the very early stage when PHY ID is being auto-detected, the
PHY device is not yet instantiated and rswitch_etha .phydev is
still NULL. Add missing check for this condition and perform C22
fallback access in this PHY ID auto-detection case.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Rasmus Villemoes [Mon, 23 Mar 2026 08:39:28 +0000 (09:39 +0100)]
linker_lists.h: drop never used ll_start, ll_end macros
These macros have AFAICT never been used at all. It's also far from
clear what purpose it could serve - for one thing, what _type would
one pass, other than void perhaps? The example using "struct
my_sub_cmd" seems misplaced, as how could one know that the first
linker list consists of those, and moreover, how would one know how
many there are?
The linker list concept is fragile enough on its own, there is no need
to have unused functionality lying around that may or may not bitrot
and certainly will confuse readers of linker_lists.h.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 20 Mar 2026 20:53:51 +0000 (14:53 -0600)]
spi: Correct dependency on SPI_MEM for many drivers
A large number of drivers "depends on" SPI_MEM but this is library type
functionality and so must be select'd instead in order to ensure that
drivers will build. Correct this usage and hide the symbol normally.
Tom Rini [Fri, 20 Mar 2026 20:53:43 +0000 (14:53 -0600)]
boot: Add DM_RTC as a dependency to CEDIT
The CEDIT functionality, due to the cmos functions, depends directly on
DM_RTC being enabled in order to provide that API. Express this in
Kconfig as well.
Tom Rini [Fri, 20 Mar 2026 20:53:40 +0000 (14:53 -0600)]
lmb: Correct dependency around CMD_BOOT[IMZ]
The calls around lmb functions for these commands are not specific to
SYS_BOOT_RAMDISK_HIGH but rather part of the general loading portion of
the command itself currently. Move this dependency to the right spot.
Tom Rini [Fri, 20 Mar 2026 20:53:39 +0000 (14:53 -0600)]
env: Make use of IF_ENABLED_INT in spi flash support
In order to build the spi flash environment driver, but with
CONFIG_ENV_REDUNDANT disabled we must make use of IF_ENABLED_INT to
check for a value in CONFIG_ENV_OFFSET_REDUND otherwise we will fail to
build.
Tom Rini [Fri, 20 Mar 2026 20:53:34 +0000 (14:53 -0600)]
rtc: Update Kconfig dependencies
Update the dependencies for RTC drivers which did not express a
requirement on DM_RTC, or in some cases on DM_RTC being disabled. In a
few cases, when DM_RTC is disabled we also require DM_I2C to also be
disabled or for POWER_LEGACY to be enabled.
Tom Rini [Fri, 20 Mar 2026 20:53:32 +0000 (14:53 -0600)]
rtc: ds1337: Remove various legacy code and update dependencies
At this point there are no users of this driver which do not enable
DM_RTC, so remove the legacy code and express the depdendency in
Kconfig. We can further remove code related to RTC chips / options that
are neither available in Kconfig nor set by any platforms.
Tom Rini [Fri, 20 Mar 2026 20:53:31 +0000 (14:53 -0600)]
rtc: Remove legacy DS1338 support
The DS1338 RTC chip is supported in DM mode by the DS1307 driver, and at
this point all users have been using this functionality. It was a
function of Kconfig configuration that implied otherwise. Remove the
unused legacy symbols.
Tom Rini [Fri, 20 Mar 2026 20:53:24 +0000 (14:53 -0600)]
sata: Rework the CMD_SATA and SATA symbols
Today we typically enable CMD_SATA in order to have the SATA
functionality itself enabled, despite there being a clean split between
the two symbols. This in turn leads to potential configuration problems.
Split things so that SATA continues to be separate and not CMD_SATA
instead depends, functionally, on AHCI being enabled.
To do all of this:
- Have X86 select AHCI directly rather than "default y" it later.
- Make CMD_SATA be a default y option, given the split of platforms that
enabled SATA and did, or did not, enable CMD_SATA.
- Change "imply CMD_SATA" to "imply SATA"
- Correct TARGET_VEXPRESS64_JUNO because you cannot select SATA_SIL
without PCI (and in turn, SATA is needed for SATA_SIL).
- Update a number of defconfigs to have no functional change.
Tom Rini [Fri, 20 Mar 2026 20:53:22 +0000 (14:53 -0600)]
global: Audit Kconfig usage of PARTITION_TYPE_GUID
It is not functionally possible to use the code enabled by
PARTITION_TYPE_GUID without having EFI_PARTITION be enabled as well. Not
all users of the former had ensured that the latter was enabled however,
so audit all current users and then as appropriate select or imply
EFI_PARTITION as needed.
Tom Rini [Fri, 20 Mar 2026 17:24:58 +0000 (11:24 -0600)]
optee: Correct dependencies for BOOTM_OPTEE
As exposed by "make randconfig", we have an issue with the dependencies
for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn
depend on the library symbols that have to be enabled for BOOTM_LINUX to
be valid (LIB_BOOTI, LIB_BOOTM and LIB_BOOTZ).
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 20 Mar 2026 14:13:09 +0000 (08:13 -0600)]
sandbox: Add missing select's to the architecture symbol
As exposed by "make randconfig", we have an issues around a number of
symbols that we select without making sure to also select their
prerequisite symbols. Add these missing symbols.
J. Neuschäfer [Sun, 29 Mar 2026 15:04:36 +0000 (17:04 +0200)]
powerpc/mpc83xx: Move alignment padding into __u_boot_list section
u-boot-dtb.bin is built by concatenating u-boot-nodtb.bin and u-boot.dtb.
u-boot-nodtb.bin, in turn, is generated by objcopy'ing the contents of
u-boot (U-Boot in ELF format) into a raw file.
In order to find the bundled FDT (u-boot.dtb), the code in lib/fdtdec.c
uses the _end symbol. Platform-specific linker scripts ensure that _end is
8-byte aligned, which is required by libfdt.
For the PowerPC MPC83xx platform, the ALIGN(8) directive was outside a
section, with the unfortunate effect that the potentially generated padding
bytes would not be copied by objcopy. This resulted in a discrepancy
between the _end symbol on the one hand, and the size of u-boot-nodtb.bin
and thus the starting location of the actual FDT on the other side. Under
these conditions, the FDT could not be found and boot would fail early.
This commit fixes it by moving the ALIGN(8) into the __u_boot_list section,
which is non-empty and thus copied into u-boot-nodtb.bin.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net> Reviewed-by: Tom Rini <trini@konsulko.com>
Rasmus Villemoes [Mon, 30 Mar 2026 14:01:06 +0000 (16:01 +0200)]
cmd: test: add bug-compatibility special case for 'test -n'
It turns out that there is lots of code in the wild, including in the
U-Boot tree itself, which used to rely on
test -n $somevar
to yield false when $somevar is not defined or empty. See for example
all the occurrences of 'test -n $fdtfile'. That was really only a
quirk of the implementation that refused calls with argc < 3, and not
because it was interpreted as
test -n "$somevar"
which is how this should be spelled.
While not exactly conforming to POSIX, we can accomodate such scripts
by special-casing a single argument "-n" to be interpreted as if it
comes from code as above with empty $somevar.
Since we only just added the ability to test a string for emptiness
using the single-argument form, it is very unlikely that there is code
doing
test "$str"
which would now fail if $str happens to be exactly "-n"; such a test
should really always be spelled
test -n "$str"
Fixes: 8b0619579b2 ("cmd: test: fix handling of single-argument form of test") Reported-by: Franz Schnyder <franz.schnyder@toradex.com> Signed-off-by: Rasmus Villemoes <ravi@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
- Migrate imx95-toradex-smarc to use upstream devicetree.
- Force fsl crypto driver to select ARCH_MISC_INIT to avoid crashes when
using CAAM.
- Support upstream Linux reset-gpios property for the i.MX PCI driver.
- Avoid duplication of DDR tables on i.MX8MP DHCOM SoM.
- Several cleanups on tqma6 platform.
- Convert i.MX8MP boards to DM_PMIC.
- Add phyCORE-i.MX91 support.
- Drop unnecessary BOARD_EARLY_INIT_F usage.
Marek Vasut [Sun, 29 Mar 2026 23:15:16 +0000 (01:15 +0200)]
arm: relocate: Make data-only relocation mode non-user-configurable
The data only relocation mode should be selected on per-SoC or per-core
basis, make these options non-user-configurable. The SoC or cores which
require this have to select this option using "default" keyword.
Tom Rini [Thu, 19 Mar 2026 16:33:36 +0000 (10:33 -0600)]
serial: pl011: Remove legacy serial driver options
There are no longer any users of the legacy non-DM pl01x serial driver.
This lets us remove both CONFIG_PL011_SERIAL as well as
CONFIG_PL011_SERIAL_RLCR references. We still have SPL users of the
non-DM portions of the code.
Neil Berkman [Wed, 18 Mar 2026 21:15:15 +0000 (14:15 -0700)]
env: flash: add catch-all for unrecognized flags in env_flash_init()
When both environment copies have valid CRCs but the flag bytes do not
match any recognized pair, env_flash_init() falls through without
setting gd->env_addr or gd->env_valid. This is a problem because:
1. env_init() then sets gd->env_addr = &default_environment (in RAM).
2. In env_flash_load(), the pointer comparison
gd->env_addr != &flash_addr->data evaluates true (RAM != flash),
triggering the pointer swap that selects the secondary copy.
3. The repair logic writes OBSOLETE (0x00) to the non-active flag but
cannot promote the other flag from 0x00 to ACTIVE (0x01) because
NOR flash requires a sector erase to set bits. Both copies end up
with flag=0x00.
4. On every subsequent boot, flag1 == flag2 triggers the ENV_REDUND
path, printing a spurious "recovered successfully" warning until
an explicit saveenv erases and rewrites the sectors.
The recognized flag values are ACTIVE (0x01), OBSOLETE (0x00), and
erased (0xFF). Of the 256 possible flag values, the existing chain of
if/else-if handles only three: 253 of 256 values fall through without
setting gd->env_addr. Combined with 0x00 (already stuck on NOR),
254 of 256 values eventually reach the persistent-warning state.
Other env backends (SPI flash, NAND, MMC) handle this through
env_check_redund() in env/common.c, which uses a numeric comparison
of the flags as a serial counter and always reaches a decision. The
CFI flash backend is the only one that uses its own flag-matching
logic.
Add a catch-all else clause that defaults to the primary copy with
ENV_REDUND status, matching the existing behavior for the flag1==flag2
case. This ensures gd->env_addr is always set, preventing the
unintended pointer swap. The condition is recoverable via saveenv.
The SPI flash backend (env/sf.c) has a related but distinct issue:
it retained legacy boolean save semantics but its load path now uses
the common serial-number logic in env_check_redund(), creating an
inconsistency under interrupted updates. That has wider implications
for fw_env.c and would need separate discussion.
Marek Vasut [Wed, 1 Apr 2026 21:02:20 +0000 (23:02 +0200)]
arm64: imx8mp: Add 4G 1r DRAM timings on DH i.MX8MP DHCOM SoM
Introduce timing patch which converts 2 GiB DRAM timings to 4 GiB 1-rank
timings. This is a new configuration which carries IS43LQ32K01B DRAM part.
The 512 MiB SoM strapping that was never used is repurposed for this part.
Marek Vasut [Wed, 1 Apr 2026 21:02:19 +0000 (23:02 +0200)]
arm64: imx8mp: Deduplicate 2G and 4G 2r DRAM timings on DH i.MX8MP DHCOM SoM
The 2 GiB and 4 GiB 2-rank DRAM timings on i.MX8MP DHCOM are very
similar. Instead of carrying around two copies of almost identical
timing tables, implement a patch of the 2 GiB table to convert it
into 4 GiB 2-rank table and pass the result to DRAM initialization
code. This saves us 13640 Bytes in SPL, and frees up space for more
DRAM initialization tables.
Marek Vasut [Wed, 1 Apr 2026 21:02:17 +0000 (23:02 +0200)]
arm64: imx8mp: Fold inline ECC into spl.c on DH i.MX8MP DHCOM SoM
The inline ECC configuration is identical for 2 GiB DRAM variants
and 4 GiB DRAM variants of the SoM, no matter the rank count. Fold
the ECC configuration directly into spl.c to simplify the upcoming
deduplication. No functional change.
Peng Fan [Mon, 30 Mar 2026 14:04:06 +0000 (22:04 +0800)]
imx8mp: icore-edimm2.2: Convert to DM_PMIC
Convert the board to use DM_PMIC instead of the legacy SPL I2C/PMIC
handling.
Changes include:
- Enable DM_PMIC, DM_PMIC_PCA9450, and SPL_DM_PMIC_PCA9450 in defconfig.
- Drop legacy SPL I2C and PMIC options.
- Remove manual I2C1 pad setup and legacy power_pca9450_init() usage.
- Use DM-based pmic_get() with the DT node "pmic@25".
- Update PMIC register programming to use struct udevice API.
Peng Fan [Mon, 30 Mar 2026 14:04:05 +0000 (22:04 +0800)]
imx8mp: libra-fpsc: Convert to DM_PMIC
Convert the board to use DM_PMIC instead of the legacy SPL I2C/PMIC
handling.
Changes include:
- Enable DM_PMIC, DM_PMIC_PCA9450, and SPL_DM_PMIC_PCA9450 in defconfig.
- Drop legacy SPL I2C and PMIC options.
- Remove manual I2C1 pad setup and legacy power_pca9450_init() usage.
- Use DM-based pmic_get() with the DT node "pmic@25".
- Update PMIC register programming to use struct udevice API.