]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
9 days agoarm: dts: an7581: set r_smpl for MMC in U-Boot
Ray Liu [Fri, 2 Jan 2026 13:25:00 +0000 (21:25 +0800)] 
arm: dts: an7581: set r_smpl for MMC in U-Boot

When booting from SPI, the ROM code does not initialize the MMC
controller on AN7581. As a result, the first MMC initialization
is performed by U-Boot.

In this case, the r_smpl bit is left uninitialized, which may
cause incorrect sampling timing during early MMC access.

Set the r_smpl bit explicitly in the U-Boot device tree to ensure
reliable MMC initialization.

This change is limited to the U-Boot-specific device tree.
The Linux MMC driver already performs runtime delay detection
and does not require a fixed r_smpl setting.

Signed-off-by: Ray Liu <ray.xy.liu@gmail.com>
10 days agoMerge tag 'net-20260115' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Thu, 15 Jan 2026 14:50:53 +0000 (08:50 -0600)] 
Merge tag 'net-20260115' of https://source.denx.de/u-boot/custodians/u-boot-net

Pull request net-20260115.

CI: https://source.denx.de/u-boot/custodians/u-boot-net/-/pipelines/29008

net:
- phy: micrel KSZ9031 and KSZ9021 fixes
- phy: marvell10g fix
- Fix "net stats" help
- Add Microsemi/Microchip MDIO driver
- tftpput: Rework to exclude code from xPL phases

net-legacy:
- Some refactoring to help with lwIP NF support

net-lwip:
- Add NFS support

11 days agonet: phy: micrel_ksz90x1: support forced GIGE master for KSZ9031
Markus Niebel [Tue, 2 Dec 2025 08:13:43 +0000 (09:13 +0100)] 
net: phy: micrel_ksz90x1: support forced GIGE master for KSZ9031

The micrel KSZ9031 phy has a optional clock pin (CLK125_NDO) which can be
used as reference clock for the MAC unit. The clock signal must meet the
RGMII requirements to ensure the correct data transmission between the
MAC and the PHY. The KSZ9031 phy does not fulfill the duty cycle
requirement if the phy is configured as slave. For a complete
describtion look at the errata sheets: DS80000691D or DS80000692D.

The errata sheet recommends to force the phy into master mode whenever
there is a 1000Base-T link-up as work around. Only set the
"micrel,force-master" property if you use the phy reference clock provided
by CLK125_NDO pin as MAC reference clock in your application.

Attention: this workaround is only usable if the link partner can
be configured to slave mode for 1000Base-T.

This follows linux implementation in commit
e1b505a60366 ("net: phy: micrel: add 125MHz reference clock workaround")

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
11 days agonet: phy: micrel_ksz90x1: disable asymmetric pause for KSZ9031 and KSZ9021
Markus Niebel [Tue, 2 Dec 2025 08:13:42 +0000 (09:13 +0100)] 
net: phy: micrel_ksz90x1: disable asymmetric pause for KSZ9031 and KSZ9021

Disable the support due to chip errata and call genphy_config_aneg
instead of genphy_config. For a complete describtion look at the
KSZ9031 errata sheets: DS80000691D or DS80000692D.

Micrel KSZ9021 has no errata, but has the same issue with Asymmetric Pause.
This patch apply the same workaround as the one for KSZ9031.

This follows linux implementation in commits
3aed3e2a143c ("net: phy: micrel: add Asym Pause workaround")
407d8098cb1a ("net: phy: micrel: add Asym Pause workaround for KSZ9021")

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
11 days agonet: phy: marvell10g: Fix PHY mode bitmap handling
Marek Vasut [Thu, 1 Jan 2026 16:51:44 +0000 (17:51 +0100)] 
net: phy: marvell10g: Fix PHY mode bitmap handling

Replace PHY interface mode bitmap handling with comparison test to match
U-Boot PHY subsystem behavior. U-Boot currently implements only single PHY
interface mode for each PHY. Linux currently uses bitmap of PHY interface
modes for each PHY.

The reason why in Linux uses bitmap of supported interface modes is so
that Linux can select the best serdes mode switching behavior for the PHY.

For example if the host only supports 10gbase-r serdes mode, then the PHY
must always talk to the host in 10gbase-r mode, even if the RJ-45 copper
speed was autonegotiated to lower speed (i.e. 1Gbps).

If the host supports both 10gbase-r and sgmii serdes modes, we want the
PHY to switch to sgmii if the RJ-45 speed is 1000/100/10, and to switch
to 10gbase-r if the RJ-45 speed is 10000.

U-Boot does not implement this functionality yet, therefore remove modes
which cannot be currently supported and switch mv_test_bit() to plain
mode comparison.

Fixes: b6fcab0728cb ("net: phy: marvell10g: Adapt Marvell 10G PHY driver from Linux")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
11 days agoAdd missing “net” prefix in help net
Link Mauve [Sat, 27 Dec 2025 18:18:48 +0000 (19:18 +0100)] 
Add missing “net” prefix in help net

The usage of the net sub-system was missing the complete command for “net
stats”.

Signed-off-by: Link Mauve <linkmauve@linkmauve.fr>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
11 days agonet: add Microsemi/Microchip MDIO driver
Robert Marko [Tue, 30 Dec 2025 21:06:03 +0000 (22:06 +0100)] 
net: add Microsemi/Microchip MDIO driver

Add Microsemi/Microchip MDIO driver for interfaces found in their network
switches.

Driver is based on the Linux version.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Acked-by: Jerome Forissier <jerome@forissier.org>
11 days agonet: tftpput: Rework to exclude code from xPL phases
Tom Rini [Thu, 25 Dec 2025 15:37:21 +0000 (09:37 -0600)] 
net: tftpput: Rework to exclude code from xPL phases

Given how the support for CONFIG_CMD_TFTPPUT is woven through the
support for the tftp protocol we currently end up including "put"
support in xPL phases, if enabled. This in turn can lead to size
overflow on those platforms as xPL tends to be constrained. To resolve
this, use "CMD_TFTPPUT" in the code to check for both CONFIG_CMD_TFTPPUT
being true and not being in an xPL build phase.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
11 days agoconfigs: qemu_arm64_lwip_defconfig: enable CMD_NFS
Andrew Goodbody [Fri, 12 Dec 2025 11:32:29 +0000 (11:32 +0000)] 
configs: qemu_arm64_lwip_defconfig: enable CMD_NFS

Enable NFS command so that it gets built by CI and can be tested more
easily.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
11 days agonet: lwip: nfs: Port the NFS code to work with lwIP
Andrew Goodbody [Fri, 12 Dec 2025 11:32:28 +0000 (11:32 +0000)] 
net: lwip: nfs: Port the NFS code to work with lwIP

After the preparatory patches moved most of the NFS code into common
files we now add the code to enable NFS support with lwIP.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
11 days agonet: nfs: Move most NFS code to common files
Andrew Goodbody [Fri, 12 Dec 2025 11:32:27 +0000 (11:32 +0000)] 
net: nfs: Move most NFS code to common files

Move most of the NFS code into common files so that it can be used by an
lwIP port of NFS.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
11 days agonet: nfs: Add licence header
Andrew Goodbody [Fri, 12 Dec 2025 11:32:26 +0000 (11:32 +0000)] 
net: nfs: Add licence header

Add the same GPL2+ licence header to the NFS code as appears on other
NFS related files.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
11 days agonet: Move some variables to net-common files
Andrew Goodbody [Fri, 12 Dec 2025 11:32:25 +0000 (11:32 +0000)] 
net: Move some variables to net-common files

