]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 weeks agocros_ec: sandbox: Use correct value for number of slots
Andrew Goodbody [Thu, 3 Jul 2025 10:00:33 +0000 (11:00 +0100)] 
cros_ec: sandbox: Use correct value for number of slots

In the definition of struct ec_state the number of slots that are
created is VSTORE_SLOT_COUNT (==4) but the value of req->slot is
checked against EC_VSTORE_SLOT_MAX (==32) so this can lead to memory
access beyond that allocated.
Instead change the size check to use VSTORE_SLOT_COUNT to ensure it
matches what has actually been allocated.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2 weeks agoREADME: remove obsolete note
Philip Molloy [Mon, 7 Jul 2025 13:06:50 +0000 (13:06 +0000)] 
README: remove obsolete note

Renaming SPL to XPL fixes the issue referenced in this note so the note
is no longer necessary

Fixes: 1d6132e2a2b ("global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD")
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
2 weeks agogpio: add SPL to Kconfig option description
Philip Molloy [Mon, 7 Jul 2025 13:06:38 +0000 (13:06 +0000)] 
gpio: add SPL to Kconfig option description

DM_GPIO_LOOKUP_LABEL and SPL_DM_GPIO_LOOKUP_LABEL had the same
description and therefore appeared to be duplicates in Kconfig frontends

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
2 weeks agopinctrl-uclass: update comment to reflect code
Philip Molloy [Mon, 7 Jul 2025 13:06:16 +0000 (13:06 +0000)] 
pinctrl-uclass: update comment to reflect code

The logic was updated without modifying the comment above it

Fixes: 72b8c6d1ebf ("pinctrl: don't fall back to pinctrl_select_state_simple()")
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
2 weeks agoMerge patch series "integer limit macro consolidation"
Tom Rini [Mon, 14 Jul 2025 18:43:33 +0000 (12:43 -0600)] 
Merge patch series "integer limit macro consolidation"

Rasmus Villemoes <ravi@prevas.dk> says:

I was bitten by our limit macros not being usable in #if conditionals
when building a standalone app. It turns out that the work to fix that
had already been started by the inclusion of the mbedtls library, so
it's something that people do hit.

Let's finish the job by providing suitable limit macros for all three families:

- Standard C types, char, short, ...
- Kernel-style fixed-width types s8, u64, ...
- POSIX/C99 fixed-width types int16_t, uint32_t, ...

Please note that a naive approach like spelling out the full decimal
value for the constants doesn't really work, as there is no such thing
as a "negative integer constant". That is, doing

#define LLONG_MIN -9223372036854775808LL

would lead to the compiler complaining

  warning: integer constant is so large that it is unsigned

and the type of that LLONG_MIN would actually be "unsigned long long", so e.g.

#if LLONG_MIN >= 0
#warning "LLONG_MIN is not negative?"
#endif

would fire.

Link: https://lore.kernel.org/r/20250707203655.613340-1-ravi@prevas.dk
2 weeks agolimits.h: provide all limit macros for standard [u]intNN_t types
Rasmus Villemoes [Mon, 7 Jul 2025 20:36:55 +0000 (22:36 +0200)] 
limits.h: provide all limit macros for standard [u]intNN_t types

Currently, we only have UINT32_MAX and UINT64_MAX in limits.h, and
then stdint.h and kernel.h somewhat randomly define UINT8_MAX and
INT32_MAX, respectively.

Provide a full set of definitions in terms of the min/max macros for
the types that [u]intNN_t are defined in terms of, namely the {s,u}NN
ones.

Try to avoid breaking whatever depended on getting UINT8_MAX from our
compat stdint.h by replacing it with an include of limits.h.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2 weeks agomove limits for sNN/uNN types from kernel.h to limits.h
Rasmus Villemoes [Mon, 7 Jul 2025 20:36:54 +0000 (22:36 +0200)] 
move limits for sNN/uNN types from kernel.h to limits.h

Since we define the {s,u}{8,16,32,64} types the same way on all
architectures, i.e. everybody uses asm-generic/int-ll64.h, we can just
define the associated limit macros in terms of those for the
corresponding types. This eliminates another set of limit macros that
are not usable in #if conditionals.

These type names and macros are not C or POSIX, so there's no language
violation, but certainly a violation of developers' reasonable
expectations.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2 weeks agomove more limits from kernel.h to limits.h and standardize their definitions
Rasmus Villemoes [Mon, 7 Jul 2025 20:36:53 +0000 (22:36 +0200)] 
move more limits from kernel.h to limits.h and standardize their definitions

In a customer project that was building a stand-alone application, I
hit a problem related to the fact that our LONG_MAX and friends are
not standards-compliant, in that they are not "suitable for use in #if
preprocessing directives"

... /toolchain_none/arm-cortexa8-eabi/sys-include/machine/_default_types.h:25:31: error: missing binary operator before token "long"
   25 |   || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) )
      |                               ^~~~~~~~~

So following up on commit 13de8483388 ("mbedtls: add mbedtls into the
build system"), move the rest of the macros associated to the standard
C types {signed,unsigned} {char, short, int, long, long long} (and of
course bare 'char') to limits.h.

Make use of the fact that both gcc and clang provide suitable
predefined __FOO_MAX__ macros for the signed types, and use a standard
scheme for defining the FOO_MIN and UFOO_MAX macros in terms of
FOO_MAX.

Note that suffixes like L and ULL are allowed for preprocessor
integers; it is (casts) which are not. And using appropriate suffixes,
we can arrange for the type of e.g. UINT_MAX to be "unsigned int" due
to integer promotion rules.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2 weeks agoMerge tag 'qcom-main-20250714' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 14 Jul 2025 14:54:19 +0000 (08:54 -0600)] 
Merge tag 'qcom-main-20250714' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon

CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/27056

- Fix unused access in ufetch
- Add missing clock for SM8650
- Port the Linux SPMI GPIO driver and port over SM8550 (other platforms
  should follow)

2 weeks agoclk: qcom: sm8650: add usb3 noc clk
Rui Miguel Silva [Wed, 18 Jun 2025 09:32:16 +0000 (10:32 +0100)] 
clk: qcom: sm8650: add usb3 noc clk

Commit [0] introduced, correctly, the bubble of qcom clock errors to
make it easy to spot missing clocks in the platforms, and this is a case
of that, add the GCC_CFG_NOC_USB3_PRIM_AXI_CLK clock to sm8650 clock
pool.

