28225 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 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>
2026-01-09 09:08:14 -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
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
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
David Lechner
fd104bea0c arm: dts: mediatek: switch mt8365 to OF_UPSTREAM
Change mt8365_evk_defconfig to use CONFIG_OF_UPSTREAM=y and delete the
U-Boot copy of the devicetree source files for mt8365.

The upstream devicetree is identical to the U-Boot one being removed
(other than having more nodes for devices not used by U-Boot and
upstream fixed a compatible string in &scpsys, also not affecting
U-Boot).

There was one minor glitch with upstream missing a few topckgen macro
definitions, so those are added to the clock driver directly as a
workaround.

Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
2025-12-31 11:50:56 -06:00
Tom Rini
5652ccc86a Merge patch series "video: display: refactor display_read_timing to avoid code duplication"
Julien Stephan <jstephan@baylibre.com> says:

Commit 2dcf143398ad ("dm: video: Repurpose the 'displayport' uclass to 'display'")
left the display_read_edid() function unused by mistake.

This series addresses that oversight and introduces a new useful cmd.

Patch 1:
 - Refactors display_read_timing() to use the existing
   display_read_edid() function, eliminating redundant code.
 - Marks display_read_edid() as static since it is not used outside of
   the file.

Patch 2:
 - Adds a new read_edid command, which can be very useful for debugging
   or developing new display drivers.
 - As this command uses display_read_edid(), the function is made
   non-static again.

Link: https://lore.kernel.org/r/20250630-read_edid_cleanup-v1-0-ec7d425472c7@baylibre.com
2025-12-30 11:23:00 -06:00
Julien Stephan
5e9b0b56ad cmd: add new command to read edid
Add a new command to read EDID info from connected display.

When applicable EDID can also be retrieved by commands such as:

  i2c dev x
  i2c edid 0x50

but the new read_edid function relies on the implementation of the
read_edid callback from DISPLAY driver.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2025-12-30 11:22:57 -06:00
Tom Rini
4df43f4474 Merge tag 'u-boot-imx-next-20251229' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/28866

- Swicth imx8ulp-evk to standard boot and OF_UPSTREAM.
- Cleanup of the IPUv3 video driver.
- Add support for the NXP FRDM-IMX91 board.
- Make flash.bin target available on i.MX9.
- Fix mxsfb pixel clock polarity.
2025-12-29 12:23:35 -06:00
Brian Ruley
f010993606 video: imx: ipuv3: refactor to use dm-managed state
Get rid of most globals that are spread around between TU's and place
them in their own structs managed by dm. Device state is now owned by
each driver instance. This design mirrors the Linux IPUv3 driver
architecture.

This work is done in preparation to migrate the driver to the clock
framework. While not the primary intent, this change also enables
multiple IPU instances to exist contemporarily.

Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
2025-12-29 10:17:01 -03:00
Joseph Guo
e4eccb860a imx: Support i.MX91 11x11 FRDM board
Add i.MX91 11x11 FRDM Board support.
 - Four ddr scripts included w/o inline ecc feature. Support
   both 1gb and 2gb DDR
 - SDHC/EQOS/I2C/UART supported
 - PCA9451 supported, default nominal drive mode
 - Documentation added.

Signed-off-by: Joseph Guo <qijian.guo@nxp.com>
2025-12-29 10:17:01 -03:00
Alice Guo
0da3a8a939 imx8ulp_evk: Move environment variables to .env file
Add board-specific environment variables to imx8ulp_evk.env for better
maintainability. Define bsp_bootcmd in the environment to resolve the
runtime error: "bsp_bootcmd" not defined.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-12-29 10:17:00 -03:00
Alice Guo
d4863fcca8 imx8ulp_evk: Convert to standard boot
Replace CONFIG_DISTRO_DEFAULTS with CONFIG_BOOTSTD_FULL to enable the
standard boot framework and use standard boot on i.MX8ULP.

