]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
3 weeks agoriscv: Add Kconfig options to distinguish Zaamo and Zalrsc
Yao Zi [Tue, 2 Sep 2025 08:19:30 +0000 (08:19 +0000)] 
riscv: Add Kconfig options to distinguish Zaamo and Zalrsc

Ratified on Apr. 2024, the original RISC-V "A" extension is now split
into two separate extensions, "Zaamo" for atomic operations and "Zalrsc"
for load-reserved/store-conditional instructions.

For now, we've already seen real-world designs implement the Zalrsc
extension only[2]. As U-Boot mainly runs with only one HART, we could
easily support these designs by not using AMO instructions in the
hard-written assembly if necessary, for which this patch introduces two
new Kconfig options to indicate the availability of "Zaamo" and "Zalrsc".

Note that even with this patch, "A" extension is specified in the ISA
string passed to the compiler as long as one of "Zaamo" or "Zalrsc" is
available, since they're only recognized with a quite recent version of
GCC/Clang. The compiler usually doesn't automatically generate atomic
instructions unless the source explicitly instructs it to do so, thus
this should be safe.

Link: https://github.com/riscv/riscv-zaamo-zalrsc/commit/d94c64c63e9120d56bdeb540caf2e5dae60a8126
Link: https://lore.kernel.org/u-boot/20250729162035.209849-9-uros.stajic@htecgroup.com/
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agopcie: starfive: Remove the redundant print of probe success
Hal Feng [Mon, 1 Sep 2025 08:24:18 +0000 (16:24 +0800)] 
pcie: starfive: Remove the redundant print of probe success

The dev_err() is used incorrectly and we don't need the driver
to state probe success.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agostarfive: avoid NULL dereference in fdt_check_header()
Heinrich Schuchardt [Thu, 28 Aug 2025 13:03:35 +0000 (15:03 +0200)] 
starfive: avoid NULL dereference in fdt_check_header()

If the u-boot.itb read from SD-card is invalid, fdt_check_header() may be
called with a NULL pointer.

This was observed on an StarFive VisionFive Lite when trying to revover the
board via UART.

Add a missing check in the starfive board code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: E Shattow <e@freeshell.de>
3 weeks agoinclude: configs: andes: Remove fdt_high env variable
Randolph Lin [Thu, 21 Aug 2025 11:31:22 +0000 (19:31 +0800)] 
include: configs: andes: Remove fdt_high env variable

Remove the fdt_high environment variable, as a value of all ones
indicates using the FDT in place. This setting is incorrect for the
current board.

Signed-off-by: Randolph Lin <randolph@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agodts: th1520: Switch to upstream devicetree
Yao Zi [Wed, 13 Aug 2025 10:09:27 +0000 (10:09 +0000)] 
dts: th1520: Switch to upstream devicetree

Imply OF_UPSTREAM in platform Kconfig option and adapt existing boards
to use the correct upstream devicetree paths.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agopinctrl: th1520: Mark driver as DM_FLAG_PRE_RELOC
Yao Zi [Wed, 13 Aug 2025 10:09:26 +0000 (10:09 +0000)] 
pinctrl: th1520: Mark driver as DM_FLAG_PRE_RELOC

It's common that UARTs are bound and probed before U-Boot relocation, in
which case the UART's pincontroller and pinconfig must be probed first.
Let's apply DM_FLAG_PRE_RELOC to the driver, allow it to bind before
relocation.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agoclk: thead: th1520-ap: Mark drivers as DM_FLAG_PRE_RELOC
Yao Zi [Wed, 13 Aug 2025 10:09:25 +0000 (10:09 +0000)] 
clk: thead: th1520-ap: Mark drivers as DM_FLAG_PRE_RELOC

It's common that UARTs are bound and probed before U-Boot relocation,
in which case the clocks of UART and UART's pincontroller must be
registered first. Let's apply DM_FLAG_PRE_RELOC to the driver, allowing
it to bind before relocation.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agoconfigs: th1520_lpi4a: Enlarge SYS_MALLOC_F_LEN to 0x10000
Yao Zi [Wed, 13 Aug 2025 10:09:24 +0000 (10:09 +0000)] 
configs: th1520_lpi4a: Enlarge SYS_MALLOC_F_LEN to 0x10000

For TH1520, we want clock and pinctrl drivers to bind before relocation
along with the UART which makes use of them, since upstream devicetree
specifies pinctrl properties for the UART.

This requires a large malloc pool before relocation, let's enlarge it.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoMerge patch series "board: dhelectronics: Check pointer before access in dh_get_value...
Tom Rini [Tue, 16 Sep 2025 22:14:30 +0000 (16:14 -0600)] 
Merge patch series "board: dhelectronics: Check pointer before access in dh_get_value_from_eeprom_buffer()"

This series from Marek Vasut <marek.vasut@mailbox.org> cleans up some of
the common code between dhelectronics platforms.

Link: https://lore.kernel.org/r/20250907010103.667681-1-marek.vasut@mailbox.org
4 weeks agoboard: dhelectronics: Use isascii() before isprint() in dh_read_eeprom_id_page()
Marek Vasut [Sun, 7 Sep 2025 01:00:47 +0000 (03:00 +0200)] 
board: dhelectronics: Use isascii() before isprint() in dh_read_eeprom_id_page()

The isprint() checks printability across all 256 characters, some of the
upper 128 characters are printable and produce artifacts on UART. Call
isascii() first to only consider the bottom 7bit ASCII characters as
printable, and then check their printability using isprint(). This fixes
a rare misprint in case the ID page content is uninitialized or corrupted.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
4 weeks agoboard: dhelectronics: Check pointer before access in dh_get_value_from_eeprom_buffer()
Marek Vasut [Sun, 7 Sep 2025 01:00:46 +0000 (03:00 +0200)] 
board: dhelectronics: Check pointer before access in dh_get_value_from_eeprom_buffer()