0: 7c5460afec3f ("clk/qcom: bubble up qcom_gate_clk_en() errors")

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250618093253.225929-1-rui.silva@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agowatchdog: qcom-wdt: Drop read check on write-only WDT_EN register
Balaji Selvanathan [Tue, 1 Jul 2025 06:57:38 +0000 (12:27 +0530)] 
watchdog: qcom-wdt: Drop read check on write-only WDT_EN register

On some Qualcomm platforms, such as Dragonwing boards, the WDT_EN
register is write-only. Reading it back after enabling the watchdog
can return invalid data or cause unexpected behavior.

In particular, the check:
  if (readl(wdt_addr(wdt, WDT_EN)) != 1)
may fail even though the watchdog is correctly enabled and running.
This leads to misleading error messages and unnecessary failures.

Removing the read check ensures compatibility and avoids false
negatives on platforms where WDT_EN is not readable.

This work builds upon this previous submission:
https://lore.kernel.org/u-boot/20250625094607.1348494-1-gopinath.sekar@oss.qualcomm.com/

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Link: https://lore.kernel.org/r/20250701065738.1644669-1-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agoqcom_defconfig: enable USB mass storage gadget
Casey Connolly [Thu, 26 Jun 2025 13:25:45 +0000 (15:25 +0200)] 
qcom_defconfig: enable USB mass storage gadget

Enable the USB mass storage gadget to make it easy to access the
internal storage on the board.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250626132550.353332-1-casey.connolly@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agocmd: ufetch: Initialise size before first use
Andrew Goodbody [Thu, 26 Jun 2025 14:12:58 +0000 (15:12 +0100)] 
cmd: ufetch: Initialise size before first use

The local variable size is not assigned to before it is used
for the first time. Correct this.

This issue was found by Smatch.

Fixes: 86d462c05d57 (cmd: add a fetch utility)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Link: https://lore.kernel.org/r/20250626-ufetch_fix-v1-1-025afdb85dc2@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agogpio: qcom: move pm8550 gpio to new driver
Neil Armstrong [Mon, 30 Jun 2025 16:04:45 +0000 (18:04 +0200)] 
gpio: qcom: move pm8550 gpio to new driver

Move support of the pm8550 gpios to the newly introduced
driver and drop the compatible entry and the read-only quirk
at the same time from the old driver.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250630-topic-sm8x50-pmic-gpio-pinctrl-new-v2-2-cc1512931197@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agogpio: qcom: add new driver for SPMI gpios
Neil Armstrong [Mon, 30 Jun 2025 16:04:44 +0000 (18:04 +0200)] 
gpio: qcom: add new driver for SPMI gpios

The current qcom_pmic_gpio driver is too limited and doesn't
support state tracking for all pins like the Linux driver.

Adding full pinconf support would require adding the state
and it's much simpler to restart from scratch with a new
driver based on the Linux one adapted to the U-Boot GPIO
and Pinctrl APIs.

For now only the PMICs I've been able to validate are
added in the compatible list but we should be able to
add the entire list from the Linux driver.

There's a few difference from the Linux driver:
- no IRQ support
- uses the U-Boot GPIO flags that maps very well
- uses the gpio-ranges to get the pins count
- no debugfs but prints the pin state via pinmux callback

It uses the same CONFIG entry as the old one, since
the ultimate goal is to migrate entirely on this new
driver once we verify it doesn't break the older
platforms.

Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250630-topic-sm8x50-pmic-gpio-pinctrl-new-v2-1-cc1512931197@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 weeks agokbuild: Avoid including architecture-specific Makefile twice
Yao Zi [Fri, 11 Jul 2025 08:52:34 +0000 (08:52 +0000)] 
kbuild: Avoid including architecture-specific Makefile twice

Stranges errors are observed when building U-Boot master for almost any
RISC-V board, the messages are in two types, one is about duplicated
symbols,

u-boot/arch/riscv/cpu//mtrap.S:32: multiple definition of `trap_entry';
arch/riscv/cpu/mtrap.o: u-boot/arch/riscv/cpu//mtrap.S:32: first defined here

and the other is fixdep's complaint about missing dependency files,

fixdep: error opening file: arch/riscv/cpu/.mtrap.o.d: No such file or directory
fixdep: error opening file: arch/riscv/cpu//.start.o.d: No such file or directory

where the latter could only be reproduced when building parallelly.

Both the two types of errors are about files in arch/riscv/cpu, and
there's a suspicious slash character in the reported path. Looking
through RISC-V-specific Makefiles, there's only one place that may
expand to such a path,

libs-y += arch/riscv/cpu/$(CPU)/

The right hand expands to "arch/riscv/cpu//" if $(CPU) isn't defined at
the time of including. With some debug statement added to
arch/riscv/Makefile, the output proves that arch/riscv/Makefile is
included twice, once with $(CPU) undefined and once defined correctly
according to CONFIG_SYS_CPU.

Futher bisecting shows an extra include statement against
arch/$(SRCARCH)/Makefile is added in earlier bump of Kbuild system. But
the statement is evaluated before config.mk is included and definition
of $(CPU), causing objects in arch/riscv/cpu/ are built and linked twice
(once as "arch/riscv/cpu/*", and once as "arch/riscv/cpu//*"), resulting
in the error.

Let's simply remove the extra include to fix these nasty errors. For
config targets, bumping Kbuild also introduced a new include to
arch/$(SRCARCH)/Makefile, which is removed as well for consistency.

Fixes: 5f520875bdf ("kbuild: Bump the build system to 5.1")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Bryan Brattlof <bb@ti.com>
2 weeks agoblock: sandbox: Add support for SYS_64BIT_LBA
Tom Rini [Fri, 4 Jul 2025 21:46:12 +0000 (15:46 -0600)] 
block: sandbox: Add support for SYS_64BIT_LBA

In order to use SYS_64BIT_LBA with this driver we need for "start" to
also be of type lbaint_t and to then use the correct printf format
characters.

Reviewed-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: Test for !COMPILE_TEST in some locations
Tom Rini [Fri, 4 Jul 2025 21:46:06 +0000 (15:46 -0600)] 
Kconfig: Test for !COMPILE_TEST in some locations

We have a few options that we cannot enable in a "allyesconfig" type
build because we cannot use zero as a default value.

- The logic around HAS_BOARD_SIZE_LIMIT assumes that if we have set this
  then we compare with it. Similarly, we need to set SPL_NO_BSS_LIMIT as
  the default there.