Make some variables available to be used by either the legacy network
code or lwIP by moving them into the net-common files. This also allowed
removing a small number of duplicated variables from the lwIP code.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
11 days agonet: move net_state to net-common
Andrew Goodbody [Fri, 12 Dec 2025 11:32:24 +0000 (11:32 +0000)] 
net: move net_state to net-common

Move the net_state variable into common code so that it can be used by
either the legacy network code or lwIP. This is needed for porting
across the NFS support code for use with lwIP.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
11 days agonet:lwip: Add debug line to net-lwip
Andrew Goodbody [Fri, 5 Dec 2025 09:46:48 +0000 (09:46 +0000)] 
net:lwip: Add debug line to net-lwip

When debugging the LWIP NFS implementation this debug line helped to
show the cause of an error. This could be useful to someone in the
future.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
12 days agoRevert "doc: board: starfive: update jh7110 common description"
Tom Rini [Tue, 13 Jan 2026 20:18:05 +0000 (14:18 -0600)] 
Revert "doc: board: starfive: update jh7110 common description"

This patch is not as E Shattow authored it, but contains non-trivial
changes from Heinrich Schuchardt as well. The original author has
requested that this commit be reverted until the changes can be
committed showing which parts were authored by E Shattow and which by
Heinrich Schuchardt.

This reverts commit 4c105d2ae7b0f847668ff1ef6b410f63ab4290b7.

Signed-off-by: Tom Rini <trini@konsulko.com>
12 days agopinctrl: mediatek: MT7981: fix GPIO9 register map
Shiji Yang [Sat, 3 Jan 2026 08:42:39 +0000 (16:42 +0800)] 
pinctrl: mediatek: MT7981: fix GPIO9 register map

Ported from the Mediatek SDK. The upstream Linux kernel also has the
same register map as the SDK.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
12 days agolib: crypt: remove dependency on autoboot
Tomas Paukrt [Sun, 4 Jan 2026 14:02:11 +0000 (15:02 +0100)] 
lib: crypt: remove dependency on autoboot

Make crypt_compare() accessible from board-specific code
by removing its dependency on the autoboot feature.

Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 days agomisc: Add fixed-layout support
Marek Vasut [Sat, 3 Jan 2026 00:17:31 +0000 (01:17 +0100)] 
misc: Add fixed-layout support

The "fixed-layout" nvmem controller subnode used to be optional wrapper
around nvmem controller cells subnodes. The "fixed-layout" node is now
mandatory in most cases, but in order to support both recent and legacy
DTs, both variants have to be supported.

Implement support for the "fixed-layout" node in the most trivial manner,
check whether the nvmem cell supernode is compatible with "fixed-layout"
and if it is, proceed one level above it to find the nvmem controller.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 days agopowerpc: mpc83xx: Check the size of peripheral structs
J. Neuschäfer [Thu, 1 Jan 2026 16:41:55 +0000 (17:41 +0100)] 
powerpc: mpc83xx: Check the size of peripheral structs

Peripheral registers on MPC83xx-series chips are declared in
immap_83xx.h as a set of structs that ultimately fill the entire MMIO
space of 1 MiB. This patch introduces a compile-time check of the size
of each peripheral struct. The purpose of these checks is two-fold:

1. To quickly tell readers of the code the total size of each struct
2. To verify that the size does not change when a struct is edited

If the size of a peripheral struct were to change by a few bytes due
to an editing error, the result would be mayhem for all following
peripherals, because all offsets would shift by the amount of the error.

All new checks have been compile-tested.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
12 days agogardena-smart-gateway-mt7688: Disable CMD_LICENSE
Tom Rini [Tue, 13 Jan 2026 01:32:11 +0000 (19:32 -0600)] 
gardena-smart-gateway-mt7688: Disable CMD_LICENSE

This platform is unfortunately frequently very close to the binary
size limit. Currently it is so close that generic bug fixes can trigger
build failure. Remove the license command from the image as that frees
up nearly 7KiB of space.

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
13 days agoconfigs: am57xx_hs_evm_defconfig: Reserve EMIF memory used by PPA
Beleswar Padhi [Mon, 29 Dec 2025 05:11:13 +0000 (10:41 +0530)] 
configs: am57xx_hs_evm_defconfig: Reserve EMIF memory used by PPA

The AM571x SoC has 1 GB DDR space. As part of normal re-location process
U-Boot copies itself to the top of DDR bank. However, on HS devices, the
top 37 MB is used by PPA and is firewalled. This results in an exception
and the boot fails. Set CONFIG_SYS_MEM_TOP_HIDE to reserve the top 38 MB
memory (aligned to 2MB as per page size for ARM32) to fix the boot.

Note: This limitation does not exist for other AM57x devices, but this
config is applied in the common defconfig since adding a separate
defconfig only for AM571x is not justified. Losing 38MB of memory at the
bootloader stage on other devices is acceptable.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
13 days agoMerge patch series "a few test.py improvements"
Tom Rini [Mon, 12 Jan 2026 21:12:47 +0000 (15:12 -0600)] 
Merge patch series "a few test.py improvements"

David Lechner <dlechner@baylibre.com> says:

While trying to run the test suite for the first time, I encountered a
few minor issues. Here are a few patches to address them.

Link: https://lore.kernel.org/r/20260105-a-few-test-py-improvements-v3-0-fea38243ca5b@baylibre.com
13 days agopylibfdt: add requirements.txt for setuptools
David Lechner [Mon, 5 Jan 2026 16:49:15 +0000 (10:49 -0600)] 
pylibfdt: add requirements.txt for setuptools

Add a requirements.txt file to the pylibfdt script directory to specify
setuptools as a dependency. This follows the pattern of each tool in
U-Boot having its own requirements.txt file. The version is set to
78.1.1 to avoid conflict with the same in tools/patman/requirements.txt.

Reviewed-by: Simon Glass <simon.glass@canonical.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # sandbox
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agodoc: pytest: mention additional requirements for venv
David Lechner [Mon, 5 Jan 2026 16:49:14 +0000 (10:49 -0600)] 
doc: pytest: mention additional requirements for venv

Add a paragraph explaining that in addition to the requirements.txt
for test/py/test.py itself, users may need to install additional python
packages depending on the U-Boot configuration being built.

Reviewed-by: Simon Glass <simon.glass@canonical.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # sandbox
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agotest.py: check ubconfig exists before using it
David Lechner [Mon, 5 Jan 2026 16:49:13 +0000 (10:49 -0600)] 
test.py: check ubconfig exists before using it

Set ubconfig to None and add a check in the show_timings() function of
test/py/test.py to ensure that the global ubconfig variable was actually
initialized before access attributes.

If tests fail early, e.g. because --build failed, ubconfig may not have
been initialized yet and results in an exception in an atexit handler.
Adding this check avoids unnecessary noise in the output.

    Exception ignored in atexit callback: <function cleanup at 0x7de475ea6b60>
    Traceback (most recent call last):
    File "u-boot/test/py/conftest.py", line 669, in cleanup
        show_timings()
    File "u-boot/test/py/conftest.py", line 616, in show_timings
        if ubconfig.timing:
        ^^^^^^^^
    NameError: name 'ubconfig' is not defined

Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # sandbox
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoMerge patch series "pinctl: mediatek: add mt8365 support"
Tom Rini [Mon, 12 Jan 2026 19:41:54 +0000 (13:41 -0600)] 
Merge patch series "pinctl: mediatek: add mt8365 support"

David Lechner <dlechner@baylibre.com> says:

MT8365 has different pinctrl register layout compared to other SoCs in
the family, so needs its own driver.