The eip pointer in dh_get_value_from_eeprom_buffer() might be NULL.
The current NULL pointer check happens too late, after the eip was
accessed in variable assignment. Reorder the two, so the NULL pointer
check happens first, and any access second, otherwise the access may
trigger a hang or other undefined behavior.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
4 weeks agophy: Reset init count on phy exit failure
Marek Vasut [Sat, 6 Sep 2025 23:00:44 +0000 (01:00 +0200)] 
phy: Reset init count on phy exit failure

In case the PHY exit callback reports failure, reset init_count to 0 anyway,
so the next attempt at PHY initialization might try to reinitialize the PHY
and restore it to normal operation.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
4 weeks agothermal: sandbox: Staticize sandbox_thermal_get_temp()
Marek Vasut [Sat, 6 Sep 2025 00:00:53 +0000 (02:00 +0200)] 
thermal: sandbox: Staticize sandbox_thermal_get_temp()

Make sandbox_thermal_get_temp() static, since this is not called
outside of the driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agothermal: Sort the Makefile
Marek Vasut [Sat, 6 Sep 2025 00:01:18 +0000 (02:01 +0200)] 
thermal: Sort the Makefile

Sort the Makefile alphabetically. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoMerge patch series "Modernize U-Boot code formatting with clang-format"
Tom Rini [Tue, 16 Sep 2025 19:45:08 +0000 (13:45 -0600)] 
Merge patch series "Modernize U-Boot code formatting with clang-format"

Javier Tia <javier.tia@linaro.org> says:

This patch series modernizes U-Boot's code formatting infrastructure by
with current Linux kernel practices and providing a more robust and
comprehensive formatting solution.

Link: https://lore.kernel.org/r/20250905205349.127333-1-javier.tia@linaro.org
4 weeks agodoc: Update U-Boot coding style guide with clang-format usage
Javier Tia [Fri, 5 Sep 2025 20:53:47 +0000 (14:53 -0600)] 
doc: Update U-Boot coding style guide with clang-format usage

The U-Boot coding style guide has been updated to include information
about using the `.clang-format` configuration file for automatic code
formatting. This ensures consistent formatting across the entire
codebase and aligns with Linux kernel coding standards. The goal with
introducing a predefined coding style is consistency rather than
personal preference.

The .clang-format file is copied directly from the Linux kernel without
any modifications, ensuring complete compatibility with kernel coding
standards.

Include comprehensive best practices for using clang-format,
specifically guidance on formatting only changed blocks versus entire
files, creating separate formatting-only commits for better code review,
and leveraging git clang-format for targeted formatting. Add examples of
editor integrations. This enhancement will help maintainers and
contributors to easily adhere to U-Boot coding standards.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
4 weeks agoLindent: Remove wrapper around indent tool
Javier Tia [Fri, 5 Sep 2025 20:53:46 +0000 (14:53 -0600)] 
Lindent: Remove wrapper around indent tool

The Linux kernel has not maintained the same script since 2017-11-01,
and with clang-format included in U-Boot, it is not required anymore.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
4 weeks agotools: zynqmp_psu_init_minimize.sh: Switch to clang-format
Javier Tia [Fri, 5 Sep 2025 20:53:45 +0000 (14:53 -0600)] 
tools: zynqmp_psu_init_minimize.sh: Switch to clang-format

Replace the use of scripts/Lindent with clang-format in
zynqmp_psu_init_minimize.sh. This change is made to align with the rest
of the codebase that uses clang-format for code formatting. This ensures
consistency across all scripts in terms of code style and formatting.

Tested-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Javier Tia <javier.tia@linaro.org>
4 weeks agoclang-format: Add configuration file
Javier Tia [Fri, 5 Sep 2025 20:53:44 +0000 (14:53 -0600)] 
clang-format: Add configuration file

Introduce .clang-format configuration file to U-Boot, providing
significant improvements over the existing scripts/Lindent approach for
C code formatting.

Benefits of clang-format over scripts/Lindent:

- More comprehensive formatting rules: While Lindent relies on the basic
  'indent' tool with limited options, clang-format provides extensive
  control over code formatting with 800+ configuration options

- Better handling of complex code structures: clang-format understands
  modern C constructs and handles nested structures, macros, and complex
  expressions more intelligently

- IDE and editor integration: Native support in major development
  environments (VS Code, Vim, Emacs, etc.) enables real-time formatting

- Consistent results across environments: Eliminates variations between
  different versions of 'indent' tool and system configurations

- Active maintenance: clang-format is actively developed and updated,
  unlike the aging 'indent' tool

Alignment with Linux kernel practices:

Continues U-Boot alignment with Linux kernel development practices,
maintaining consistency between these closely related projects. The
Linux kernel adopted clang-format to modernize its code formatting
infrastructure and improve developer experience.