- Both SYS_CUSTOM_LDSCRIPT and ENV_USE_DEFAULT_ENV_TEXT_FILE then prompt
  for a file name to use.
- The SYS_I2C_SOFT driver is a legacy driver which requires a lot of
  configuration within the board config. file instead, so disable it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoKconfig: Add COMPILE_TEST option
Tom Rini [Fri, 4 Jul 2025 21:46:05 +0000 (15:46 -0600)] 
Kconfig: Add COMPILE_TEST option

Take the COMPILE_TEST option from the Linux Kernel v6.15 and since the
wording there is OK for us too, use it verbatim. Also update the default
for WERROR to be COMPILE_TEST which again matches the Linux Kernel.

This is the first big step needed to allow for "allyesconfig" to be
possible as it then lets us then disable things that aren't valid for a
compile only test.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoglobal: Make ARCH_MISC_INIT a selected symbol
Tom Rini [Fri, 4 Jul 2025 21:45:42 +0000 (15:45 -0600)] 
global: Make ARCH_MISC_INIT a selected symbol

This symbol is not something that the user should be enabling or
disabling but rather the developer for a particular board should select
it when required.

This is mostly size neutral, however a few places do have changes. In
the case of i.MX6ULL systems, it is always the case that
arch_misc_init() could call setup_serial_number() and do useful work,
but was not enabled widely, but now is. In the case of i.MX23/28
systems, we should be able to call mx28_fixup_vt() again here, so do so.
Finally, some platforms were calling arch_misc_init() and then not doing
anything and this results in removing the option.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agotoradex: Switch from ARCH_MISC_INIT to MISC_INIT_R in some cases
Tom Rini [Fri, 4 Jul 2025 21:45:41 +0000 (15:45 -0600)] 
toradex: Switch from ARCH_MISC_INIT to MISC_INIT_R in some cases

The hook arch_misc_init was not intended to be used for per-board hooks.
This can be done with misc_init_r instead, which is what follows
immediately after arch_misc_init. Switch a few platforms.

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agofs: erofs: Do NULL check before dereferencing pointer
Andrew Goodbody [Fri, 4 Jul 2025 10:53:18 +0000 (11:53 +0100)] 
fs: erofs: Do NULL check before dereferencing pointer

The assignments to sect and off use the pointer from ctxt.cur_dev but
that has not been NULL checked before this is done. So instead move the
assignments after the NULL check.

This issue found by Smatch

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Gao Xiang <xiang@kernel.org>
2 weeks agoboard: ti: Clean up formatting in rm-cfg.yaml
Neha Malcom Francis [Fri, 4 Jul 2025 09:12:34 +0000 (14:42 +0530)] 
board: ti: Clean up formatting in rm-cfg.yaml

Move to using the latest generated RM YAML configuration files generated
by the K3 Resource Partitioning Tool which updates them to have standard
formatting with respect to indentation.

These files were generated from the untagged commit 41718bd5f915 ("docs: Update
docs and move them to docs folder") of the K3 Resource Partitioning tool. This
tool is packaged as a part of the public SDK and is not otherwise
publicly available.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2 weeks agoMerge patch series "fs: ext4fs: Fix some issues found by Smatch"
Tom Rini [Fri, 11 Jul 2025 16:44:38 +0000 (10:44 -0600)] 
Merge patch series "fs: ext4fs: Fix some issues found by Smatch"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported some issues in the ext4fs code. This includes a
suggestion to use an unwind goto, to not negate a return value and to
ensure that a NULL check happens before the pointer is dereferenced.

Link: https://lore.kernel.org/r/20250704-ext4fs_fix-v1-0-5c6acf4bf839@linaro.org
2 weeks agoMerge patch series "Create uclass for HW AES cryptographic devices"
Tom Rini [Fri, 11 Jul 2025 16:43:34 +0000 (10:43 -0600)] 
Merge patch series "Create uclass for HW AES cryptographic devices"

Svyatoslav Ryhel <clamor95@gmail.com> says:

Add uclass for HW AES cryptographic devices found on some devices, like
Tegra20/Tegra30 SoC AES engine.

Link: https://lore.kernel.org/r/20250629105711.24687-1-clamor95@gmail.com
2 weeks agoMerge patch series "Enable RNG support for KASLR on Toradex arm64 TI SoMs"
Tom Rini [Fri, 11 Jul 2025 16:42:39 +0000 (10:42 -0600)] 
Merge patch series "Enable RNG support for KASLR on Toradex arm64 TI SoMs"

Emanuele Ghidoli <emanuele.ghidoli@toradex.com> says:

This patch series enables RNG support to automatically populate
/chosen/kaslr-seed on the following Toradex arm64 TI System on Modules:
- Verdin AM62
- Verdin AM62P

This improves kernel security by supporting Kernel Address Space Layout
Randomization (KASLR) using a runtime-provided seed.

Link: https://lore.kernel.org/r/20250702134942.1483436-1-ghidoliemanuele@gmail.com
2 weeks agoconfigs: verdin-am62p: enable RNG support for KASLR
Emanuele Ghidoli [Wed, 2 Jul 2025 13:49:37 +0000 (15:49 +0200)] 
configs: verdin-am62p: enable RNG support for KASLR

Enable DM_RNG in U-Boot to populate /chosen/kaslr-seed automatically.
Enable OP-TEE, which supports RNG, to provide entropy.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2 weeks agoconfigs: verdin-am62: enable RNG support for KASLR
Emanuele Ghidoli [Wed, 2 Jul 2025 13:49:36 +0000 (15:49 +0200)] 
configs: verdin-am62: enable RNG support for KASLR

Enable DM_RNG in U-Boot to populate /chosen/kaslr-seed automatically.
Enable OP-TEE, which supports RNG, to provide entropy.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
2 weeks agofs: ext4fs: Perform NULL check before dereference
Andrew Goodbody [Fri, 4 Jul 2025 12:32:44 +0000 (13:32 +0100)] 
fs: ext4fs: Perform NULL check before dereference

In the function put_ext4 there is a NULL check for fs->dev_desc but this
has already been derefenced twice before this happens. Refactor the code
a bit to put the NULL check first.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2 weeks agofs: ext4fs: Use unwind goto to free memory on error
Andrew Goodbody [Fri, 4 Jul 2025 12:32:43 +0000 (13:32 +0100)] 
fs: ext4fs: Use unwind goto to free memory on error

Ensure that allocated memory is freed on error exit replace the direct
return calls with 'goto fail'.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2 weeks agofs: ext4fs: Do not negate error before returning it
Andrew Goodbody [Fri, 4 Jul 2025 12:32:42 +0000 (13:32 +0100)] 
fs: ext4fs: Do not negate error before returning it

In ext4fs_readdir it calls ext4fs_read_file and checks the return value
for non-zero to detect an error. This return value should be returned as
is rather than being negated.

This issue found by Smatch

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2 weeks agotest: dm: add AES engine test
Svyatoslav Ryhel [Sun, 29 Jun 2025 10:57:11 +0000 (13:57 +0300)] 
test: dm: add AES engine test

Create a basic test suit for AES DM uclass that covers all available
operations.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 weeks agocmd: aes: Add support for DM AES drivers
Ion Agorria [Sun, 29 Jun 2025 10:57:10 +0000 (13:57 +0300)] 
cmd: aes: Add support for DM AES drivers

This adds new aes subcommands to use interface provided by AES UCLASS which
can be used to expose HW AES engines.

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 weeks agocrypto: aes: Add software AES DM driver
Ion Agorria [Sun, 29 Jun 2025 10:57:09 +0000 (13:57 +0300)] 
crypto: aes: Add software AES DM driver

This adds AES crypto engine using the AES Uclass implemented in software,
serves as example implementation and for uclass tests.

Those implementing HW AES crypto engine drivers can use this as basis and
replace software parts with the HW specifics of their device.

Signed-off-by: Ion Agorria <ion@agorria.com>
2 weeks agodm: crypto: Create AES uclass
Ion Agorria [Sun, 29 Jun 2025 10:57:08 +0000 (13:57 +0300)] 
dm: crypto: Create AES uclass

Create a basic framework for a group of devices that perform AES
cryptographic operations.

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 weeks agoMerge tag 'u-boot-imx-master-20250710' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 11 Jul 2025 14:38:53 +0000 (08:38 -0600)] 
Merge tag 'u-boot-imx-master-20250710' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27010