This is also the first SoC in this family supported in U-Boot using an
upstream devicetree that has the mediatek,pctl-regmap property, so we
need to add support for that to the common mediatek pinctrl code first.

Link: https://lore.kernel.org/r/20260106-pinctl-mtk-mt8365-v1-0-0ca3eb382468@baylibre.com
13 days agoconfigs: mt8365_evk: enable pinctrl
David Lechner [Tue, 6 Jan 2026 22:05:21 +0000 (16:05 -0600)] 
configs: mt8365_evk: enable pinctrl

Enable PINCTRL, PINCONF and the SoC-specific driver for MediaTek MT8365
EVK.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agopinctrl: mediatek: add pinctrl driver for MT8365 SoC
Vitor Sato Eschholz [Tue, 6 Jan 2026 22:05:20 +0000 (16:05 -0600)] 
pinctrl: mediatek: add pinctrl driver for MT8365 SoC

Add pinctrl support for MT8365 SoC.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Vitor Sato Eschholz <vsatoes@baylibre.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agopinctrl: mediatek: support mediatek,pctl-regmap property
David Lechner [Tue, 6 Jan 2026 22:05:19 +0000 (16:05 -0600)] 
pinctrl: mediatek: support mediatek,pctl-regmap property

Add support for the mediatek,pctl-regmap devicetree property to the
common MediaTek pinctrl driver.

In upstream devicetrees from Linux, the pinctrl nodes may be on the
interrupt controller register address space rather than the pinctrl
register address space. In this case, there is a syscon node linking to
the actual pinctrl registers. This uses a common property name of
mediatek,pctl-regmap for the phandle to the syscon node.

The logic here is that if this property is present, we look up the
syscon node and use it's address as the base address of the pinctrl
registers and ignore the pinctrl node's own reg property. (Support
for interrupts could be added later if needed.)

There is also at least one SoC in Linux that has two syscon phandles
in this property. This implementation support parsing this, but doesn't
do anything with the second syscon yet (the 2nd syscon is for interrupts
which we are saving for later).

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoMerge patch series "clk: mediatek: mt8365: fix clocks"
Tom Rini [Mon, 12 Jan 2026 19:24:38 +0000 (13:24 -0600)] 
Merge patch series "clk: mediatek: mt8365: fix clocks"

David Lechner <dlechner@baylibre.com> says:

There were a number of bugs in the clock definitions for the mt8365
clock drivers. This series aims to fix the obvious issues.

This builds on [1] that implements the clk dump command to inspect the
clock trees at runtime. Using that revealed quite a few mistakes in
the clock definitions.

Additionally, the topckgen-cg hack is removed for mt8365 since it would
require an extra devicetree node using the same address space as the
topckgen node. This would not be accepted upstream in Linux, so we
shouldn't do it in U-Boot either. mt85{12,16,18} also have this hack.
I didn't attempt to remove it from those platforms since I don't have
hardware to test on.

Patches have been runtime tested on mt8365_evk hardware and compile-
tested on other platforms using:

    ./tools/buildman/buildman --boards=mt7986a_bpir3_sd,mt7620_rfb,mt7986_rfb,mt7987_emmc_rfb,mt7987_rfb,mt7622_rfb,mt7987_sd_rfb,mt7623a_unielec_u7623_02,mt7988_rfb,mt7623n_bpir2,mt7988_sd_rfb,mt7628_rfb,mt8183_pumpkin,mt7629_rfb,mt8365_evk,mt7981_emmc_rfb,mt8512_bm1_emmc,mt7981_rfb,mt8516_pumpkin,mt7981_sd_rfb,mt8518_ap1_emmc -b HEAD -c 9

[1]: https://lore.kernel.org/u-boot/20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com/
Link: https://lore.kernel.org/r/20260107-clk-mtk-mt8365-fixes-v2-0-3294a5d2f239@baylibre.com
13 days agoclk: mediatek: mt8365: fix missing topckgen IDs
David Lechner [Wed, 7 Jan 2026 16:21:15 +0000 (10:21 -0600)] 
clk: mediatek: mt8365: fix missing topckgen IDs

Use a ID map to add clocks for the missing CLK_TOP_CLK32K and
CLK_TOP_CLK26M that were not included in the devicetree definitions.

This fixes getting the rate of any clock that had one of these as a
parent.

CLK_TOP_UNIVPLL does not appear to be a real clock, so it is omitted
now since we can do that with the ID map as well.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: mt8365: remove separate topckgen-cg driver
David Lechner [Wed, 7 Jan 2026 16:21:14 +0000 (10:21 -0600)] 
clk: mediatek: mt8365: remove separate topckgen-cg driver

Remove the separate topckgen-cg driver for handling clock gates in the
topckgen address space. The devicetree bindings for this were not
acceptable upstream because it was creating a separate clock controller
using the same address space as the main topckgen clock controller. The
gates are moved to the topckgen tree instead.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: allow gates in topckgen drivers
David Lechner [Wed, 7 Jan 2026 16:21:13 +0000 (10:21 -0600)] 
clk: mediatek: allow gates in topckgen drivers

Add handling for gates in the topckgen clk drivers. This avoids the need
to have separate topckgen-cg drivers and devicetree nodes for the same
address space and clock ID range.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: mt8365: split struct mtk_clk_tree
David Lechner [Wed, 7 Jan 2026 16:21:12 +0000 (10:21 -0600)] 
clk: mediatek: mt8365: split struct mtk_clk_tree

Split the struct mtk_clk_tree for MT8365 into separate structures for
the apmixedsys, topckgen and infracfg clock controllers. This is needed
to support moving the topckgen gates into the struct mtk_clk_tree. Since
apmixedsys can also have gates, we need separate structures.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: mt8365: fix some clock parents
David Lechner [Wed, 7 Jan 2026 16:21:11 +0000 (10:21 -0600)] 
clk: mediatek: mt8365: fix some clock parents

Fix a number of clock parent definitions for MT8365 clocks. Most of
these are just informational or don't make a function change.

The clocks with the new PLL_FACTOR2 macro and the change in apu_parents
are fixing actual bugs.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: fix fixed clock parents
David Lechner [Wed, 7 Jan 2026 16:21:10 +0000 (10:21 -0600)] 
clk: mediatek: fix fixed clock parents

Add a flags field to struct mtk_fixed_clk to allow properly resolving
the parent clock. All chip-specific clocks are updated to populate this
field correctly.

The parent is currently only used for printing debug information, so
there are no functional bugs being fixed.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: add separate gates_offs for cg gates
David Lechner [Wed, 7 Jan 2026 16:21:09 +0000 (10:21 -0600)] 
clk: mediatek: add separate gates_offs for cg gates

Add a gates_offs field to struct mtk_cg_priv and use that instead of
struct mtk_clk_tree.gates_offs.

Prior to this change, struct mtk_clk_tree.gates_offs could be the offset
of struct mtk_clk_tree.gates or struct mtk_cg_priv.gates depending on
the context. This was confusing and error-prone. For example, in mt8365
there is one set of gates that needs an offset and one that does not
that share the same struct mtk_clk_tree. This is fixed in this patch by
giving the correct offset for each gate separately.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: mt8365: fix missing and out of order clocks
David Lechner [Wed, 7 Jan 2026 16:21:08 +0000 (10:21 -0600)] 
clk: mediatek: mt8365: fix missing and out of order clocks

Fix a few missing clocks and even more clocks in the incorrect order.
Since the clocks are looked up by index, having them out of order or
skipping an ID will lead to incorrect clocks being used.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agomt8365_evk_defconfig: enable clk command
David Lechner [Wed, 7 Jan 2026 16:21:07 +0000 (10:21 -0600)] 
mt8365_evk_defconfig: enable clk command