The .clang-format file is based on the Linux kernel configuration,
specifically copied from Linux kernel v6.16 tag, which itself builds
upon the initial introduction in commit d4ef8d3ff005c ("clang-format:
add configuration file").

Signed-off-by: Javier Tia <javier.tia@linaro.org>
4 weeks agoMerge patch series "Fix ADI driver header dependencies"
Tom Rini [Tue, 16 Sep 2025 19:44:39 +0000 (13:44 -0600)] 
Merge patch series "Fix ADI driver header dependencies"

Greg Malysa <malysagreg@gmail.com> says:

Between 2025.07 and 2025.10 many header dependency chains were improved,
but this exposed implicit header usage in several of our drivers. This
wasn't discovered before or included in the original fixes because our
drivers are not yet used by any mainline-supported boards, so build
tests did not find them. This series addresses the two build failures
I've encountered while rebasing our work onto 2025.10 and continuing to
prepare the next submission of our board files.

Link: https://lore.kernel.org/r/20250903234205.26787-1-malysagreg@gmail.com
4 weeks agommc: adi_sdhci: Update headers
Greg Malysa [Wed, 3 Sep 2025 23:42:02 +0000 (19:42 -0400)] 
mmc: adi_sdhci: Update headers

As part of the header dependency cleanup between 2025.07 and 2025.10, an
implicit route to obtain SZ_128M from linux/sizes.h was removed. This
adds an explicit reference to linux/sizes.h to fix build failures for
this driver.

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 weeks agonet: dwc_eth_qos_adi: Add missing header
Greg Malysa [Wed, 3 Sep 2025 23:42:01 +0000 (19:42 -0400)] 
net: dwc_eth_qos_adi: Add missing header

Following header dependency cleanups, an implicit dependence on env.h
was exposed in dwc_eth_qos_adi. However because this driver is not (yet)
enabled in any defconfigs, build tests did not identify the missing
header. This adds the missing #include so that the driver builds
correctly when enabled.

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
4 weeks agocmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled
Aditya Dutt [Fri, 5 Sep 2025 14:06:11 +0000 (19:36 +0530)] 
cmd: terminal: avoid serial_reinit_all() with DM_SERIAL enabled

serial_reinit_all() is only available when CONFIG DM_SERIAL is disabled
and CONFIG_SERIAL is enabled.

Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
4 weeks agogpio: adp5588: Add ADP5587 as compatible
Philip Molloy [Fri, 5 Sep 2025 11:25:13 +0000 (11:25 +0000)] 
gpio: adp5588: Add ADP5587 as compatible

The ADP5587 is a simpler version of the ADP5588. The ADP5588 can
configure two pins, C8 and C9, as GPIOs or light sensors. The ADP5587
does not include the light sensors.

Signed-off-by: Philip Molloy <philip@philipmolloy.com>
4 weeks agoenv: Remove usb_ignorelist and env_fdt_path from ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
Marek Vasut [Wed, 3 Sep 2025 14:20:52 +0000 (16:20 +0200)] 
env: Remove usb_ignorelist and env_fdt_path from ifdef CONFIG_ENV_VARS_UBOOT_CONFIG

The CONFIG_ENV_VARS_UBOOT_CONFIG should protect only U-Boot
configuration variables in environment, those are arch, cpu,
board, board_name, vendor, soc. It should certainly not hide
usb_ignorelist or env_fdt_path from the environment. Fix it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 weeks agomach-k3: fix reading size and addr from fdt on R5
Anshul Dalal [Wed, 3 Sep 2025 11:17:02 +0000 (16:47 +0530)] 
mach-k3: fix reading size and addr from fdt on R5

fdtdec_get_addr_size uses architecture dependent datatypes which causes
the 32-bit R5 to fail when reading the 64-bit size and addr fields of
reg nodes from the fdt.

Therefore change it to a common api for both 64 and 32 bit platforms to
allow for fdt fixups from R5.

Fixes: 8b0fc29de0e3 ("arm: mach-k3: am62: Fixup TF-A/OP-TEE reserved-memory node in FDT")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
4 weeks agoboard: ti: common: Kconfig: add CMD_MEMINFO
Anshul Dalal [Tue, 2 Sep 2025 04:57:07 +0000 (10:27 +0530)] 
board: ti: common: Kconfig: add CMD_MEMINFO

Add CMD_MEMINFO and CMD_MEMINFO_MAP to list of configs implied by
TI_COMMON_CMD_OPTIONS. This allows users to easily view the memory
configuration and the memory maps at runtime.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
4 weeks agoRevert "sandbox: replace deprecated getenv() with env_get()"
Tom Rini [Fri, 12 Sep 2025 22:34:58 +0000 (16:34 -0600)] 
Revert "sandbox: replace deprecated getenv() with env_get()"

While testing changes, I missed that Gitlab had failed CI with pytest
failures due to this change.

This reverts commit 4c822970d366415e717730606734e815993a70bb.

Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agosandbox: replace deprecated getenv() with env_get()
Osama Abdelkader [Tue, 2 Sep 2025 22:24:11 +0000 (00:24 +0200)] 
sandbox: replace deprecated getenv() with env_get()

use env_get() instead of getenv() for consistency.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
4 weeks agomkimage: Add support for bundling TFA BL31 in mkimage -f auto
Marek Vasut [Tue, 2 Sep 2025 22:01:55 +0000 (00:01 +0200)] 
mkimage: Add support for bundling TFA BL31 in mkimage -f auto

Introduce two new parameters to be used with mkimage -f auto to bundle
TFA BL31 image into fitImage, using auto-generated fitImage. Add -y to
specify TFA BL31 file name and -Y to specify TFA BL31 load and entry
point address. This is meant to be used with systems which boot all of
TFA BL31, Linux and its DT from a single fitImage, all booted by U-Boot.

Example invocation:
"
$ mkimage -E -A arm64 -C none -e 0x50200000 -a 0x50200000 -f auto \
          -d arch/arm64/boot/Image \
  -b arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dtb \
  -y ../tfa/build/rcar_gen4/release/bl31.bin -Y 0x46400000 \
  /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
TFA BL31 and does include TFA BL31 blobs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agobloblist: adjust default bloblist size after reloc
Heinrich Schuchardt [Mon, 1 Sep 2025 17:03:08 +0000 (19:03 +0200)] 
bloblist: adjust default bloblist size after reloc

If neither CONFIG_BLOBLIST_FIXED NOR CONFIG_BLOBLIST_ALLOC is set,
currently CONFIG_BLOBLIST_SIZE_RELOC defaults to 0 except if
* CONFIG_ARM=y && CONFIG_EFI_LOADER=y && GENERATE_ACPI_TABLE=y.

A size of zero never makes sense for a bloblist.

When using QFW we need more than 64 KiB to host the ACPI table.
In this case CONFIG_BLOBLIST_ALLOC is used.

Set a reasonable default.

Remove the CONFIG_BLOBLIST_SIZE_RELOC in ARM QEMU defconfigs which are
not compatible with ACPI tables passed from QEMU.

Reported-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Fixes: 6f9b015c138b ("common: Enable BLOBLIST_TABLES on arm")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agobloblist: use correct types for physical addresses
Heinrich Schuchardt [Mon, 1 Sep 2025 15:16:35 +0000 (17:16 +0200)] 
bloblist: use correct types for physical addresses

It is expected that bloblists are stored in high memory beyond 2 GiB.
We must not use int as data type for these addresses but phys_addr_t.

Fixes: f9ef9fb033d5 ("bloblist: Handle alignment with a void entry")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agoMerge patch series "arm: mach-k3: am64x: Add reset cause for cpuinfo"
Tom Rini [Fri, 12 Sep 2025 18:30:15 +0000 (12:30 -0600)] 
Merge patch series "arm: mach-k3: am64x: Add reset cause for cpuinfo"

Steffen Kothe <steffen.kothe@skothe.net> says:

AM64X hereby receives support for reset reason printing during boot.

Unfortunately does the AM64X register mapping slighlty differ from
the AM62X. WDT and PORZ are not part of the reset source register, but
the mapping remains the same for all other causes.

To prevent ifdef/else constructs, I decided to follow a simple
copy/paste approach and adjusted the logic accordingly.

Link: https://lore.kernel.org/r/20250831151706.404373-1-steffen.kothe@skothe.net
4 weeks agoarm: mach-k3: am64x: Implement get_reset_reason()
Steffen Kothe [Sun, 31 Aug 2025 15:17:06 +0000 (15:17 +0000)] 
arm: mach-k3: am64x: Implement get_reset_reason()

Implement get_reset_reason() for AM64x to enable reporting of the reset
cause in the cpuinfo output.

Notice that the AM64x does not support dedicated reset cause bits for
WDT and PORZ as the AM62x does.

An explanation of this difference is not part of the technical reference
manual and remains unclear.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Reviewed-by: Bryan Brattlof <bb@ti.com>
4 weeks agoarm: mach-k3: am64_hardware.h: Add CTRLMMR_MCU_RST_SRC reset cause bit mappings
Steffen Kothe [Sun, 31 Aug 2025 15:17:05 +0000 (15:17 +0000)] 
arm: mach-k3: am64_hardware.h: Add CTRLMMR_MCU_RST_SRC reset cause bit mappings

AM64X SoCs use similar but not identical bit mappings like the AM62X
family.

In detail does the AM64X not support PORZ and WDT as reset caused.

Add the mapping according to the technical reference manual into the
SoC specific header.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Reviewed-by: Bryan Brattlof <bb@ti.com>
4 weeks agoboard: ti: fdt_ops: make ti_set_fdt_env() const-correct
Bhimeswararao Matsa [Mon, 1 Sep 2025 14:39:45 +0000 (20:09 +0530)] 
board: ti: fdt_ops: make ti_set_fdt_env() const-correct

Make the fdt_map parameter a pointer to const, since the function only
reads the mapping table. This improves API correctness and allows maps
to live in read-only data.

No functional change intended

Signed-off-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
4 weeks agoboard: ti: am65x: Overwrite get_overlay_mmc
Judith Mendez [Mon, 25 Aug 2025 15:23:10 +0000 (10:23 -0500)] 
board: ti: am65x: Overwrite get_overlay_mmc

Unlike other K3 SoC's, am65 SoC has the capability to detect daughter
cards and automatically generate a list of white-space separated overlays
in name_overlays environment variable.

When applied during boot with get_overlay_mmc, the path to overlays with
default distribution is incorrect where path is currently: boot/dtb and
the overlays exist in boot/dtb/ti.

Fix the path in get_overlay_mmc so that overlays are automatically applied
correctly during boot time.

Signed-off-by: Judith Mendez <jm@ti.com>
4 weeks agoarm: mach-k3: increase max resasg_entries
Udit Kumar [Sat, 23 Aug 2025 08:06:15 +0000 (13:36 +0530)] 
arm: mach-k3: increase max resasg_entries

Increase max resasg_entries to accommodate max size of
largest device J784S4.

Link: https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j784s4/resasg_types.html
Reported-by: Jared McArthur <j-mcarthur@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
4 weeks agomach-k3: am62*: Fix backup from eMMC boot mode
Judith Mendez [Wed, 20 Aug 2025 21:56:34 +0000 (16:56 -0500)] 
mach-k3: am62*: Fix backup from eMMC boot mode

Currently logic in spl_mmc_boot_mode only lookes at main devstat
to determine the bootmode to return. Thus, when using: 'eMMC boot'
as primary boot mode and 'MMCSD boot from eMMC UDA' as backup
boot mode, 'eMMC boot' is always selected. Add check for bootindex
to determine if ROM boot via backup boot mode and return MMCSD_MODE_FS
which is the only supported backup bootmode with eMMC device.

Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Moteen Shah <m-shah@ti.com>
4 weeks agovirtio: blk: support block sizes exceeding 512 bytes
Heinrich Schuchardt [Sat, 30 Aug 2025 20:39:54 +0000 (22:39 +0200)] 
virtio: blk: support block sizes exceeding 512 bytes

QEMU allows to specify the logical block size via parameter
logical_block_size of a virtio-blk-device.

The communication channel via virtqueues remains based on 512 byte blocks
even if the logical_block_size is larger.

Consider the logical block size in the block device driver.

Reported-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
4 weeks agoi2c: davinci: prefer kernel types (u8/u32)
Bhimeswararao Matsa [Fri, 29 Aug 2025 02:11:29 +0000 (07:41 +0530)] 
i2c: davinci: prefer kernel types (u8/u32)

Replace uint8_t/uint32_t with u8/u32 to match U-Boot style
(checkpatch PREFER_KERNEL_TYPES). No functional change.

Signed-off-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
4 weeks agocheckpatch.pl: Ignore mdelay instead of udelay
Tom Rini [Wed, 27 Aug 2025 18:38:36 +0000 (12:38 -0600)] 
checkpatch.pl: Ignore mdelay instead of udelay

Whereas in Linux, on ARM there is the notion of delay operations and
mdelay and udelay are not the same, here we just have udelay and mdelay
is a trivial wrapper. Tell checkpatch to not complain here.

Reported-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agofs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig
Tony Dinh [Tue, 26 Aug 2025 19:45:37 +0000 (12:45 -0700)] 
fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig

Add maximum ext4 journal entries to Kconfig. It is necessary since the
number of journal entries is proportional to disk capacity. For example,
an ext4 4TB HDD partition could require approximately 500 entries.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 weeks agofs: ext4fs: Add initialization failure recovery path in ext4fs_write
Tony Dinh [Tue, 26 Aug 2025 19:37:17 +0000 (12:37 -0700)] 
fs: ext4fs: Add initialization failure recovery path in ext4fs_write

Don't invoke ext4fs_deinit() in ext4fs_write() if the failure occurs
during initialization. It would result in a crash since ext4fs_init()
has already done that.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 weeks agotools: Do not generate logo when cross-building
Jan Kiszka [Sat, 23 Aug 2025 15:21:09 +0000 (17:21 +0200)] 
tools: Do not generate logo when cross-building

This cannot work (unless qemu-user is registered in binfmt_misc) as the
tools will be for a different architecture.

Fixes "make cross_tools" in case CONFIG_VIDEO_LOGO is enabled.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agoMerge patch series "tools: fdtgrep: Mark util_version() as static"
Tom Rini [Tue, 9 Sep 2025 18:44:23 +0000 (12:44 -0600)] 
Merge patch series "tools: fdtgrep: Mark util_version() as static"

This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> lays
some of the groundwork for being able to enable the -Wmissing-prototypes
compiler flag while building U-Boot by fixing the obvious problems in
the tools directory.

Link: https://lore.kernel.org/r/20250829081628.2327372-1-ilias.apalodimas@linaro.org
5 weeks agotools: imx8image: Mark imx8mimage_check_params() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:22 +0000 (11:16 +0300)] 
tools: imx8image: Mark imx8mimage_check_params() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotools: imx8mimage: Mark build_image() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:21 +0000 (11:16 +0300)] 
tools: imx8mimage: Mark build_image() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotools: fit_check_sign: Mark usage() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:20 +0000 (11:16 +0300)] 
tools: fit_check_sign: Mark usage() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotool: fit_info: Mark usage() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:19 +0000 (11:16 +0300)] 
tool: fit_info: Mark usage() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotools: rkcommon: Mark rkcommon_is_header_v2() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:18 +0000 (11:16 +0300)] 
tools: rkcommon: Mark rkcommon_is_header_v2() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agotools: mkimage: Mark copy_datafile() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:17 +0000 (11:16 +0300)] 
tools: mkimage: Mark copy_datafile() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotools: fdtgrep: Mark util_usage() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:16 +0000 (11:16 +0300)] 
tools: fdtgrep: Mark util_usage() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agotools: fdtgrep: Mark util_version() as static
Ilias Apalodimas [Fri, 29 Aug 2025 08:16:15 +0000 (11:16 +0300)] 
tools: fdtgrep: Mark util_version() as static