- Fix the i.MX8M Nano GPU path.
- Enable RNG support for KASLR on Toradex i.MX8 boards.
- Enable watchdog and clock driver for imx6ulz_smm_m2b.
- Tighten dependencies on CMD_BLOB.
- Remove the rest of i.MX31 support.

2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Thu, 10 Jul 2025 22:44:08 +0000 (16:44 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- SH Ether clean ups, RZ/A1 clean ups, RZ/A1 Genmai support
- Gen3 EEPROM DT node clean up
- V4H SA0 BootROM compatible binman etype, SCIF compatible SREC
  generation for Gen4

3 weeks agoARM: renesas: Add support for the r7s72100 Genmai board
Magnus Damm [Wed, 2 Jul 2025 17:13:54 +0000 (19:13 +0200)] 
ARM: renesas: Add support for the r7s72100 Genmai board

Add r7s72100 Genmai board support. Serial console, NOR Flash and
Ethernet are known to work however on-board SDRAM is not yet enabled.

Signed-off-by: Magnus Damm <damm@opensource.se>
3 weeks agoARM: renesas: Put common r7s72100 code in board/renesas/common
Magnus Damm [Wed, 2 Jul 2025 17:13:46 +0000 (19:13 +0200)] 
ARM: renesas: Put common r7s72100 code in board/renesas/common

Break out SoC specific code from the GR-Peach board and put it into the
board/renesas/common directory so it can be easily shared between the
GR-Peach and Genmai boards.

Signed-off-by: Magnus Damm <damm@opensource.se>
3 weeks agoARM: renesas: Split common RZ/A1 and GR-PEACH defconfigs
Marek Vasut [Mon, 7 Jul 2025 08:39:31 +0000 (10:39 +0200)] 
ARM: renesas: Split common RZ/A1 and GR-PEACH defconfigs

Split the RZ/A1 GR-PEACH defconfig into board-specific defconfig
and common RZ/A1 SoC defconfig. This is a preparatory patch for
new RZ/A1 boards, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm64: renesas: Switch R-Car V4H to renesas_rcar4_sa0 binman etype
Marek Vasut [Mon, 16 Jun 2025 22:45:03 +0000 (00:45 +0200)] 
arm64: renesas: Switch R-Car V4H to renesas_rcar4_sa0 binman etype

Replace current ad-hoc generation of SA0 header with renesas_rcar4_sa0 binman
etype on Renesas R-Car V4H. The new binman etype generates header which is
almost identical to the current ad-hoc SA0 header, with one difference, the
load length matches the actual payload size, which slightly improves boot time.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agobinman: Add renesas_rcar4_sa0 etype
Marek Vasut [Mon, 16 Jun 2025 22:45:02 +0000 (00:45 +0200)] 
binman: Add renesas_rcar4_sa0 etype

Add new etype which generates the Renesas R-Car Gen4 SA0 header.
This header is placed at the beginning of SPI NOR and describes
where should data from SPI NOR offset 0x40000 be loaded to, and
how much data should be loaded there. In case of U-Boot, this is
used to load SPL and possibly other payload(s) into RT-VRAM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm64: dts: renesas: Clean up sysinfo EEPROM DT description on R-Car Gen3
Marek Vasut [Sun, 8 Jun 2025 21:01:04 +0000 (23:01 +0200)] 
arm64: dts: renesas: Clean up sysinfo EEPROM DT description on R-Car Gen3

Most of the sysinfo EEPROM node eeprom@50 is now part of the core DTs,
remove duplicate DT properties from *-u-boot.dtsi . Adjust the phandle
reference to i2c-eeprom in sysinfo node using <&{i2c_*/eeprom@50}> to
avoid need for DT label. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm: renesas: configs: Drop deprecated comments
Marek Vasut [Mon, 30 Jun 2025 18:51:17 +0000 (20:51 +0200)] 
arm: renesas: configs: Drop deprecated comments

Remove various deprecated code comments, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_PHY_MODE
Marek Vasut [Mon, 30 Jun 2025 18:51:16 +0000 (20:51 +0200)] 
net: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_PHY_MODE

Drop CFG_SH_ETHER_PHY_MODE from configuration files, this value
is never used. No functional change intended.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_PHY_ADDR
Marek Vasut [Mon, 30 Jun 2025 18:51:15 +0000 (20:51 +0200)] 
net: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_PHY_ADDR

Drop CFG_SH_ETHER_PHY_ADDR from README and configuration files, this
value is never used, PHY address is extracted from control DT instead.
No functional change intended.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: Drop phy_addr assignment
Marek Vasut [Mon, 30 Jun 2025 18:51:14 +0000 (20:51 +0200)] 
net: sh_eth: Drop phy_addr assignment

Drop unused struct sh_eth_info *port_info .phy_addr member assignment.
PHY address is extracted from control DT. No functional change intended.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_CACHE_*
Marek Vasut [Mon, 30 Jun 2025 18:51:13 +0000 (20:51 +0200)] 
net: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_CACHE_*

Drop CFG_SH_ETHER_CACHE_WRITEBACK and CFG_SH_ETHER_CACHE_INVALIDATE,
which are now always enabled in the sh_eth driver, because those cache
operations are always available. On architectures which do not implement
cache operations yet, cache operations have to be implemented first.

CFG_SH_ETHER_ALIGNE_SIZE now set as SH_ETHER_ALIGN_SIZE in sh_eth.h
based on architecture and no longer configured on board level.

Remove CFG_SH_ETHER_CACHE_WRITEBACK configuration option from README.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: Convert cache operations to static functions
Marek Vasut [Mon, 30 Jun 2025 18:51:12 +0000 (20:51 +0200)] 
net: sh_eth: Convert cache operations to static functions

Turn the current cache operation macros into static functions to improve
compiler coverage checking. This does change the driver behavior slightly,
the driver now expects those cache operation functions to be available on
all architectures on which it is used. This should pose no problem, as the
driver is only used on 32bit and 64bit ARM, which both have those operations.
The CFG_SH_ETHER_ALIGNE_SIZE is converted to SH_ETHER_ALIGN_SIZE and defined
as either 64 on ARM or 16 on SH.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_USE_PORT
Marek Vasut [Mon, 30 Jun 2025 18:51:11 +0000 (20:51 +0200)] 
net: sh_eth: arm: renesas: README: Drop CFG_SH_ETHER_USE_PORT

The CFG_SH_ETHER_USE_PORT configuration option is a remnant from
before U-Boot DM existed and SH Ethernet made full use of it, and
is no longer used, remove it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonet: sh_eth: Pass struct port_info around
Marek Vasut [Mon, 30 Jun 2025 18:51:10 +0000 (20:51 +0200)] 
net: sh_eth: Pass struct port_info around

The struct sh_eth_dev .port member is always set to 0, therefore only
single-ported SH Ethernet is ever used. Support for multiple SH Ethernet
ports implemented on driver level is a remnant from before U-Boot DM
existed.

Pass struct sh_eth_info port_info around directly and remove the
struct sh_eth_dev entirely. Handling of multiple ports should be done
by U-Boot DM and multiple per-driver-instance private data.

No functional change intended.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm64: renesas: Add Renesas R-Car Gen4 SCIF/HSCIF loader SREC generation
Marek Vasut [Sun, 15 Jun 2025 10:51:08 +0000 (12:51 +0200)] 
arm64: renesas: Add Renesas R-Car Gen4 SCIF/HSCIF loader SREC generation

Add Renesas R-Car Gen4 SCIF/HSCIF loader compatible SREC generation.
This is a regular U-Boot SPL SREC augmented with a short header which
describes where to store the received data and how much data to store.
This header is interpreted by the R-Car Gen4 BootROM SCIF/HSCIF loader.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm64: renesas: Convert SCIF SREC from u-boot-spl.bin
Marek Vasut [Sun, 15 Jun 2025 10:51:07 +0000 (12:51 +0200)] 
arm64: renesas: Convert SCIF SREC from u-boot-spl.bin

Convert u-boot-spl.bin instead of u-boot-spl ELF into SCIF loader
compatible SREC. The u-boot-spl.bin includes SPL DT, while the ELF
does not, which leads to failure to start SPL via SCIF loader due
to missing SPL DT. Fix this by using u-boot-spl.bin which includes
the DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agonvme: Fix memory leak on error path of nvme_init
Andrew Goodbody [Wed, 2 Jul 2025 16:02:10 +0000 (17:02 +0100)] 
nvme: Fix memory leak on error path of nvme_init

The use of log_msg_ret to log a message and return an error meant that
memory allocated earlier in the function was not freed on this error
path. Instead log the message in the same way that log_msg_ret would do
and then goto the cleanup code to free the memory.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agomakefile: Adjust distclean to remove .binman_stamp file
Magnus Damm [Wed, 2 Jul 2025 13:34:05 +0000 (15:34 +0200)] 
makefile: Adjust distclean to remove .binman_stamp file

Remove the .binman_stamp file during distclean

Signed-off-by: Magnus Damm <damm@opensource.se>
3 weeks agonet: ti: icssg: Read firmware name from device-tree
MD Danish Anwar [Wed, 2 Jul 2025 11:35:45 +0000 (17:05 +0530)] 
net: ti: icssg: Read firmware name from device-tree

Update the ICSSG PRU Ethernet driver to read PRU/RTU/TXPRU firmware names
from the Device Tree using the "firmware-name" property, instead of relying
on the hard-coded firmware names. The firmware names are parsed during
prueth_probe() and stored in the prueth->firmwares for each slice. The
driver now uses these dynamically loaded names when starting the PRU cores.

This change improves flexibility and allows firmware selection to be
controlled via the device tree, making the driver more adaptable to
different platforms and firmware configurations.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
3 weeks agodisk/part_dos.c: Make use of LBAF for printing lbaint_t
Tom Rini [Wed, 2 Jul 2025 01:05:57 +0000 (19:05 -0600)] 
disk/part_dos.c: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF
to print it in order to get the correct format type depending on 32 or
64bit-ness.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocommon/log_syslog.c: Add missing include of <env.h>
Tom Rini [Wed, 2 Jul 2025 01:05:54 +0000 (19:05 -0600)] 
common/log_syslog.c: Add missing include of <env.h>

This file was making environment calls without including <env.h> and so
relying on an indirect inclusion from elsewhere. Add the missing include
directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agopost: Add dependency on ARM || PPC
Tom Rini [Wed, 2 Jul 2025 01:05:14 +0000 (19:05 -0600)] 
post: Add dependency on ARM || PPC

The post framework requires architecture specific implementation
details. At the moment this is only done for ARM and PowerPC so express
that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocmd/Kconfig: Tighten dependencies on CMD_SEAMA
Tom Rini [Wed, 2 Jul 2025 01:05:08 +0000 (19:05 -0600)] 
cmd/Kconfig: Tighten dependencies on CMD_SEAMA

In order to build this command we need to have configured some other
board specific features. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoadc: Tighten some adc driver dependencies
Tom Rini [Wed, 2 Jul 2025 01:04:32 +0000 (19:04 -0600)] 
adc: Tighten some adc driver dependencies

A few adc drivers cannot build without access to some platform specific
header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoata: Correct two dependency issues
Tom Rini [Wed, 2 Jul 2025 01:04:29 +0000 (19:04 -0600)] 
ata: Correct two dependency issues

First, the SATA_MV driver can only build on kirkwood or mvebu platforms
due to header requirements, so add that as a dependency here. Second,
SYS_SATA_MAX_DEVICE is also used by the API code so allow it to be
configured in that case.

Reviewed-by: Tony Dinh <mibodhi@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocrypto: aspeed: Tighten some dependencies for the aspeed platforms
Tom Rini [Wed, 2 Jul 2025 01:04:22 +0000 (19:04 -0600)] 
crypto: aspeed: Tighten some dependencies for the aspeed platforms

Some of the aspeed platform drivers cannot build without platform
specific headers being available. Express those requirements in Kconfig as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocrypto: fsl: Only allow these to be chosen on ARM/PowerPC
Tom Rini [Wed, 2 Jul 2025 01:04:19 +0000 (19:04 -0600)] 
crypto: fsl: Only allow these to be chosen on ARM/PowerPC

These drivers require various headers which only exist on the ARM /
PowerPC platforms which implement the hardware. Express that requirement
in Kconfig as well.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocrypto: nuvoton: Tighten some dependencies for the nuvoton platforms
Tom Rini [Wed, 2 Jul 2025 01:04:15 +0000 (19:04 -0600)] 
crypto: nuvoton: Tighten some dependencies for the nuvoton platforms

The nuvoton AES driver cannot build without platform specific headers
being available. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agodma: ti: Tighten some dependencies for some ti platforms
Tom Rini [Wed, 2 Jul 2025 01:04:13 +0000 (19:04 -0600)] 
dma: ti: Tighten some dependencies for some ti platforms

The TI EDMA3 driver cannot build without platform specific headers being
available. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agogpio: Tighten some gpio driver dependencies
Tom Rini [Wed, 2 Jul 2025 01:04:02 +0000 (19:04 -0600)] 
gpio: Tighten some gpio driver dependencies

A large number of gpio drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agosandbox: Add some missing {clr,set,clrset}bits variants
Tom Rini [Tue, 1 Jul 2025 18:42:57 +0000 (12:42 -0600)] 
sandbox: Add some missing {clr,set,clrset}bits variants

Add the 16, 32 and 64bit versions of the non-endian {clr,set,clrset}bits
macros.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agodrivers: net: phy: micrel: Try to get phy node from phy-handle
Naresh Kumar Ravulapalli [Tue, 1 Jul 2025 04:49:23 +0000 (21:49 -0700)] 
drivers: net: phy: micrel: Try to get phy node from phy-handle

If phy node isn't found in ethernet-phy subnode, try to get it from
phy-handle. And when this fails, only then use Ethernet node. This
fix results in getting correct phy handle properties for the
phy node if defined.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
3 weeks agoarm: imx: imx8m: soc: Fix i.MX8M Nano GPU paths
Alexander Stein [Tue, 8 Jul 2025 08:41:24 +0000 (10:41 +0200)] 
arm: imx: imx8m: soc: Fix i.MX8M Nano GPU paths

The SoC node is called 'soc@0', even on NXP branch 6.6-fslc. This fixes
the boot on i.MX8M Nano DualLite, as there is no GPU.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
3 weeks agoconfigs: imx6ulz_smm_m2b: Add board watchdog reset configuration
Michael Trimarchi [Tue, 8 Jul 2025 10:35:29 +0000 (12:35 +0200)] 
configs: imx6ulz_smm_m2b: Add board watchdog reset configuration

Add the configuration that allow to reset the board from reset
cmd

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agoconfigs/imx6ulz_smm_m2b_defconfig: Enable clock framework
Michael Trimarchi [Tue, 8 Jul 2025 10:35:28 +0000 (12:35 +0200)] 
configs/imx6ulz_smm_m2b_defconfig: Enable clock framework

Enable the clock framework on the m2b platform as was done
in m2 variant. This helps to increase the NAND controller performance.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agoarm: imx: Remove the rest of i.MX31 support
Tom Rini [Fri, 4 Jul 2025 21:46:00 +0000 (15:46 -0600)] 
arm: imx: Remove the rest of i.MX31 support

With the removal of the last i.MX31 platform we can remove the rest of
the underlying architecture code as well.

Fixes: f247354708ec ("arm: Remove mx31pdk board")
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
3 weeks agocmd/Kconfig: Tighten dependencies on CMD_BLOB
Tom Rini [Wed, 2 Jul 2025 01:05:11 +0000 (19:05 -0600)] 
cmd/Kconfig: Tighten dependencies on CMD_BLOB

In order for this command to build we need to compile
drivers/crypto/fsl/fsl_blob.c and this in turn includes
drivers/crypto/fsl/jr.h which references "ccsr_sec_t" which is only a
defined type for SYS_FSL_SEC_COMPAT >= 4. Express that requirement in
Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 weeks agoconfigs: colibri-imx8x: enable RNG support for KASLR
Emanuele Ghidoli [Tue, 1 Jul 2025 13:45:00 +0000 (15:45 +0200)] 
configs: colibri-imx8x: enable RNG support for KASLR

Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed
and enable CAAM to provide entropy.
Enable ARCH_MISC_INIT to initialize the CAAM job ring.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoconfigs: apalis-imx8: enable RNG support for KASLR
Emanuele Ghidoli [Tue, 1 Jul 2025 13:44:59 +0000 (15:44 +0200)] 
configs: apalis-imx8: enable RNG support for KASLR

Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed
and enable CAAM to provide entropy.
Enable ARCH_MISC_INIT to initialize the CAAM job ring.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoconfigs: toradex-smarc-imx8mp: enable RNG support for KASLR
Emanuele Ghidoli [Tue, 1 Jul 2025 13:44:58 +0000 (15:44 +0200)] 
configs: toradex-smarc-imx8mp: enable RNG support for KASLR

Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoconfigs: verdin-imx8mp: enable RNG support for KASLR
Emanuele Ghidoli [Tue, 1 Jul 2025 13:44:57 +0000 (15:44 +0200)] 
configs: verdin-imx8mp: enable RNG support for KASLR

Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoconfigs: verdin-imx8mm: enable RNG support for KASLR
Emanuele Ghidoli [Tue, 1 Jul 2025 13:44:56 +0000 (15:44 +0200)] 
configs: verdin-imx8mm: enable RNG support for KASLR

Enable DM_RNG in U-Boot to automatically populate /chosen/kaslr-seed
and enable CAAM to provide entropy.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agolmb: add missing fallthrough in lmb_alloc_mem()
Heinrich Schuchardt [Tue, 8 Jul 2025 12:12:51 +0000 (14:12 +0200)] 
lmb: add missing fallthrough in lmb_alloc_mem()

Add fallthrough to clarify the intent.

Addresses-Coverity-ID: CID 569481: Control flow issues (MISSING_BREAK)
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agocmd: Remove "universe" command.
Tom Rini [Tue, 1 Jul 2025 18:42:37 +0000 (12:42 -0600)] 
cmd: Remove "universe" command.

We have had no platforms that make use of this since 2015, so drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agocmd: Remove "tsi148" command
Tom Rini [Tue, 1 Jul 2025 18:42:34 +0000 (12:42 -0600)] 
cmd: Remove "tsi148" command

We have had no platforms that make use of this since 2021, so drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agodma: Remove lpc32x_dma driver
Tom Rini [Tue, 1 Jul 2025 18:42:32 +0000 (12:42 -0600)] 
dma: Remove lpc32x_dma driver

This driver has no users after we removed the last supported platform in
2024.

Fixes: 26ed58b40f58 ("arm: Remove devkit3250 board")
Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agogpio: Remove tca642x support
Tom Rini [Tue, 1 Jul 2025 18:42:28 +0000 (12:42 -0600)] 
gpio: Remove tca642x support

This driver has no users after we removed the last supported platform in
2023.

Fixes: 7a3ee61f5551 ("arm: Remove omap5_uevm board")
Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agobinman: migrate from pkg_resources to importlib
Yannic Moog [Tue, 1 Jul 2025 05:45:37 +0000 (07:45 +0200)] 
binman: migrate from pkg_resources to importlib

pkg_resources is deprecated, use migration guide in [1] to migrate to
importlib.resources.
Keep the Python 3.6 backwards compatibility.
This also fixes the binman version test which failed for setuptools
versions that print the deprecation warning.
Change from __name__ to __package__ as with the transition from
pkg_resources to importlib_resources using __name__ results in
TypeErrors [2].

[1] https://importlib-resources.readthedocs.io/en/latest/migration.html
[2] https://github.com/python/importlib_resources/issues/60

Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
3 weeks agoMerge patch series "board: ti: am33xx: Add Ethernet support for Beaglebone Green...
Tom Rini [Wed, 9 Jul 2025 14:45:33 +0000 (08:45 -0600)] 
Merge patch series "board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco"

Romain Gantois <romain.gantois@bootlin.com> says:

This is version one of my series which enables Ethernet support on the BBGE
board. This requires three main changes:

 - Describing the MAC<->PHY link and DP83867 PHY accurately in the device
   tree
 - Enabling the RGMII1 pinmux configuration
 - Enabling the DP83867 driver

These changes are all applied in patch 2.

Patch 1 enables excluding the DP83867 driver from SPL. This is done to
avoid size issues when adding the DP83867 driver to the am335x-evm
defconfig.

Link: https://lore.kernel.org/r/20250626-bbge-ethernet-v1-0-5b544fb1898f@bootlin.com
3 weeks agoboard: ti: am33xx: Add Ethernet support for Beaglebone Green Eco
Romain Gantois [Thu, 26 Jun 2025 16:20:25 +0000 (18:20 +0200)] 
board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco

Currently, the Ethernet interface of the BBGE board isn't properly
supported.

To support this interface, describe the MAC<->PHY RGMII link and the
DP83867 PHY in the BBGE device tree. Enable the DP83867 PHY driver in
U-Boot Proper and mux the relevant RGMII lines.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Tested-by: Judith Mendez <jm@ti.com>
3 weeks agonet: phy: dp83867: Allow excluding driver from SPL
Romain Gantois [Thu, 26 Jun 2025 16:20:24 +0000 (18:20 +0200)] 
net: phy: dp83867: Allow excluding driver from SPL

The DP83867 PHY driver is used by the BeagleBoneGreen Eco board, but adding
it to the am335x-evm defconfig causes SPL to overflow its size limits.

Add a separate option to enable this driver in SPL, so that it can be
enabled in U-Boot without adding unnecessary volume to SPL.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Tested-by: Judith Mendez <jm@ti.com>
3 weeks agoMerge patch series "Improve Verdin AM62P thermal setup by generalizing ft_board_setup...
Tom Rini [Wed, 9 Jul 2025 14:40:36 +0000 (08:40 -0600)] 
Merge patch series "Improve Verdin AM62P thermal setup by generalizing ft_board_setup_ex()"

João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com> says:

In some use cases, board-specific device tree changes must not be overwritten
by system fixups. Although U-Boot provides ft_board_setup_ex() for this
purpose, it is currently only used on TI Keystone. This series makes
ft_board_setup_ex() a generic option, allowing its use by other architectures
and boards.

Additionally, considering that Toradex Verdin-AM62P hardware lifetime
guarantees are based on a 105°C junction temperature (while TI AM62Px supports
up to 125°C), this series implements necessary changes within TI K3 AM62P and
Toradex board code. These changes include exporting common fixup device Tree
functions used in TI K3 for board-code access and also fixup for AM62P thermal
zones to correctly reflect the number of CPU nodes according to the SoC part
number.

Link: https://lore.kernel.org/r/20250623-am62p-fdt-fixup-trip-points-v1-0-12355eb6a72f@toradex.com
3 weeks agoboard: toradex: verdin-am62p: Add fixup for critical trip points
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:57 +0000 (14:39 -0300)] 
board: toradex: verdin-am62p: Add fixup for critical trip points