Update CONFIG_BOOTCOMMAND to run bootflow scan before falling back to
board-specific bootcmd, and remove legacy distro boot environment from
imx8ulp_evk.h since bootstd now handles boot targets.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-12-29 10:17:00 -03:00
Marek Vasut
5b968372e2 i2c: Inline i2c_chip_of_to_plat() into i2c_child_post_bind()
The i2c_chip_of_to_plat() is called only from i2c_child_post_bind(),
inline i2c_chip_of_to_plat() into i2c_child_post_bind(). Drop the
if CONFIG_IS_ENABLED(OF_REAL) and depend on if (!dev_has_ofnode(dev))
which does check CONFIG_IS_ENABLED(OF_REAL) internally too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-27 09:40:35 -06:00
Tom Rini
baf076aeb3 Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next
- configs: tegra-common-post: Stop disabling device tree relocation
2025-12-23 08:11:36 -06:00
Tom Rini
5467cd5ffd configs: tegra-common-post: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

If there is some window of memory that must be used for where the device
tree is relocated to, bootm_low + bootm_size (or often just bootm_size)
or bootm_mapsize are the correct way do this. Please see
doc/usage/environment.rst for more details.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
2025-12-21 17:01:12 +02:00
Tom Rini
2aeaa3c4f5 AMD/Xilinx/FPGA changes for v2026.04-rc1
xilinx:
 - Sync ESRT with detected GUID
 - DT cleanups
 - Add logic for FRU information multiple times
 - Enable more drivers pca9541, usb5744
 - Enable more commands
 - Cleanup firmware DT bindings
 
 firmware:
 - Add enhancement SMC format support
 
 clk/versal:
 - Various cleanups
 - Add support for Versal Gen 2
 
 i2c:
 - cdns: Add timeout for RXDV status bit polling
 
 spi:
 - cadence: Remove cdns,is-dma DT property
 - cadence: Remove duplicated return
 - cadence_versal: Update flash reset delay
 
 memtop:
 - Update max memory reserved spaces to 64
 
 Versal Gen 2:
 - Aligned addresses with default memory map
 - Add support for reading multiboot value
 
 MB-V:
 - Make SPL smaller
 - Add support for SPI
 - Move SPL to run out of BRAM
 
 ZynqMP:
 - Change default load address for BL32
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSXAixArPbWpRanWW+rB/7wTvUR9QUCaUUtkwAKCRCrB/7wTvUR
 9ZtFAPwIObXr8YTPrvBp2zWwUCPn2tCxnj1Mgs2WclBSpydfhgEAxilAU/As2SZs
 hGpVpWSsb9XGlwqJ0/0+CeZEDC4oNgE=
 =E9f9
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2026.04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

AMD/Xilinx/FPGA changes for v2026.04-rc1

xilinx:
- Sync ESRT with detected GUID
- DT cleanups
- Add logic for FRU information multiple times
- Enable more drivers pca9541, usb5744
- Enable more commands
- Cleanup firmware DT bindings

firmware:
- Add enhancement SMC format support

clk/versal:
- Various cleanups
- Add support for Versal Gen 2

i2c:
- cdns: Add timeout for RXDV status bit polling

spi:
- cadence: Remove cdns,is-dma DT property
- cadence: Remove duplicated return
- cadence_versal: Update flash reset delay

memtop:
- Update max memory reserved spaces to 64

Versal Gen 2:
- Aligned addresses with default memory map
- Add support for reading multiboot value

MB-V:
- Make SPL smaller
- Add support for SPI
- Move SPL to run out of BRAM