The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agoenv: Fix up indent
Marek Vasut [Wed, 3 Sep 2025 14:22:26 +0000 (16:22 +0200)] 
env: Fix up indent

Replace #define<TAB> with #define<space> to be consistent in
the entire file. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agoarm64: Properly clear BSS
Ilias Apalodimas [Tue, 2 Sep 2025 06:08:12 +0000 (09:08 +0300)] 
arm64: Properly clear BSS

Brock reports a breakage on an RK3568 SoC. His patch is
correct but he never followed up on the requested changes.

We currently use ldr to calculate the address of __bss_start and
__bss_end. However the absolute addresses of the literal pool are never
relocated and we end up clearing the wrong memory section. Use
PC-relative addressing instead.

Link: https://lore.kernel.org/u-boot/zfknlzcemnnaka5w2er5wjwefwoidrpndc4gjhx6d5xr6nlcjr@pasfayjiutii/
Suggested-by: brock_zheng <yzheng@techyauld.com>
Reported-by: brock_zheng <yzheng@techyauld.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 weeks agopci: apple: Fix use of uninitialized variable
Mark Kettenis [Sat, 23 Aug 2025 14:03:56 +0000 (16:03 +0200)] 
pci: apple: Fix use of uninitialized variable

Replace use of uninitialized variable with the PCI device number
in an error message as this is what we use elsewhere to derive
the PCIe port number.  Use ofnode_read_pci_addr() to read the
PCI address of the node and derive the device number from that.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 weeks agotools: Drop meaningless comment from Makefile
Jan Kiszka [Sat, 23 Aug 2025 11:29:49 +0000 (13:29 +0200)] 
tools: Drop meaningless comment from Makefile