Enable CONFIG_CMD_CLK in the mt8365_evk_defconfig to allow using the
clk dump command for debugging clock configurations.

Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoMerge patch series "clk: mediatek: implement of_xlate and dump"
Tom Rini [Mon, 12 Jan 2026 19:17:00 +0000 (13:17 -0600)] 
Merge patch series "clk: mediatek: implement of_xlate and dump"

David Lechner <dlechner@baylibre.com> says:

I started looking into fixing some bugs in the mt8365 clock driver and
realized that there was no way to inspect or debug the clock trees.

I set out to implement the dump function to help with this. The driver
architecture didn't make this easy since there was no way to know the
number of elements in each of the clock arrays. The first few patches
in this series are adding fields to the data structures to hold this
information.

Once that was fixed, I was still getting crashes due to other bugs. To
work around this, I implemented the of_xlate function to validate clk
IDs as early as possible and return errors instead of crashing when
requested IDs are invalid. This also makes use of the new size fields
to prevent out of bounds array accesses. There are a couple of drivers
that remap IDs, so there are a few extra patches to handle that as well.

Then finally, I was able to implement the dump function to print out the
clock tree information without crashing. In the v1 cover letter, there
is an example of the output (it is quite long and doesn't need to be
repeated here).

Link: https://lore.kernel.org/r/20260107-clk-mtk-improvements-v2-0-7d4338e520a1@baylibre.com
13 days agoclk: mediatek: implement dump callbacks
David Lechner [Wed, 7 Jan 2026 15:50:18 +0000 (09:50 -0600)] 
clk: mediatek: implement dump callbacks

Implement dump callbacks for Mediatek clocks. On these platforms, there
are 100s of clocks, so it can be easy to miss mistakes. The dump
callbacks will be useful for debugging and verifying clock configs.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: mt7623: set unmapped IDs to -1
David Lechner [Wed, 7 Jan 2026 15:50:17 +0000 (09:50 -0600)] 
clk: mediatek: mt7623: set unmapped IDs to -1

Add range initializers to the id_offs_map arrays in the mt7623 clk
driver to set unmapped IDs to -1. This prevents accidental usage of
unmapped IDs that would otherwise map to 0.

mtk_common_clk_of_xlate() checks these values for < 0 and returns
-ENOENT in that case.

A range initializer covering the entire array is used since it is less
error-prone than manually looking up the value of each macro in the
existing initializers and checking for gaps. It is placed first so that
the specific initializers override it.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: clarify mapped vs. unmapped ID
David Lechner [Wed, 7 Jan 2026 15:50:16 +0000 (09:50 -0600)] 
clk: mediatek: clarify mapped vs. unmapped ID

Update documentation comments to clarify the difference between which
.id fields are mapped (only struct clk.id) vs. unmapped (all struct
mtk_*.id and .parent fields). The unmapped IDs are the ones defined
in the devicetree bindings, while the mapped IDs are the ones used as
the index into the various clk arrays.

Also fix spelling of "parent" while we are touching this.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: add of_xlate ops
David Lechner [Wed, 7 Jan 2026 15:50:15 +0000 (09:50 -0600)] 
clk: mediatek: add of_xlate ops

Add driver-specific of_xlate ops for MediaTek clocks. This provides
better checking of the args passed from the devicetree. Compared to
the default of_xlate implementation, this will return -EINVAL if there
are zero args (id is always required) and -ENOENT if the id is out of
range for the clock type. This will protect against out of bounds array
accesses later on when the clk->id is used to index into the clock
data arrays.

If there is a id_offs_map, then we have to do that translation first
before checking the id to see if it is in range. There is no sense in
doing the mapping multiple times, so we save the mapped ID in clk->id
and remove mtk_clk_get_id().

mtk_clk_find_parent_rate() also had to be updated since it creates a
temporary struct clk to represent the parent clock. It now has do the
translation in case the parent clock also uses an id_offs_map.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: organize infrasys functions
David Lechner [Wed, 7 Jan 2026 15:50:14 +0000 (09:50 -0600)] 
clk: mediatek: organize infrasys functions

Move all infrasys ops and related functions next to each other in the
file for better organization.

Generally all ops functions are grouped together like this for the other
ops types (apmixedsys, topckgen, etc). However the infrasys functions
were mixed in with the other sections making them harder to find. This
will also give a logical place to add any future infrasys-specific
functions.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: add array size field for id_offs_map
David Lechner [Wed, 7 Jan 2026 15:50:13 +0000 (09:50 -0600)] 
clk: mediatek: add array size field for id_offs_map

Add id_offs_map_size field to struct mtk_clk_tree and populate it for
all existing drivers.

Currently, there is no bounds checking when accessing the id_offs_map
array. Adding this field will allow for bounds checking in the future.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: add array size fields to cg gates
David Lechner [Wed, 7 Jan 2026 15:50:12 +0000 (09:50 -0600)] 
clk: mediatek: add array size fields to cg gates

Add num_gates field to struct mtk_cg_priv and populate it for all
existing drivers.

Currently, there is no bounds checking when accessing the gates array.
Adding this field will allow for bounds checking in the future.

Signed-off-by: David Lechner <dlechner@baylibre.com>
13 days agoclk: mediatek: add array size fields to clk trees
David Lechner [Wed, 7 Jan 2026 15:50:11 +0000 (09:50 -0600)] 
clk: mediatek: add array size fields to clk trees

Add num_plls, num_fclks, num_fdivs, num_muxes, and num_gates fields to
the mtk_clk_tree struct and populate them in the clk trees for all
existing drivers.

Currently, there is no bounds checking when accessing the arrays in
the clk tree structs. Adding these fields will allow for bounds checking
in the future.

Signed-off-by: David Lechner <dlechner@baylibre.com>
2 weeks agoMerge patch series "Enable / require DEVRES for devm_.alloc usage outside xPL"
Tom Rini [Fri, 9 Jan 2026 15:08:18 +0000 (09:08 -0600)] 
Merge patch series "Enable / require DEVRES for devm_.alloc usage outside xPL"

Tom Rini <trini@konsulko.com> says:

As seen by a number of patches fixing memory leaks, U-Boot has a problem
with developer expectations around devm_kmalloc and friends. Namely,
whereas in Linux these memory allocations will be freed automatically in
most cases, in U-Boot this is only true if DEVRES is enabled. Now,
intentionally, in xPL phases, we do not (and do not offer as an option)
enabling DEVRES. However in full U-Boot this is left either to the user,
or some drivers have select'd DEVRES on their own. This inconsistency is
a problem. This series goes and deals with two small issues that were
shown by having all drivers that use devm_.alloc to allocate memory also
select DEVRES and then we make DEVRES no longer be a prompted option and
instead select'd as needed. We do not make this unconditional as it
would result in growing the resulting binary on the many platforms which
have no users of the devm_.alloc family of functions.

Link: https://lore.kernel.org/r/20251227223833.3019311-1-trini@konsulko.com
2 weeks agodm: core: Default to using DEVRES outside of xPL
Tom Rini [Sat, 27 Dec 2025 22:37:11 +0000 (16:37 -0600)] 
dm: core: Default to using DEVRES outside of xPL