While TI AM62P supports up to 125°C junction temperature, Tj, for
industrial and automotive parts, Toradex Verdin-AM62P hardware lifetime
guarantees consider a 105°C Tj. Fixup the device tree temperature
critical trip points to match the hardware specifications. The
implementation ensures the architecture code will not overwrite the
board specific changes by enabling CONFIG_OF_BOARD_SETUP_EXTENDED for
the Verdin-AM62P.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 weeks agoarm: mach-k3: am62p: fixup thermal cooling device by cpu number
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:56 +0000 (14:39 -0300)] 
arm: mach-k3: am62p: fixup thermal cooling device by cpu number

TI AM62Px devices support CPU throttling based on thermal alerts.
However, the device tree assumes a 4-core configuration. Since the AM62P
also supports 2-core configurations, add a fixup to dynamically adjust
the cooling-device nodes within thermal zones based on the actual number
of CPU cores available.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoarm: mach-k3: Export common fdt fixups for use in board code
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:55 +0000 (14:39 -0300)] 
arm: mach-k3: Export common fdt fixups for use in board code

Avoid code duplication by making the common TI K3 device tree fixup
functions to be reusable by board-specific code.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoboot: Make ft_board_setup_ex() generic
João Paulo Gonçalves [Mon, 23 Jun 2025 17:39:54 +0000 (14:39 -0300)] 
boot: Make ft_board_setup_ex() generic