Introduced by 245b1029e1af, probably a debug left-over.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 weeks agocommon/spl: use memmove() in load_simple_fit()
Rasmus Villemoes [Tue, 19 Aug 2025 10:55:54 +0000 (12:55 +0200)] 
common/spl: use memmove() in load_simple_fit()

I had trouble booting some am335x boards (both
beagleboneblack and a custom board). SPL would start just fine, and
apparently load U-Boot proper, but it would hang when jumping to
U-Boot.

While debugging, I stumbled on this memcpy() which from code
inspection very much looked to have overlapping src and dst, and
indeed a simple printf revealed

  calling memcpy(0x8087bf68, 0x8087bf80, 0xf7f8)

Now, it will always be with src > dst, our memcpy()
implementations "most likely" do forward-copying, and in the end it
turned out that this wasn't the culprit after all [*].

But to avoid me or others barking up the wrong tree in the future, and
because this use of memcpy() is technically undefined, use memmove()
instead.

[*] That was 358d1cc232c ("spl: Align FDT load address"), which has
since been fixed in master but not the v2025.07 I worked of by
52caad0d14a ("ARM: Align image end to 8 bytes to fit DT alignment").

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@gmx.de>
5 weeks agoboot: Add LEGACY_IMAGE_FORMAT to DISTRO_DEFAULTS
Tom Rini [Mon, 18 Aug 2025 16:51:19 +0000 (10:51 -0600)] 
boot: Add LEGACY_IMAGE_FORMAT to DISTRO_DEFAULTS