The devm alloc functions that we have may follow the Linux kernel model
where allocations are (almost always) automatically free()'d. However,
quite often we don't enable, in full U-Boot, the tracking and free()'ing
functionality. This in turn leads to memory leaks because the driver
author expects that since the functions have the same name as in the
Linux Kernel they have the same behavior. In turn we then get
functionally correct commits such as commit 00e1fed93c8c ("firmware:
ti_sci: Fix memory leaks in devm_ti_sci_get_of_resource") that manually
add these calls. Rather than manually tracking allocations and
implementing free()s, rework things so that we follow expectations by
enabling the DEVRES functionality (outside of xPL phases).

This turns DEVRES from a prompted symbol to a symbol that must be
select'd, and we now remove our non-managed alloc/free functions from
outside of xPL builds.

Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agox86: Increase SYS_MALLOC_F_LEN to 0x1000
Tom Rini [Sat, 27 Dec 2025 22:37:10 +0000 (16:37 -0600)] 
x86: Increase SYS_MALLOC_F_LEN to 0x1000

A few x86 platforms use a SYS_MALLOC_F_LEN value of 0x1000 or higher.
With the impending move to having DEVRES enabled by default, we will
need a little more room here. Raise the default value.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoGitlab CI: Add BeagleBone Black to sage lab
Tom Rini [Thu, 25 Dec 2025 16:14:31 +0000 (10:14 -0600)] 
Gitlab CI: Add BeagleBone Black to sage lab

This adds support for a BeagleBone Black platform to the sage lab. We
test with both the legacy network stack and lwIP.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoconfigs: am62[ap]x_evm_r5: enable SUPPORT_EMMC_BOOT
Bryan Brattlof [Fri, 26 Dec 2025 23:03:26 +0000 (17:03 -0600)] 
configs: am62[ap]x_evm_r5: enable SUPPORT_EMMC_BOOT

When unifying the SD/eMMC boot behavior between the different AM62*
reference boards we missed enabling SUPPORT_EMMC_BOOT. This causes the
SPL in tiboot3.bin to look for the tispl.bin in the UDA partition in the
eMMC and fail.

Enable SUPPORT_EMMC_BOOT at the tiboot3 stage to load the next boot
binary from the active boot partition when in RAW MMC boot modes.

Fixes: 3b7893145e36 ("mach-k3: add eMMC FS boot support for am62[ap]")
Signed-off-by: Bryan Brattlof <bb@ti.com>
2 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Thu, 8 Jan 2026 16:28:15 +0000 (10:28 -0600)] 
Merge branch 'master' of git://source.denx.de/u-boot-usb

- DWC3 for exynos7870
- Avoid a noisy message on xhci controllers

2 weeks agoMerge tag 'mmc-for-2026.04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Thu, 8 Jan 2026 16:27:17 +0000 (10:27 -0600)] 
Merge tag 'mmc-for-2026.04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-mmc

CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/28960

- Revert "Use max-frequency from device tree with default handling"
- Select CRC16 MMC_SPI_CRC_ON
- Add 1ms delay with 1ms margin after mmc power on to follow spec

2 weeks agoRevert "mmc: mmc-uclass: Use max-frequency from device tree with default handling"
Tanmay Kathpalia [Thu, 8 Jan 2026 11:40:02 +0000 (03:40 -0800)] 
Revert "mmc: mmc-uclass: Use max-frequency from device tree with default handling"

This reverts commit aebb523a23818a8ee4199c9532b51e3d4020696f.

The change to use dev_read_u32_default() with a default value of 0
causes regression for host controller drivers that hardcode f_max
before calling mmc_of_parse().

When the "max-frequency" property is not specified in the device tree,
dev_read_u32_default() returns 0, which overwrites the previously
configured f_max value set by the driver. This effectively resets
the maximum frequency to 0, breaking MMC functionality for those
controllers.

Revert to the original dev_read_u32() behavior which only updates
cfg->f_max when the "max-frequency" property is explicitly present
in the device tree, preserving driver-configured values otherwise.

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agousb: dwc3-generic: add support for exynos7870
Kaustabh Chakraborty [Thu, 8 Jan 2026 12:33:45 +0000 (18:03 +0530)] 
usb: dwc3-generic: add support for exynos7870

Exynos7870's DWC3 glue layer is quite simple, consisting of a few
clocks, which is handled by this driver. Add the compatible string in
here.

Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
2 weeks agousb: dwc3-generic: allow fallback of dr_mode property to "otg"
Kaustabh Chakraborty [Thu, 8 Jan 2026 12:33:44 +0000 (18:03 +0530)] 
usb: dwc3-generic: allow fallback of dr_mode property to "otg"

Documentation [1] states that the default value of the dr_mode property
is "otg". It also isn't marked a mandatory node, so it may or may not be
set. So, accordingly if dr_mode is not mentioned in the devicetree node,
OTG mode must be assumed.

In this driver however, this case is not handled. If dr_mode is not
mentioned, USB_DR_MODE_UNKNOWN is set. The logic implemented raises an
error, instead of falling back to USB_DR_MODE_OTG. Correct this to
conform to the specification.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Bindings/usb/usb-drd.yaml?h=v6.18-dts
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
2 weeks agousb: xhci: avoid noisy 'Starting the controller' message.
Heinrich Schuchardt [Fri, 28 Nov 2025 06:46:47 +0000 (07:46 +0100)] 
usb: xhci: avoid noisy 'Starting the controller' message.

We should avoid overwhelming users with non-essential messages.

The message 'Starting the controller' is not written for EHCI.
We should not write it for XHCI either.

Adjust the Python test accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2 weeks agommc: mmc_spi: Select CRC16 if CRC checking is enabled
Daniel Palmer [Sat, 27 Dec 2025 10:59:46 +0000 (19:59 +0900)] 
mmc: mmc_spi: Select CRC16 if CRC checking is enabled

Currently CRC16 is not selected when CRC checking is enabled and
if it wasn't enabled in the config otherwise the build will fail
because of references to crc16_ccitt() that doesn't exist.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agommc: Fix missing 1 ms delay after mmc power up
Christoph Stoidner [Fri, 31 Oct 2025 14:59:51 +0000 (15:59 +0100)] 
mmc: Fix missing 1 ms delay after mmc power up

mmc/sd specification requires a 1 ms delay (stable supply voltage)
after vdd was enabled and before issuing first command.

For most sdcard/soc combinations, the missing delay seems to be not a
problem because the processing time between enabling vdd and the first
command is often hundreds of microseconds or more. However, in our
specific case, some sdcards were not detected by u-boot:
* soc: NXP i.MX 93
* sdcards: SanDisk Ultra, 64GB micro SDXC 1,
           MediaRange, 8GB, SDHC
* measured time between vdd and first command: approx. 784us
* symptom: both sdcards did not respond at all to first commands,
           u-boot mmc subsystem ran into timeout and stops to
           initialize the cards

Signed-off-by: Christoph Stoidner <c.stoidner@phytec.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoMerge patch series "test: env: Add test for environment storage in SPI NOR"
Tom Rini [Wed, 7 Jan 2026 16:20:32 +0000 (10:20 -0600)] 
Merge patch series "test: env: Add test for environment storage in SPI NOR"

This patch series from Marek Vasut <marek.vasut+renesas@mailbox.org>
adds support for having a platform be able to convert from a
non-redundant envrionment to a redundant one at run-time.

Link: https://lore.kernel.org/r/20251223143130.16266-1-marek.vasut+renesas@mailbox.org
2 weeks agoMerge tag 'i2c-updates-for-2026.04-rc1' of https://source.denx.de/u-boot/custodians...
Tom Rini [Wed, 7 Jan 2026 14:56:31 +0000 (08:56 -0600)] 
Merge tag 'i2c-updates-for-2026.04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-i2c

Updates for 2026.04-rc1

CI: https://dev.azure.com/hs0298/hs/_build/results?buildId=198&view=results