In some use cases, board-specific device tree changes must not be
overwritten by system fixups. Although U-Boot provides
ft_board_setup_ex() for this purpose, it is currently only used on TI
Keystone. Make ft_board_setup_ex() to be a generic option, allowing its
use by other architectures/boards. To maintain backward compatibility,
enable it by default on TI Keystone.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoboot: menu: Do not dereference pointer if pointer is NULL
Andrew Goodbody [Wed, 2 Jul 2025 09:24:16 +0000 (10:24 +0100)] 
boot: menu: Do not dereference pointer if pointer is NULL

scene_obj_find can return NULL but this is not checked for before
the return is dereferenced. Add a NULL check.

This issue was found by Smatch.

Also add a NULL check for str.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agoboot: pxe: Prevent evaluation of uninitialised variable
Andrew Goodbody [Mon, 30 Jun 2025 11:57:10 +0000 (12:57 +0100)] 
boot: pxe: Prevent evaluation of uninitialised variable

In the case where parse_sliteral returns an error then label_name
will not have been assigned to. In order to prevent evaluating
label_name in this case add a check for the return value of parse_sliteral.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoenv: Fix possible out-of-bound access in env_do_env_set
Christian Marangi [Sun, 29 Jun 2025 13:21:18 +0000 (15:21 +0200)] 
env: Fix possible out-of-bound access in env_do_env_set