At this time there are still major Linux distributions which by default
boot using LEGACY_IMAGE_FORMAT type scripts. Add this option to
DISTRO_DEFAULTS to ensure these platforms can still boot.

Fixes: d780965927d4 ("Drop the special am335x_boneblack_vboot target")
Reported-by: Sascha Silbe <sascha-pgp@silbe.org>
Tested-By: Sascha Silbe <sascha-pgp@silbe.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agomisc: fs_loader: Initialize actread variable
Alif Zakuan Yuslaimi [Mon, 18 Aug 2025 02:55:02 +0000 (19:55 -0700)] 
misc: fs_loader: Initialize actread variable

Initialize the actread variable to prevent undefined behavior
that can occur if the variable is used before being assigned a
value.

This will help to prevent potential issues, especially if
actread is used (e.g., read, incremented, or returned) before
being explicitly set elsewhere in the code.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
5 weeks agodrivers: rtc: max313xx: Add delay after setting date
Ben Hoelker [Sun, 17 Aug 2025 22:30:00 +0000 (10:30 +1200)] 
drivers: rtc: max313xx: Add delay after setting date

The MAX31331 was not correctly updating the seconds when
setting the time and would return the seconds previously set.

Like the MAX31343, a delay needs to be added after setting the
time. Wait one second after writing so that the date command shows the
correct time.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Bruce Adams <bruce.adams@alliedtelesis.co.nz>
Signed-off-by: Ben Hoelker <ben.hoelker@alliedtelesis.co.nz>
5 weeks agoMerge tag 'v2025.10-rc4' into next
Tom Rini [Mon, 8 Sep 2025 16:37:22 +0000 (10:37 -0600)] 
Merge tag 'v2025.10-rc4' into next

Prepare v2025.10-rc4

5 weeks agoPrepare v2025.10-rc4 v2025.10-rc4
Tom Rini [Mon, 8 Sep 2025 16:17:59 +0000 (10:17 -0600)] 
Prepare v2025.10-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agoMAINTAINERS: Add entry for DesignWare XGMAC driver
Boon Khai Ng [Tue, 26 Aug 2025 03:05:05 +0000 (11:05 +0800)] 
MAINTAINERS: Add entry for DesignWare XGMAC driver

Add a MAINTAINERS entry for the DesignWare XGMAC network driver to
ensure future patches are properly routed for review and support.

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 8 Sep 2025 14:51:08 +0000 (08:51 -0600)] 
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agoMerge patch series "AM57 boot fixes"
Tom Rini [Mon, 8 Sep 2025 14:44:54 +0000 (08:44 -0600)] 
Merge patch series "AM57 boot fixes"

Anurag Dutta <a-dutta@ti.com> says:

This patch series migrates from .h to .env format for am57xx/dra7xx.
Also, we do relevant changes so that the fdtfile can be set from C code.

logs : https://gist.github.com/anuragdutta731/82560cc9bc958ca70a25a95a7031eeea

Link: https://lore.kernel.org/r/20250901061659.986164-1-a-dutta@ti.com
5 weeks agoboard: ti: dra7xx: Set fdtfile from C code instead of findfdt script
Anurag Dutta [Mon, 1 Sep 2025 06:16:59 +0000 (11:46 +0530)] 
board: ti: dra7xx: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
5 weeks agoboard: ti: am57xx: Set fdtfile from C code instead of findfdt script
Anurag Dutta [Mon, 1 Sep 2025 06:16:58 +0000 (11:46 +0530)] 
board: ti: am57xx: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
5 weeks agoboard: ti: am57xx: Change to using .env
Anurag Dutta [Mon, 1 Sep 2025 06:16:57 +0000 (11:46 +0530)] 
board: ti: am57xx: Change to using .env

Move to using .env file for setting up environment variables
for am57xx and dra7xx.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
5 weeks agoinclude: env: ti: Use .env for environment variables
Anurag Dutta [Mon, 1 Sep 2025 06:16:56 +0000 (11:46 +0530)] 
include: env: ti: Use .env for environment variables

Add omap common environment variables to .env. We retain the old-style C
environment .h files to maintain compatibility with other omap devices that
have not moved to using .env yet.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
5 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 8 Sep 2025 14:33:30 +0000 (08:33 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

5 weeks agoarm64: renesas: r8a779g3: Use $loadaddr in bootcmd on Retronix R-Car V4H Sparrow...
Marek Vasut [Wed, 3 Sep 2025 11:23:23 +0000 (13:23 +0200)] 
arm64: renesas: r8a779g3: Use $loadaddr in bootcmd on Retronix R-Car V4H Sparrow Hawk board

Avoid use of hard-coded address in boot command, instead use $loadaddr
which is the default load address. This improves consistency of the
environment on this board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoARM: renesas: Enable CONFIG_ENV_VARS_UBOOT_CONFIG on all boards
Marek Vasut [Wed, 3 Sep 2025 11:23:57 +0000 (13:23 +0200)] 
ARM: renesas: Enable CONFIG_ENV_VARS_UBOOT_CONFIG on all boards

The CONFIG_ENV_VARS_UBOOT_CONFIG extends U-Boot environment with
variables arch/board/board_name/soc/vendor, which can be used to
discern different devices from each other based purely on U-Boot
environment variables.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 weeks agoMerge tag 'u-boot-imx-next-20250905a' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 5 Sep 2025 16:48:05 +0000 (10:48 -0600)] 
Merge tag 'u-boot-imx-next-20250905a' 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/27573