- add support for Exynos7 HS-I2C
  from Kaustabh Chakraborty

2 weeks agoconfigs: sandbox: Enable environment in SPI NOR support
Marek Vasut [Tue, 23 Dec 2025 14:31:12 +0000 (15:31 +0100)] 
configs: sandbox: Enable environment in SPI NOR support

Make environment support in SPI NOR available in sandbox,
so the environment storage in SPI NOR can be tested in CI.
Enable redundant environment support as well to cover this
in CI tests too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoi2c: samsung: add support for Exynos7 HS-I2C
Kaustabh Chakraborty [Tue, 4 Nov 2025 06:14:13 +0000 (11:44 +0530)] 
i2c: samsung: add support for Exynos7 HS-I2C

Exynos7 (and later) HS-I2C blocks have special interrupts regarding
various data transfer states (see HSI2C_INT_I2C_TRANS_EN). Add support
for enabling and handling these interrupt bits.

Add the corresponding compatible, 'samsung,exynos7-hsi2c'. In order to
differentiate between the multiple device variants, an enum is
introduced which is used where difference in implementations exist.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
2 weeks agoenv: Add single to redundant environment upgrade path
Marek Vasut [Tue, 23 Dec 2025 14:31:11 +0000 (15:31 +0100)] 
env: Add single to redundant environment upgrade path

Add support for converting single-copy environment to redundant environment.
In case CRC checks on both redundant environment copies fail, try one more
CRC check on the primary environment copy and treat it as single environment.
If that check does pass, rewrite the single-copy environment into redundant
environment format, indicate the environment is valid, and import that as
usual primary copy of redundant environment. Follow up 'env save' will then
store two environment copies and the system will continue to operate as
regular redundant environment system.

Add test which validates this upgrade path. The test starts with spi.bin
which is pre-populated as single-copy environment and then upgrades that
environment to dual-copy environment.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agotest: env: Add test for environment storage in SPI NOR
Marek Vasut [Tue, 23 Dec 2025 14:31:10 +0000 (15:31 +0100)] 
test: env: Add test for environment storage in SPI NOR

Add test for environment stored in SPI NOR. The test works in a very
similar way to the current test for environment stored in ext4 FS,
except it generates spi.bin file backing the SPI NOR.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoMerge patch series "lzma: Add Kconfig options to optimize for size"
Tom Rini [Tue, 6 Jan 2026 20:44:27 +0000 (14:44 -0600)] 
Merge patch series "lzma: Add Kconfig options to optimize for size"

Tom Rini <trini@konsulko.com> says:

A long while ago, Darek reported that our copy of the LZMA SDK library
is quite old and so vulnerable to at least one possible security issue
he found that was fixed upstream.