ZynqMP:
- Change default load address for BL32
2025-12-19 10:30:53 -06:00
Tom Rini
adbbf5982d - Add u-boot SPL support for GX SoCs
- meson_gx_mmc: reduce maximum frequency
 - Add support for EFI capsule updates on all Amlogic boards
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmlFKS4ACgkQd9zb2sjI
 SdE1LRAA0L49BS4NnJw5jbhA4SJoyDc9YbTBJqHtPeNK37Mc/G+H9RDa1pK2SFMe
 VJb8N9I+4UCuL0Qgg1OQLkj3zucRepgquc7SVPTVc0S3PWVAhOOpX6JfqoshavA2
 BLi6eVz3HasOh3EH4gxkHLk+Uvg2EbzNb74U0MXWMRjCl2NHYuGyyMtDAFd8gsWr
 vBXNIDJiOHz0l5YkZ/LVNq8NDkyRtwfVtHzmlpf8zsA4sYv70e2j7p++96dL3Kem
 IkuEAkWDPZqpLR1putssQkuryVR7LjluiAid4IZzGQSfhdhtDDOPhcSDdO5huqWB
 seqJfgnER2yT+ow1uqZII1ND9X5d2wOL/Kpx0feGaiiHcCkjOM4gnTnMZJMAl4d5
 m4JRp56wwtcmJPxfArsWZaGmyuHfz7jFsSxANhIqDWsWrR3Mr4YQvJ+VqN1WR9ky
 gM5Ok8L9Yhc9Fgm826ehkYoTUo20gPn2MvXjtLPXK7594gElmQslTH56dc87Jykv
 OjjLLZvPZboasPIKkYkezh2HYsPqIE78VjM9Wq8yG3BZekMw+BxnUhNIxcq/kiGI
 muTBfCvXEYZV4ojuEVHoOU2og5fUP8eDMz4sMiWejITmwo0qavBX3uPDR+fIWrmN
 eM2zhlMqG86WHLh1oFG1xqptNMN9POaxM338QA7T8C2sIt3vdtw=
 =sxXr
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-next-20251219' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- Add u-boot SPL support for GX SoCs
- meson_gx_mmc: reduce maximum frequency
- Add support for EFI capsule updates on all Amlogic boards
2025-12-19 10:30:26 -06:00
Michal Simek
e9ce819f93 xilinx: versal: Get rid of xlnx-versal-power.h from bindings
Remove xlnx-versal-power.h dt binding header because they should be moved
directly to folder where DTs are. In the Linux kernel this shift already
started by moving xlnx-zynqmp-clk.h to arch/arm64/boot/dts/xilinx/ folder.

U-Boot is using only one PD_DEV_OSPI constact which is moved to
zynqmp_firmware.h header. But handling around it should be fixed anyway
because no driver should be calling xilinx_pm_request() directly.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a0f0154ef89929517c3217efe025e8021a910b90.1764233963.git.michal.simek@amd.com
2025-12-19 08:25:27 +01:00
Michal Simek
a078ebb86f firmware: xilinx: Add support for enhancement SMC format
Versal Gen 2 is using different SMC format that's why firmware and clock
drivers needs to be align with it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/16bdee56fd75113c6d531bae7a8a34900b10280d.1762788250.git.michal.simek@amd.com
2025-12-19 08:25:26 +01:00
Tom Rini
930eff5416 Merge tag 'u-boot-socfpga-next-20251217' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next
This pull request brings together a set of fixes and enhancements across
the SoCFPGA platform family, with a focus on MMC/SPL robustness, EFI
boot enablement, and Agilex5 SD/eMMC support.

CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/28776

Highlights:

  *
    SPL / MMC:
      o
        Fix Kconfig handling for
        SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
      o
        Correct raw sector calculations and respect explicit sector values
        when loading U-Boot from MMC in SPL
      o
        Adjust raw MMC loading logic for SoCFPGA platforms
  *
    EFI boot:
      o
        Permit EFI booting on SoCFPGA platforms
      o
        Disable mkeficapsule tool build for Arria 10 where unsupported
  *
    Agilex5:
      o
        Upgrade SDHCI controller from SD4HC to SD6HC
      o
        Enable MMC and Cadence SDHCI support in defconfig
      o
        Add dedicated eMMC device tree and defconfig for Agilex5 SoCDK
      o
        Revert incorrect GPIO configuration for SDIO_SEL
      o
        Refine U-Boot DT handling for SD and eMMC boot variants
  *
    SPI:
      o
        Allow disabling the DesignWare SPI driver in SPL via Kconfig
  *
    Board / configuration fixes:
      o
        Enable random MAC address generation for Cyclone V
      o
        Fix DE0-Nano-SoC boot configuration
      o
        Remove obsolete or conflicting options from multiple legacy
        SoCFPGA defconfigs