It was discovered that env_do_env_set() currently suffer from a long
time of a possible out-of-bound access for the argv array handling.

The BUG is present in the function env_do_env_set() line:

name = argv[1];

where the function at this point assume the argv at index 1 is always
present and can't be NULL. Aside from the fact that it's always
better to validate argv entry with the argc variable, situation where
the argv[1] is NULL is actually possible and not an error condition.

A example of where an out-of-bound access is triggered is with the
command "askenv - Press ENTER to ...".
This is a common pattern for bootmenu entry to ask the user input after
a bootmenu command succeeded.

In the context of such command, the while loop before "name = argv[1];"
parse the "-" char as an option arg and increment the argv pointer by
one (to make the rest of the logic code ignore the option argv) and
decrement argc value.

The while loop logic is correct but at the "name = argv[1];" line, the
argv have only one element left (the "-" char) and accessing argv[1]
(aka the secong element from argv pointer) cause an out-of-bound access
(making the bootloader eventually crash with strchr searching in invalid
data)

To better handle this and prevent the out-of-bound access, actually
check the argv entry left (with the use of the argc variable) and exit
early before doing any kind of array access.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
3 weeks agofit-dtb.blob.gz: Pass "-n" to gzip
Tom Rini [Fri, 27 Jun 2025 17:29:47 +0000 (11:29 -0600)] 
fit-dtb.blob.gz: Pass "-n" to gzip