- Several improvements for kontron-sl-mx6ul.
- Add Phytec imx8mp-libra-fpsc board
- Add redundant environment support for imx8m evk boards.
- Several improvements for phycore-imx93.

5 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Fri, 5 Sep 2025 14:15:16 +0000 (08:15 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung

- Fix issues reported by smatch
- exynos4210-origen cleanups
- e850-96 improvements

5 weeks agoAdd imx8mp-libra-fpsc board
Benjamin Hahn [Tue, 2 Sep 2025 06:07:32 +0000 (08:07 +0200)] 
Add imx8mp-libra-fpsc board

Add new imx8mp-libra-fpsc board.
Bootph tags as well as USB device tree nodes are in u-boot.dtsi for now
and will be removed when upstreamed.
The Libra i.MX 8M Plus FPSC is a single board computer. It uses an i.MX
8M Plus FPSC [1] System on Module which utilizes the FPSC standard [2].

[1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-8m-plus-fpsc
[2] https://www.phytec.eu/en/produkte/system-on-modules/fpsc

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
5 weeks agoimx8m[m,n,p]_evk: Add redundant environment support
Fabio Estevam [Fri, 29 Aug 2025 19:28:15 +0000 (16:28 -0300)] 
imx8m[m,n,p]_evk: Add redundant environment support

For reliable Over The Air update, it is recommended that redundant
environment is used.

Add redundant environment support for the i.MX8M EVK boards.

While at it, increase the environment size and adjust the offset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 weeks agoboard: phytec: phycore-imx93: Use CONFIG_PHYTEC_EEPROM_BUS
Primoz Fiser [Thu, 28 Aug 2025 08:20:08 +0000 (10:20 +0200)] 
board: phytec: phycore-imx93: Use CONFIG_PHYTEC_EEPROM_BUS

Switch to use CONFIG_PHYTEC_EEPROM_BUS instead of the hard coded value
of 2 for the EEPROM I2C bus for both SPL and U-Boot proper. Possible
since commit 88a1816a9b4e ("board: phytec: common: Add PHYTEC_EEPROM_BUS
to Kconfig").

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
5 weeks agoconfigs: imx93-phycore_defconfig: Disable CONFIG_AHAB_BOOT
Primoz Fiser [Thu, 28 Aug 2025 08:20:07 +0000 (10:20 +0200)] 
configs: imx93-phycore_defconfig: Disable CONFIG_AHAB_BOOT

By default, lets disable configuration option CONFIG_AHAB_BOOT=y on the
phyCORE-i.MX93 based boards. This option is only used in the secureboot
context which is not provided by default anyway. Lets remove it from the
defconfig to not give false impressions it is supported out of the box
for this board.

On the other hand, in the context of PHYTEC secureboot, this option is
selected by the distro which enables CONFIG_AHAB_BOOT among other secure
boot related options and tweaks needed to properly support it.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Martin Schwan <m.schwan@phytec.de>
5 weeks agoarm: dts: imx93-phyboard-segin-u-boot: Clean-up already upstream nodes
Primoz Fiser [Thu, 21 Aug 2025 06:46:14 +0000 (08:46 +0200)] 
arm: dts: imx93-phyboard-segin-u-boot: Clean-up already upstream nodes

Clean-up "imx93-phyboard-segin-u-boot.dtsi" internal device-tree from
nodes already part of the upstream device-tree since commit 79f3e77133bd
("Subtree merge tag 'v6.16-dts' of dts repo [1] into dts/upstream"). No
functional change is made with this commit.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
5 weeks agotools: imx8image: Make imx8image_check_params() static
Ilias Apalodimas [Tue, 12 Aug 2025 06:08:06 +0000 (09:08 +0300)] 
tools: imx8image: Make imx8image_check_params() static

We are trying to enable -Wmissing-prototypes and this functiion is only
used locally. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Peng Fan <peng.fan@nxp.com>
5 weeks agoimx: kontron-sl-mx6ul: Switch to OF_UPSTREAM
Frieder Schrempf [Mon, 25 Aug 2025 13:54:35 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Switch to OF_UPSTREAM

Use the upstream devicetrees instead of the local ones.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
[fabio: Remove imx6ul-kontron-bl.dtb and imx6ull-kontron-bl.dtb from Makefile]

5 weeks agoimx: kontron-sl-mx6ul: Force default environment for serial loader boot
Eberhard Stoll [Mon, 25 Aug 2025 13:54:34 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Force default environment for serial loader boot

In case of booting from serial loader (USB) we want to always use the
default environment in order to get a defined state that is
independent of any environment stored in persistent memory.

This way we can avoid corruption of the boot process during
development and manufacturing by existing environment settings in
flash.

Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable CONFIG_ENV_IS_NOWHERE
Eberhard Stoll [Mon, 25 Aug 2025 13:54:33 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable CONFIG_ENV_IS_NOWHERE

For some cases it is beneficial to not store the environment in
persistent memory, but instead use the default environment and
keep it in volatile RAM only. Allow this by enabling
CONFIG_ENV_IS_NOWHERE.

Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable watchdog and sysreset
Frieder Schrempf [Mon, 25 Aug 2025 13:54:32 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable watchdog and sysreset

Enable the watchdog and sysreset drivers and the wdt command.
This also fixes the non-working 'reset' command.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Autostart fastboot if booted from USB
Annette Kobou [Mon, 25 Aug 2025 13:54:31 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Autostart fastboot if booted from USB

For booting via USB we want to automatically start the fastboot
command in order to access the board via uuu or other tools.

This allows for easier bringup of new boards during development
and manufacturing.

Signed-off-by: Annette Kobou <annette.kobou@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable redundant environment
Oualid Derouiche [Mon, 25 Aug 2025 13:54:30 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable redundant environment

This aligns the MTD partitions on the SPI NOR with the kernel
devicetree and enables the redundant environment.

Signed-off-by: Oualid Derouiche <oualid.derouiche@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable fastboot support
Annette Kobou [Mon, 25 Aug 2025 13:54:29 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable fastboot support

Enable support for fastboot commands via USB.

Signed-off-by: Annette Kobou <annette.kobou@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable second ethernet interface
Frieder Schrempf [Mon, 25 Aug 2025 13:54:28 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable second ethernet interface

This ensures both interfaces can be used in U-Boot and both MAC addresses
are exported to the Linux kernel devicetree.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Set CONFIG_SDP_LOADADDR to fix SDP boot
Frieder Schrempf [Mon, 25 Aug 2025 13:54:27 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Set CONFIG_SDP_LOADADDR to fix SDP boot

We need to set CONFIG_SDP_LOADADDR to a valid RAM address to make
SDP boot work. Use the end of the DDR (256 MiB minimum) as other
boards do.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Enable standard boot and disable legacy distro boot
Frieder Schrempf [Mon, 25 Aug 2025 13:54:26 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Enable standard boot and disable legacy distro boot

Disable the legacy distro boot and use bootstd instead.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoimx: kontron-sl-mx6ul: Fix include statements for local header
Frieder Schrempf [Mon, 25 Aug 2025 13:54:25 +0000 (15:54 +0200)] 
imx: kontron-sl-mx6ul: Fix include statements for local header

The header from the local directory should use double quotes instead
of brackets. Otherwise the compiler might not search the local
directory.

Fixes: 93935acc6f1d ("imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device")
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
5 weeks agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Wed, 3 Sep 2025 21:21:14 +0000 (15:21 -0600)] 
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra

Branch contains minor improvents for ASUS SL101 and Jetson Nano along
with support for Microsoft Surface 2 tablet.

5 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 3 Sep 2025 21:19:15 +0000 (15:19 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Fix an issue reported by smatch in rzg2l pinctrl driver

5 weeks agospi: exynos: Remove extra term from test
Andrew Goodbody [Mon, 1 Sep 2025 15:13:14 +0000 (16:13 +0100)] 
spi: exynos: Remove extra term from test

In spi_rx_tx there comes a test for execution of a code block that
allows execution if rxp is not NULL or stopping is true. However all the
code in this block relies on rxp being valid so allowing entry just if
stopping is true does not make sense. So remove this from the test
expression leaving just a NULL check for rxp.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 weeks agopinctrl: rzg2l: Variable may not have been assigned to
Andrew Goodbody [Thu, 7 Aug 2025 14:41:18 +0000 (15:41 +0100)] 
pinctrl: rzg2l: Variable may not have been assigned to

In rzg2l_pinconf_set and rzg2l_get_pin_muxing if the call to
rzg2l_selector_decode fails then the variable pin may not have been
assigned to. Remove the use of pin from the error message. Also update
the error message to show the invalid selector used instead of port
which will be the error code returned.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Paul Barker <paul@pbarker.dev>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 weeks agoMerge patch series "memtest performance improvements"
Tom Rini [Tue, 2 Sep 2025 20:11:45 +0000 (14:11 -0600)] 
Merge patch series "memtest performance improvements"

Rasmus Villemoes <ravi@prevas.dk> says:

The first two patches make memtest run ~40x faster (when, as it should
be, dcache is disabled), with the second patch being responsible for
most of that. At least on the beagleboneblack which I used for
testing; other boards and configurations will likely see different
numbers.

This is for CONFIG_SYS_ALT_MEMTEST=y and
CONFIG_SYS_ALT_MEMTEST_BITFLIP=n; one could probably get a similar
improvement in the bitflip case since that also has a schedule() call
in the inner loop.

Link: https://lore.kernel.org/r/20250822181848.3325832-1-ravi@prevas.dk
6 weeks agomemtest: remove use of vu_long typedef in mem_test_alt
Rasmus Villemoes [Fri, 22 Aug 2025 18:18:48 +0000 (20:18 +0200)] 
memtest: remove use of vu_long typedef in mem_test_alt

Hiding a qualifier such as "volatile" inside a typedef makes the code
much harder to understand. Since addr and dummy being
volatile-qualified are important for the correctness of the test code,
make it more obvious by spelling it out as "volatile ulong".

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Anshul Dalal <anshuld@ti.com>
6 weeks agomemtest: only call schedule() once for every 256 words
Rasmus Villemoes [Fri, 22 Aug 2025 18:18:47 +0000 (20:18 +0200)] 
memtest: only call schedule() once for every 256 words

A function call itself for every word written or read+written in these
loops is bad enough. But since the memory test must be run with dcache
disabled, the schedule() call, traversing the linked list of
registered cyclic clients, and accessing the 'struct cyclic_info' for
each to see if any are due for a callback, is quite expensive. On a
beagleboneblack, testing a modest 16MiB region takes 2.5 minutes:

  => dcache off
  => time mtest 0x81000000 0x82000000 0 1
  Testing 81000000 ... 82000000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 2 minutes, 28.946 seconds

There is really no need for calling schedule() so frequently. It is
quite easy to limit the calls to once for every 256 words by using a
u8 variable. With that, the same test as above becomes 37 times
faster:

  => dcache off
  => time mtest 0x81000000 0x82000000 0 1
  Testing 81000000 ... 82000000:
  Iteration:      1
  Tested 1 iteration(s) with 0 errors.

  time: 4.052 seconds

Note that we are still making a total of

  3 loops * (4 * 2^20 words/loop) / (256 words/call) = 49152 calls

during those ~4000 milliseconds, so the schedule() calls are still
done less than 0.1ms apart.

These numbers are just for a beagleboneblack, other boards may have a
slower memory, but we are _two orders of magnitude_ away from
schedule() "only" being called at 100Hz, which is still more than
enough to ensure any watchdog is kept happy.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Tested-by: Anshul Dalal <anshuld@ti.com>