2025-12-18 08:06:10 -06:00
Jan Kiszka
94d0c1d3ed spl: mmc: Account for SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE being a choice
Add SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE as condition where so
far SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION was enough - though often
by chance as both options were enabled.

Reorder the #ifdef blocks at this chance to follow the order in the
Kconfig menu.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-17 18:50:32 +08:00
Tom Rini
a333d9e59f Merge patch series "fit: print conf node compatibles + use property string constants"
Quentin Schulz <foss+uboot@0leil.net> says:

This does a bit of "cleanup" by reusing constants for some FIT
properties instead of having the same string in multiple places.

Additionally, this adds a new constant for the compatible property in
FIT configuration nodes[1] which is useful for FIT images with multiple
FIT configuration nodes to support multiple devices in the same blob.
U-Boot will try to figure out which node to select based on that
compatible[2].

However, if this property is missing (and the first blob in the fdt
property of the configuration node is uncompressed), the compatible from
the root node of the associated kernel FDT will be used for the
autoselection mechanism. For now, I only print the property if it
exists, but maybe it'd make sense to expose the fallback one if it's
missing. I guess we can implement that later on if desired.

[1] https://fitspec.osfw.foundation/#optional-properties compatible paragraph
[2] https://fitspec.osfw.foundation/#select-a-configuration-to-boot

Link: https://lore.kernel.org/r/20251203-fit-compat-v2-0-0fea56f23809@cherry.de
2025-12-16 11:40:54 -06:00
Quentin Schulz
3059eb0c27 boot/fit: declare (and use) new constant for conf's compatible prop
Fit conf node may have a compatible property[1] which stores the root
compatible of the first blob in the fdt property of the node. This can
be used to automatically select the proper conf node based on the
compatible from the running U-Boot (matching the former's compatible
with the latter)[2].

This adds (and uses) this constant for FIT node parsing.

Note that this property may also appear in fpga image nodes[3] but that
isn't done in this commit.

[1] https://fitspec.osfw.foundation/#optional-properties compatible paragraph
[2] https://fitspec.osfw.foundation/#select-a-configuration-to-boot
[3] https://fitspec.osfw.foundation/#images-node 2.3.2 Conditionally mandatory property

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-12-16 11:39:38 -06:00
Emanuele Ghidoli
3f0528882c board: toradex: add aquila am69 support
Add initial support for the Toradex Aquila AM69 module.

The Aquila AM69 SoM is based on the TI AM69 SoC from the Jacinto 7
family and is designed for high-end embedded computing, featuring up to
32GB of LPDDR4 and 256GB eMMC storage, extensive multimedia support (3x
Quad CSI, 2x Quad DSI, DisplayPort, 5x Audio I2S/TDM), six Ethernet
interfaces (1x 1G, 4x 2.5G SGMII, 1x 10G), USB 3.2 Host/DRD support, and
a Wi-Fi 7/BT 5.3 module, alongside an RX8130 RTC, I2C EEPROM and
Temperature Sensor, and optional TPM 2.0 module.

Link: https://www.toradex.com/computer-on-modules/aquila-arm-family/ti-am69
Link: https://www.toradex.com/products/carrier-board/aquila-development-board-kit
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Co-developed-by: Parth Pancholi <parth.pancholi@toradex.com>
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Co-developed-by: Franz Schnyder <franz.schnyder@toradex.com>
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-12-16 11:38:23 -06:00
Tom Rini
802fbe0a28 Merge tag 'mmc-next-2025-12-11' of https://source.denx.de/u-boot/custodians/u-boot-mmc into next
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/28729

