103776 Commits

Author SHA1 Message Date
Tom Rini
1bcb2fe324 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
2026-01-09 10:19:57 -06:00
Tom Rini
217cf656e2 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 00e1fed93c ("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>
2026-01-09 09:08:14 -06:00
Tom Rini
284e1a00f4 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>
2026-01-09 09:08:14 -06:00
Tom Rini
cf51247c63 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>
2026-01-09 09:07:17 -06:00
Bryan Brattlof
ce19a4af0a 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: 3b7893145e ("mach-k3: add eMMC FS boot support for am62[ap]")
Signed-off-by: Bryan Brattlof <bb@ti.com>
2026-01-09 09:07:13 -06:00
Petr Beneš
8ea70d8132 usb: ci_udc: cosmetics: EP and requests debug info
Make a note in an unexpected situation, e.g. queuing a request
on a disabled endpoint, enabling an enabled endpoint...

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: Petr Beneš <petr.benes@ysoft.com>
Link: https://lore.kernel.org/r/20251218142737.3169753-2-petr.benes@ysoft.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2026-01-09 09:24:39 +01:00
Petr Beneš
6a92e98276 usb: ci_udc: Check ci_ep->desc before use
There are two places where ci_ep->desc could be accessed despite it is
not valid at that moment. Either the endpoint has not been enabled yet
or it has been disabled meanwhile (The ethernet gadged behaves this way
at least.). That results in dereferencing a null pointer.

Moreover, the patch gets rid of possible outstanding requests if the
endpoint's state changes to disabled.

Signed-off-by: Petr Beneš <petr.benes@ysoft.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20251218142737.3169753-1-petr.benes@ysoft.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2026-01-09 09:24:39 +01:00
Quentin Schulz
1cd0a44106 boot: fix missing dependency for BOOTMETH_ANDROID
The code depends on set_avendor_bootimg_addr and set_abootimg_addr
functions which are only defined in cmd/abootimg.c, only built when
CMD_ABOOTIMG=y so let's add a dependency.

It should be "depends on" to be properly implemented, but we get a
circular dependency otherwise:
boot/Kconfig:566:error: recursive dependency detected!
boot/Kconfig:566:	symbol BOOTMETH_ANDROID depends on CMD_ABOOTIMG
cmd/Kconfig:504:	symbol CMD_ABOOTIMG depends on ANDROID_BOOT_IMAGE
boot/Kconfig:7:	symbol ANDROID_BOOT_IMAGE is selected by BOOTMETH_ANDROID

so instead we do a select. It is safe because CMD_ABOOTIMG depends on
ANDROID_BOOT_IMAGE which we select here as well.

Fixes: 125d9f3306 ("bootstd: Add a bootmeth for Android")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20251218-bootmeth_android-deps-v1-1-0113c804f951@cherry.de
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2026-01-09 09:24:17 +01:00
Tom Rini
c05dba22f1 Merge branch 'master' of git://source.denx.de/u-boot-usb
- DWC3 for exynos7870
- Avoid a noisy message on xhci controllers
2026-01-08 10:28:15 -06:00
Tom Rini
ed4ec707e0 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
2026-01-08 10:27:17 -06:00
Tanmay Kathpalia
c4f5b1d4b0 Revert "mmc: mmc-uclass: Use max-frequency from device tree with default handling"
This reverts commit aebb523a23.

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>
2026-01-08 22:23:48 +08:00
Kaustabh Chakraborty
14d9e84fc5 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>
2026-01-08 15:13:19 +01:00
Kaustabh Chakraborty
218ad7ba3f 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 [1]
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
2026-01-08 15:13:19 +01:00
Heinrich Schuchardt
13c9c975e7 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>
2026-01-08 15:12:59 +01:00
Daniel Palmer
3f208e1a99 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>
2026-01-08 22:05:53 +08:00
Christoph Stoidner
21cdfd1992 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>
2026-01-08 21:57:20 +08:00
Tom Rini
141be72e2a 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
2026-01-07 12:31:56 -06:00
Tom Rini
94a4e845db 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
2026-01-07 12:31:26 -06:00
Marek Vasut
8dd76166e3 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>
2026-01-07 12:31:26 -06:00
Kaustabh Chakraborty
2dd6c145ab 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>
2026-01-07 12:31:26 -06:00
Marek Vasut
1f13138581 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>
2026-01-07 12:31:26 -06:00
Marek Vasut
88de22a4db 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>
2026-01-07 12:31:26 -06:00
Tom Rini
53c0d5b387 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
2026-01-06 14:44:27 -06:00
Tom Rini
45c5bc2ca5 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>
2026-01-06 14:44:21 -06:00
Tom Rini
33c9db62d4 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>
2026-01-06 14:44:21 -06:00
Tom Rini
e7797f450a 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>
2026-01-06 14:44:21 -06:00
David Lechner
726d11289f 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: bd3f9ee679 ("kbuild: Bump the build system to 6.1")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Tested-by: Sean Anderson <sean.anderson@linux.dev>
2026-01-06 14:42:48 -06:00
Heinrich Schuchardt
75a5404a58 .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>
2026-01-06 13:04:43 -06:00
Heinrich Schuchardt
81b3558e74 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>
2026-01-06 13:04:39 -06:00
Kuan-Wei Chiu
eea1c6ec4e 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>
2026-01-06 13:04:03 -06:00
David Lechner
e21edf2620 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>
2026-01-06 12:50:45 -06:00
Tom Rini
f646b7749a 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
2026-01-06 12:50:35 -06:00
Julien Masson
11f3cc4632 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>
2026-01-06 12:50:12 -06:00
Julien Masson
633e5602aa 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>
2026-01-06 12:50:12 -06:00
Tom Rini
1d59479362 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>
2026-01-06 11:23:18 -06:00
Tom Rini
03f2be416b spi: Correct dependencies on AIROHA_SNFI_SPI
This driver is only possible to build on ARCH_AIROHA, so update the
dependencies.

Fixes: 6134e4efd4 ("spi: airoha: Add Airoha SPI NAND driver")
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-01-06 11:23:13 -06:00
Tom Rini
36aeeb591b configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2026-01-06 09:13:29 -06:00
Tom Rini
c344087025 Merge branch 'next' 2026-01-05 15:12:02 -06:00
Tom Rini
127a42c725 Prepare v2026.01
Signed-off-by: Tom Rini <trini@konsulko.com>
v2026.01
2026-01-05 14:49:22 -06:00
Marek Vasut
6cdd7597a2 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>
2026-01-05 09:02:19 -06:00
Marek Vasut
0535e46d55 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
e8c2d25845 ("libfdt: Revert 6dcb8ba4 from upstream libfdt")
to avoid binary size growth.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2026-01-05 09:01:59 -06:00
Tom Rini
228810d0ba 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
2026-01-05 08:39:49 -06:00
Patrice Chotard
4c3aa5356d 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: ae7e0330ce ("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>
2026-01-05 10:04:48 +08:00
Patrice Chotard
0e9055b148 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: 0619cb3203 ("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>
2026-01-05 10:04:48 +08:00
Patrice Chotard
9a23c1e5f2 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>
2026-01-05 10:04:48 +08:00
Kuan-Wei Chiu
9ac621e671 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>
2026-01-02 15:51:54 -06:00
Francois Berder
5e76249790 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>
2026-01-02 15:51:54 -06:00
Heinrich Schuchardt
f2f69886ac 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>
2026-01-02 15:51:54 -06:00
Marek Vasut
c55221f1a2 configs: sandbox: Select environment in FAT FS support
Commit 2a38e71265 ("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: 2a38e71265 ("sandbox: add FAT to the list of usable env drivers")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2026-01-02 15:51:54 -06:00
Francois Berder
737386977b 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>
2026-01-02 15:51:54 -06:00