Sometimes when building a platform such as imx28_btt3 we can get an
error such as:

gzip: fit-dtb.blob: warning: file timestamp out of range for gzip format
make[1]: *** [Makefile:1219: fit-dtb.blob.gz] Error 2
make[1]: *** Deleting file 'fit-dtb.blob.gz'
make: *** [Makefile:186: sub-make] Error 2

This is typically resolved by telling gzip to ignore the timestamp.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agotools: termios_linux.h: Fix build error on ppc64
Javier Martinez Canillas [Fri, 27 Jun 2025 13:53:37 +0000 (15:53 +0200)] 
tools: termios_linux.h: Fix build error on ppc64

Commit 93b55636b09f ("tools: kwboot: Allow any baudrate on Linux") added a
tcgetattr() function to be used, instead of the libc's termios functions.

This was done to allow using the raw TCGETS2/TCSETS2 ioctls that allow to
support arbitrary baud rates.

This breaks the build for PowerPC, because that architecture does not have
a struct termios2 defined because the termios and ktermios are the same.

On PowerPC, the termios ioctl() emulates the TCGETS2/TCSETS*2 ioctls with
tcgetattr/tcsetattr using just the struct termios (that's as mentioned the
same than what is defined as struct termios2 in other architectures).

So there is no need to use the TCGETS2/TCSETS2 ioctls on that architecture
and just TCGETS/TCSETS ioctls with termios as defined by PowerPC is enough.

Fixes: 93b55636b09f ("tools: kwboot: Allow any baudrate on Linux")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agopci_endpoint: pci_cdns_ti_ep: Fix the include path for header file
Hrushikesh Salunke [Fri, 27 Jun 2025 05:55:46 +0000 (11:25 +0530)] 
pci_endpoint: pci_cdns_ti_ep: Fix the include path for header file

The commit under fixes tag includes "pcie-cadence.h" using angle
brackets. Since the header file is not in standard include path change
it to double quotes to ensure proper inclusion and avoid build issues,
especially on older compilers.

Fixes: a4a0edc6046 ("pci_endpoint: Add TI K3 Cadence PCIe Endpoint Controller driver")
Signed-off-by: Hrushikesh Salunke <h-salunke@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
3 weeks agoboard: phytec: rm-cfg: Update rm-cfg to reflect new resource reservation
Wadim Egorov [Thu, 26 Jun 2025 12:39:30 +0000 (14:39 +0200)] 
board: phytec: rm-cfg: Update rm-cfg to reflect new resource reservation

With the latest TIFS firmware, an additional virtual interrupt and
event is reserved for TIFS usage on am62x and am62ax devices.

Update the rm-cfg to reflect this new reservation.

Based on commit 87720385ab69 ("board: ti: rm-cfg: Update rm-cfg to
reflect new resource reservation").

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>