- mmc: assign f_max to 0 when max-frequency property not exist
- Improvements and minor fixes for Cadence SDHCI driver
2025-12-11 08:12:49 -06:00
Tanmay Kathpalia
90f43c7edc mmc: sdhci: Add SDHCI_SPEC_400, _410, and _420 version defines
Add SDHCI_SPEC_400, SDHCI_SPEC_410, and SDHCI_SPEC_420 macros to sdhci.h
to support newer SDHCI specification versions. These defines are required
for compatibility with controllers implementing SDHCI 4.0 and above.

Reference:
https://lore.kernel.org/all/1535617305-16952-2-git-send-email-zhang.chunyan@linaro.org/

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
Reviewed-by: Balsundar Ponnusamy <balsundar.ponnusamy@altera.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-11 20:53:51 +08:00
Jonas Karlman
18c1654567 tools: mkimage: Add Amlogic Boot Image type
Add support for creating an Amlogic Boot Image that pass CHK in BL1 on
Amlogic AArch64 SoCs.

Images can optionally be signed for secure boot scenario, however
creation of signed images has not been implemented.

Example of how to use it:
  # Create an amlogic boot image
  tools/mkimage -T amlimage -n gxbb -d u-boot-spl.bin u-boot-amlogic.bin

  # List boot image header information
  tools/mkimage -l u-boot-amlogic.bin

  # Extract amlogic boot image payload
  tools/dumpimage -T amlimage -o bl2-payload.bin u-boot-amlogic.bin

Or with binman using something like:
  binman {
	u-boot-amlogic {
		filename = "u-boot-amlogic.bin";
		pad-byte = <0xff>;

		mkimage {
			filename = "bl2.bin";
			args = "-n", "gxbb", "-T", "amlimage";

			u-boot-spl {
			};
		};
	};
  };

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
[Ferass: check digest type in _print_header, version in _verify_image]
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Link: https://patch.msgid.link/20251126-spl-gx-v5-1-6cbffb2451ca@postmarketos.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-12-11 11:44:41 +01:00
Tom Rini
a23a1e8ca5 ls1043a: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-11 18:42:20 +08:00
Tom Rini
d2f0eadb19 ls1012afrdm: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-12-11 18:42:20 +08:00
Beleswar Padhi
da54deb1ac configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM
The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB
firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents
U-Boot from relocating into that memory, but it is still open for access
for any other usage.

Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the
ram size itself ensuring that memory is not visible to U-Boot at all
(either for reloc, or general usage).

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
2025-12-10 09:28:37 -06:00
Tom Rini
e09d04dae5 Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/28674

- riscv: Implement private GCC library
- mpfs: Add MPFS CPU Implementation
- andes: Stop disabling device tree relocation and some minor fixes
- sifive: Stop disabling device tree relocation
- starfive: Cleanup size types and typos
2025-12-08 15:10:53 -06:00
Tom Rini
59202e5ae7 Prepare v2026.01-rc4
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCaTchRAAKCRAr4qD1Cr/k
 CrO7AP4krur8pHNA7jaKYZqIqYtJNFWay1gBmhwKCMY3w3e6+AD+Ma1/Ehqyy81g
 evgaI1RmELrPQozZtXgKpzTS5YAL7wo=
 =vTwE
 -----END PGP SIGNATURE-----

Merge tag 'v2026.01-rc4' into next

Prepare v2026.01-rc4
2025-12-08 13:17:27 -06:00
Tom Rini
7a12507e35 sifive-unleashed: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-08 12:10:51 +08:00
Tom Rini
17ffa78ecf ae350: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-12-08 12:10:47 +08:00
Tom Rini
17d1e039e1 Merge patch series "test/py: fit: Deduplicate the test"
This series from Marek Vasut <marek.vasut@mailbox.org> cleans up some of
the FIT pytests we have and then extends mkimage to support including
the TEE in FIT images when using "-f auto" to create the resulting FIT.