This does a few things. First, we introduce a Kconfig option
to enable LZMA's size reduction option, and enable it on
gardena-smart-gateway-mt7688. This is not critical at the start, but is
as we move forward. Next, we move all the way from version 9.20 of the
LZMA SDK to version 25.01. The few deviations from upstream are the
changes we've already made to the files and are documented in our
history. Finally, we add SPDX tags to the code we've imported from the
LZMA SDK (and upstream has been asked if they're interested in this).

Link: https://lore.kernel.org/u-boot/CAC7rXdTb5u5pzP-mr_+pddCxzfcO8Vm_t-=_+5wxRitMjy6-JA@mail.gmail.com/
Link: https://lore.kernel.org/r/20251218233654.3938385-2-trini@konsulko.com
2 weeks agolzma: Add SPDX-License-Identifier lines
Tom Rini [Thu, 18 Dec 2025 23:30:58 +0000 (17:30 -0600)] 
lzma: Add SPDX-License-Identifier lines

After consulting https://spdx.org/licenses/ this code should be tagged
with the LZMA-SDK-9.22 identifer, so add them.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agolzma: Update LZMA SDK code from 9.20 to 25.01
Tom Rini [Thu, 18 Dec 2025 23:30:57 +0000 (17:30 -0600)] 
lzma: Update LZMA SDK code from 9.20 to 25.01

Currently, we have a copy of the LZMA SDK code, version 9.20, with small
updates. The original import of the LZMA SDK included a script to update the
library. This is no longer possible, due to important local changes, so
remove it. We also remove a number of extra text files that should be
unchanged from upstream, but provide no direct value to the project.
Instead, have the help text for LZMA note that this comes from the LZMA
SDK.

Next, we move our code up to the current release, 25.01. There are a
number of new header files, and some performance improvements made to
the code, at the cost of between 2 to 3 kilobytes in binary size. As
there is now a Kconfig option to disable this and retain similar speed
to what we have currently, the default option is to make this trade-off.
Our changes to the code around calling schedule() to avoid the watchdog
being triggered are kept. We add __UBOOT__ guards in two places to
prevent conflict with our own usage of these words on MIPS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agolzma: Add Kconfig options to optimize for size
Tom Rini [Thu, 18 Dec 2025 23:30:56 +0000 (17:30 -0600)] 
lzma: Add Kconfig options to optimize for size

Currently, our LZMA library has an option for optimizing for size,
rather than speed. It is a minimal savings today, and has not been worth
enabling. As this will change in the near future, add options now to
allow disabling it in full U-Boot or in SPL, and enable these on
gardena-smart-gateway-mt7688 which is very close to the size limit
today.

Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoscripts/Makefile.autoconf: use abs_srctree for out-of-tree symlink
David Lechner [Mon, 5 Jan 2026 20:35:04 +0000 (14:35 -0600)] 
scripts/Makefile.autoconf: use abs_srctree for out-of-tree symlink

Replace usage of $(srctree) with $(abs_srctree) when creating a symlink
to include/asm/arch in out of tree builds.

When building_out_of_srctree is true, $(srctree) is just "..", so the
created symlink was broken, for example:

    build-mt8365_evk/include/asm/arch -> ../arch/arm/include/asm/arch-mediatek

Which would resolve to a non-existent path:

    build-mt8365_evk/include/asm/arch/arm/include/asm/arch-mediatek

To fix, we need to use the absolute path to the source tree since we
don't know where the build tree is located relative to the source tree.

Fixes: bd3f9ee679b4 ("kbuild: Bump the build system to 6.1")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Tested-by: Sean Anderson <sean.anderson@linux.dev>
2 weeks ago.gitignore: add vpl/
Heinrich Schuchardt [Mon, 29 Dec 2025 16:10:45 +0000 (17:10 +0100)] 
.gitignore: add vpl/

Directory vpl/ only contains generated files. Git should ignore it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
2 weeks agotest: The LMB test depends on CONFIG_LMB
Heinrich Schuchardt [Wed, 24 Dec 2025 07:45:07 +0000 (08:45 +0100)] 
test: The LMB test depends on CONFIG_LMB

Many boards use CONFIG_LMB=y but not all, e.g.
amd_versal2_mini_defconfig. Building this board with CONFIG_UNIT_TEST=y
fails:

    aarch64-linux-gnu-ld:
    test/lib/lmb.c:411:(.text.test_noreserved+0x428):
    undefined reference to `lmb_free'

We should be able to enable CONFIG_UNIT_TEST on any board.

With this patch the LMB test is only built if LMB is enabled which
overcomes the build issue.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agocheckpatch: Add check for space indentation in Kconfig
Kuan-Wei Chiu [Mon, 22 Dec 2025 17:42:55 +0000 (17:42 +0000)] 
checkpatch: Add check for space indentation in Kconfig

U-Boot requires Kconfig options to be indented with tabs, whereas Linux
allows spaces. Add a U-Boot specific check to warn when spaces are used
for indentation in Kconfig files.

To ensure this check is executed, move the u_boot_line() invocation in
process() to occur before the valid source file check. Previously,
Kconfig files were skipped by the file extension filter before the
U-Boot specific checks could run.

Example warning:

WARNING: Kconfig indentation should use tabs
+    bool

Link: https://lore.kernel.org/u-boot/20251222162026.GA847766@bill-the-cat/
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoclk: mediatek: remove CLOCK_PARENT_* aliases
David Lechner [Thu, 11 Dec 2025 22:32:10 +0000 (16:32 -0600)] 
clk: mediatek: remove CLOCK_PARENT_* aliases

Remove the CLOCK_* aliases of the CLOCK_PARENT_* macros. One name for
each flag is sufficient.

Signed-off-by: David Lechner <dlechner@baylibre.com>
2 weeks agoMerge patch series "Add support for MT8188"
Tom Rini [Tue, 6 Jan 2026 18:50:35 +0000 (12:50 -0600)] 
Merge patch series "Add support for MT8188"

Julien Stephan <jstephan@baylibre.com> says:

The MediaTek MT8188 is a ARM64-based SoC with a dual-core Cortex-A78
cluster and a six-core Cortex-A55 cluster. It includes UART, SPI,
USB3.0 dual role, SD and MMC cards, UFS, PWM, I2C, I2S, S/PDIF, and
several LPDDR3 and LPDDR4 options.

This series adds basic support for MT8188.

Link: https://lore.kernel.org/r/20251209-add-mt8188-support-v2-0-31dbfcf7303c@baylibre.com
2 weeks agoclk: mediatek: add MT8188 clock driver
Julien Masson [Tue, 9 Dec 2025 10:22:25 +0000 (11:22 +0100)] 
clk: mediatek: add MT8188 clock driver

The following clocks have been added for MT8188 SoC:
apmixedsys, topckgen, infracfg, pericfg and imp_iic_wrap

These clocks driver are based on the ones present in the kernel:
drivers/clk/mediatek/clk-mt8188-*

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
2 weeks agoarm: mediatek: add support for MediaTek MT8188 SoC
Julien Masson [Tue, 9 Dec 2025 10:22:24 +0000 (11:22 +0100)] 
arm: mediatek: add support for MediaTek MT8188 SoC

This adds basic support for MediaTek MT8188 SoC.

Add watchdog support by adding upstream compatible string.

Add tphy support by adding "mediatek,generic-tphy-v2" compatible string
in arch/arm/dts/mt8188-u-boot.dtsi

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
2 weeks agoCI: Add "allyesconfig" to one of the build jobs
Tom Rini [Wed, 31 Dec 2025 17:13:41 +0000 (11:13 -0600)] 
CI: Add "allyesconfig" to one of the build jobs

Now that we can have "make allyesconfig" build and link, add this type
of build to the job which builds host tools as well. In GitLab, make
this job rather than binman testsuite be the job which unblocks the next
stage of the pipeline. This is because we had been using that job for
"sandbox builds", and now that we have an explicit test for that, we
should use it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agospi: Correct dependencies on AIROHA_SNFI_SPI
Tom Rini [Tue, 30 Dec 2025 17:10:38 +0000 (11:10 -0600)] 
spi: Correct dependencies on AIROHA_SNFI_SPI

This driver is only possible to build on ARCH_AIROHA, so update the
dependencies.

Fixes: 6134e4efd432 ("spi: airoha: Add Airoha SPI NAND driver")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 6 Jan 2026 15:13:29 +0000 (09:13 -0600)] 
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoMerge branch 'next'
Tom Rini [Mon, 5 Jan 2026 21:12:02 +0000 (15:12 -0600)] 
Merge branch 'next'

2 weeks agoPrepare v2026.01 v2026.01
Tom Rini [Mon, 5 Jan 2026 20:49:22 +0000 (14:49 -0600)] 
Prepare v2026.01

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agokbuild: Produce diff between base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1 next
Marek Vasut [Fri, 19 Dec 2025 02:40:44 +0000 (03:40 +0100)] 
kbuild: Produce diff between base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1

In case DEVICE_TREE_DEBUG is set, produce a diff between the base DT and
DT with U-Boot extras, to show how much does the U-Boot DT differ from
the base DT. This is particularly useful together with OF_UPSTREAM, to
minimize the diff between upstream DTs and U-Boot DTs.

This requires DTC 1.7.2 which does not resolve phandles when used in
the 'dtc -I dts -O dts ...' mode. With older DTC, the diff is full of
churn due to the resolved phandles.

Example usage:
$ make r8a779g3_sparrowhawk_defconfig && make DEVICE_TREE_DEBUG=1
$ cat ./dts/upstream/src/arm64/renesas/r8a779g3-sparrow-hawk.dtb.diff

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoscripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c
Marek Vasut [Tue, 2 Dec 2025 19:32:50 +0000 (20:32 +0100)] 
scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c

Synchronize local copy of DTC with Linux 6.17 . This includes the
following picked and squashed commits from Linux kernel. The squash
was necessary, since the DTC here contains changes which were also
part of DTC in Linux alraedy, and the squash helped resolve those
without going back and forth with the changes.

The following commits from Linux are picked:

8f324cd712df7 # scripts/dtc: consolidate include path options in Makefile
b5b3d9b63b0ee # scripts/dtc: Add yamltree.c to dtc sources
7d97a76f226d6 # scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4
ea6f243be74e5 # scripts/dtc: Update to upstream version v1.4.7-57-gf267e674d145
02d435d4eccd8 # scripts/dtc: Update to upstream version v1.5.0-23-g87963ee20693
6e321b7637396 # scripts/dtc: Update to upstream version v1.5.0-30-g702c1b6c0e73
9f19ec91a7a35 # scripts/dtc: dtx_diff - add color output support
8287d642f38d1 # scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a
4c52deef9225d # scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles"
5d3827e1452ed # scripts/dtc: Remove unused makefile fragments
40dd266887654 # scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9
8d4cf6b6acb59 # scripts/dtc: use pkg-config to include <yaml.h> in non-standard path
b9bf9ace5ae90 # scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c
69a883b6f5ac0 # scripts/dtc: dtx_diff - make help text formatting consistent
8f829108b8aed # scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
b39b4342ac495 # scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121
93c6424c486b3 # scripts: dtc: Fetch fdtoverlay.c from external DTC project
0dd574a1d75c3 # scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9
ec38b5df8a231 # scripts: dtc: Build fdtoverlay tool
a0c8c431411f5 # scripts: dtc: Remove the unused fdtdump.c file
e7dc653d4e890 # scripts/dtc: Add missing fdtoverlay to gitignore
d2bf5d2e3f09c # scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8
a60878f5532d0 # scripts/dtc: dtx_diff: remove broken example from help text
8b739d8658a9b # scripts/dtc: Call pkg-config POSIXly correct
b6eeafa67df00 # scripts/dtc: Update to upstream version v1.6.1-63-g55778a03df61
f96cc4c787588 # scripts/dtc: Update to upstream version v1.6.1-66-gabbd523bae6e
09ab9c092ef2b # scripts/dtc: Update to upstream version v1.7.0-93-g1df7b047fe43
ded8a5a498f2d # scripts/dtc: Update to upstream version v1.7.0-95-gbcd02b523429
ee6ff6fca7e71 # scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c

This also includes forward port of U-Boot commit
e8c2d25845c7 ("libfdt: Revert 6dcb8ba4 from upstream libfdt")
to avoid binary size growth.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoMerge tag 'scmi-master-2026-1-5' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 5 Jan 2026 14:39:49 +0000 (08:39 -0600)] 
Merge tag 'scmi-master-2026-1-5' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq

CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/28902

- Fix non-CCF priv initialization in scmi_clk_gate()
- Fix typo in scmi_clk_get_attibute()
- Remove duplicated scmi_generic_protocol_version() request

3 weeks agoclk: scmi: Remove duplicated scmi_generic_protocol_version() request
Patrice Chotard [Thu, 18 Dec 2025 17:27:03 +0000 (18:27 +0100)] 
clk: scmi: Remove duplicated scmi_generic_protocol_version() request

scmi_generic_protocol_version() request is done twice in scmi_clk_probe().
Remove first call which is useless.

Fixes: ae7e0330ce22 ("clk: scmi: add compatibility with clock protocol 2.0")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 weeks agoclk: scmi: Fix priv initialization in scmi_clk_gate()
Patrice Chotard [Thu, 18 Dec 2025 17:27:02 +0000 (18:27 +0100)] 
clk: scmi: Fix priv initialization in scmi_clk_gate()

In scmi_clk_probe(), in case of CLK_CCF is not enabled, parent private
data is not set, so in scmi_clk_gate(), an uninitialized priv struct is
retrieved.

SCMI request is performed either using scmi_clk_state_in_v1 or
scmi_clk_state_in_v2 struct depending of the unpredictable value of
priv->version which leads to error during SCMI clock enable.

Issue detected on STM32MP157C-DK2 board using the SCMI device tree
stm32mp157c-dk2-scmi.dts.

Fixes: 0619cb32030b ("firmware: scmi: Add clock v3.2 CONFIG_SET support")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 weeks agoclk: scmi: Fix typo scmi_clk_get_attibute
Patrice Chotard [Thu, 18 Dec 2025 17:27:01 +0000 (18:27 +0100)] 
clk: scmi: Fix typo scmi_clk_get_attibute

Fix typo attibute, rename scmi_clk_get_attibute() to
scmi_clk_get_attribute().

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 weeks agocmd: onenand: Fix handling error path in onenand_block_test
Francois Berder [Thu, 18 Dec 2025 06:48:51 +0000 (07:48 +0100)] 
cmd: onenand: Fix handling error path in onenand_block_test

If memory allocation for verify_buf fails, then one
needs to make sure that memory allocated for buf is
released.

Signed-off-by: Francois Berder <fberder@outlook.fr>
3 weeks agoconfigs: sandbox: Select environment in FAT FS support
Marek Vasut [Wed, 17 Dec 2025 20:02:50 +0000 (21:02 +0100)] 
configs: sandbox: Select environment in FAT FS support

Commit 2a38e712652f ("sandbox: add FAT to the list of usable env drivers")
made environment storage in FAT available on sandbox, but did not enable
the matching ENV_IS_IN_FAT in sandbox configs. This leads to environment
driver lookup failure when env in non-EXT4 is selected using 'env select':

"
env_driver_lookup: No environment driver for location 3
priority not found
"

Enable the missing ENV_IS_IN_FAT to fix this.

Fixes: 2a38e712652f ("sandbox: add FAT to the list of usable env drivers")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agocmd: bdinfo: fix incorrect Kconfig options check for print_eth()
Quentin Schulz [Thu, 18 Dec 2025 10:59:58 +0000 (11:59 +0100)] 
cmd: bdinfo: fix incorrect Kconfig options check for print_eth()

CMD_NET_LWIP has never existed so it cannot be right. I'm guessing the
intent was to allow print_eth() to be called when NET_LWIP is defined
(NET means "legacy networking stack" as opposed to NET_LWIP which is the
 newest (and incompatible) stack). There probably was some mix-up
between CMD_NET and NET options.

The dependency on CMD_NET seems unnecessary as it seems perfectly fine
to run bdinfo without CMD_NET (build and run tested). So let's instead
make the dependency on NET || NET_LWIP.

Let's sync the unit test as well.

Fixes: 95744d2527cb ("cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
3 weeks agopwm: aspeed: replace %pe in dev_err()
David Lechner [Wed, 17 Dec 2025 00:56:35 +0000 (18:56 -0600)] 
pwm: aspeed: replace %pe in dev_err()

Replace %pe with %d and adjust the argument accordingly in a dev_err()
call in the pwm-aspeed driver. U-boot doesn't support the %pe format
specifier. Likely it was copied from Linux.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
3 weeks agotoradex: tdx-cfg-block: add pid4 support for new modules
Emanuele Ghidoli [Tue, 16 Dec 2025 08:45:28 +0000 (09:45 +0100)] 
toradex: tdx-cfg-block: add pid4 support for new modules

Add new PID4 to ConfigBlock handling:
 - 0217 Lino iMX93 Dual 2GB IT
 - 0218 Lino iMX91 Solo 2GB IT
 - 0219 OSM iMX93 Dual 2GB IT
 - 0220 OSM iMX91 Solo 2GB IT
 - 0221 Verdin AM62 Dual 1GB ET

Lino and OSM are two new SoM families.
The Verdin variant differs from the existing 0073 Verdin AM62 Dual 1GB ET
by the presence of the GPU (AM625 instead of AM623), the absence of
DSI interface (bridge not mounted) and eMMC size increased to 16GB instead
of 4GB.

Link: https://www.toradex.com/computer-on-modules/lino-arm-family
Link: https://www.toradex.com/computer-on-modules/osm-arm-family
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agofs: ext4fs: Free memory while handling errors
Francois Berder [Mon, 15 Dec 2025 11:34:16 +0000 (12:34 +0100)] 
fs: ext4fs: Free memory while handling errors

If zalloc fails, one needs to free memory previously
allocated in the function. This commit makes sure that
we do not leak any memory.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Fixes: ed34f34dbaf2 ("ext4fs write support")
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
3 weeks agolib/bcd: optimize _bin2bcd() for improved performance
Kuan-Wei Chiu [Thu, 11 Dec 2025 18:31:30 +0000 (18:31 +0000)] 
lib/bcd: optimize _bin2bcd() for improved performance

[ Upstream commit cbf164cd44e06c78938b4a4a4479d3541779c319 ]

The original _bin2bcd() function used / 10 and % 10 operations for
conversion.  Although GCC optimizes these operations and does not generate
division or modulus instructions, the new implementation reduces the
number of mov instructions in the generated code for both x86-64 and ARM
architectures.

This optimization calculates the tens digit using (val * 103) >> 10, which
is accurate for values of 'val' in the range [0, 178].  Given that the
valid input range is [0, 99], this method ensures correctness while
simplifying the generated code.

Link: https://lkml.kernel.org/r/20240812170229.229380-1-visitorckw@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: Ching-Chun Huang (Jim) <jserv@ccns.ncku.edu.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[visitorckw@gmail.com: Adapt to bin2bcd() in include/bcd.h]
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
3 weeks agoconfigs: qemu_arm64: disable SEMIHOSTING
Heinrich Schuchardt [Tue, 9 Dec 2025 23:59:05 +0000 (00:59 +0100)] 
configs: qemu_arm64: disable SEMIHOSTING

Semihosting allows a virtual machine to write to the host file system.
Such dangerous settings should not be in a defconfig.

Move it to a CI configuration override.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agodm: crypto: Check malloc return value
Francois Berder [Thu, 4 Dec 2025 19:34:12 +0000 (20:34 +0100)] 
dm: crypto: Check malloc return value

tmp_buffer is allocated using malloc but failure
is not handled.
This commit ensures that we do not use a NULL pointer
if malloc fails.

Signed-off-by: Francois Berder <fberder@outlook.fr>