Link: https://lore.kernel.org/r/20251125154324.51940-1-marek.vasut@mailbox.org
2025-12-06 11:46:15 -06:00
Marek Vasut
22aa122eee mkimage: Add support for bundling TEE in mkimage -f auto
Introduce two new parameters to be used with mkimage -f auto to bundle
TEE image into fitImage, using auto-generated fitImage. Add -z to specify
TEE file name and -Z to specify TEE load and entry point address. This is
meant to be used with systems which boot all of TEE, Linux and its DT from
a single fitImage, all booted by U-Boot.

Example invocation:
"
$ mkimage -E -A arm -C none -e 0xc0008000 -a 0xc0008000 -f auto \
          -d arch/arm/boot/zImage \
          -b arch/arm/boot/dts/st/stm32mp135f-dhcor-dhsbc.dtb \
          -z ../optee_os/out/arm-plat-stm32mp1/core/tee-raw.bin \
	  -Z 0xde000000 \
          /path/to/output/fitImage
"

Documentation update and test are also included, the test validates
both positive and negative test cases, where fitImage does not include
TEE and does include TEE blobs.

Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
2025-12-06 11:46:09 -06:00
Cibil Pankiras
1165e8efcb reboot-mode: Correct macro name from U_BOOT_DEVICE to U_BOOT_DRVINFO
The macro U_BOOT_DEVICE has been renamed to U_BOOT_DRVINFO.
This patch updates the reference in reboot-mode-gpio.h.

Signed-off-by: Cibil Pankiras <cibil.pankiras@egym.com>
2025-12-05 16:24:56 -06:00
Quentin Schulz
c4594242aa led: remove support for red LED in legacy API
To the exception of red_led_on in the arm-specific assembly code, all
code interacting with the red status LED was guarded by the
CONFIG_LED_STATUS_RED symbol, which is enabled in none of the upstream
defconfigs.

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

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
2025-12-05 13:38:09 -06:00
Quentin Schulz
16415e9563 led: remove support for green status led in legacy API
The last user of it was removed in a previous commit so let's remove its
support entirely.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
2025-12-05 13:38:09 -06:00
Quentin Schulz
715107089f net: remove unreachable legacy LED code
The code is guarded by a condition none of the defconfigs meet (that is
CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled),
so we can remove the unreachable code sections.

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

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

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-05 10:34:52 -06:00
Quentin Schulz
c31f51d502 led: remove coloured_LED_init, yellow and blue status LEDs in legacy API
The last user of coloured_LED_init has been recently removed, so we can
remove all places it's called and defined as it does nothing now.

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

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-12-05 10:34:52 -06:00
Quentin Schulz
abc34fa944 led: remove code guarded by always false conditions
The last CONFIG_MVS in code was removed almost 12 years ago in commit
3b98b57fa796 ("include: delete unused header files").

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

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

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

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-05 10:34:52 -06:00
Tom Rini
59f9fcc1f5 vexpress_aemv8: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:11:26 -06:00
Tom Rini
a1e6508e49 pcm052: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:09:52 -06:00
Tom Rini
ab5e87e624 omap3_evm: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:09:18 -06:00
Tom Rini
dd3f5eac8c hikey960: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:08:19 -06:00
Tom Rini
c404db942c hikey: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:07:33 -06:00
Tom Rini
39b10f534f bcmstb: Make use of bootm_size rather than fdt_high
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS. However, this platform also has a large comment
block that explains that given previous stage loaders and other parts of
the memory map (that may not be in the device tree we see?), adjust this
to use bootm_size to restrict relocation to be below the CMA area and
update the comment to match.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:06:28 -06:00
Tom Rini
5b6432484d am335x_shc: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Reviewed-by: Heiko Schocher <hs@nabladev.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 15:05:34 -06:00