28070 Commits

Author SHA1 Message Date
João Paulo Gonçalves
ff0540fcfe board: toradex: add Toradex SMARC iMX95
Add support for the Toradex SMARC iMX95.

Link: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx95
Link: https://www.toradex.com/products/carrier-board/smarc-development-board-kit
Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
Co-developed-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Co-developed-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Co-developed-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
2025-10-30 12:39:57 -03:00
Tom Rini
b901d8f15c x86: Rename arch/x86/include/asm/pnp_def.h to include/pnp_def.h
There is nothing x86-centric in this include file, and moving it will
allow for some drivers to be compile-tested on sandbox.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-28 12:24:03 -06:00
Tom Rini
9465ca3d45 mtd: Add function prototype for mtd_read_oob_bf(...)
The function mtd_read_oob_bf is called by cmd/nand.c but does not have a
prototype in any header. Add this to include/linux/mtd/mtd.h as that is
the most logical place currently.

Fixes: 1fac57720719 ("nand: Add a watch command")
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-28 12:19:04 -06:00
Tom Rini
e15dd01422 clk: Add missing <dm/device.h> to include/clk.h
In this header we make direct references to some dm/device.h functions
while not including the header directly. Add the missing include.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-28 12:12:20 -06:00
Wolfgang Wallner
4661eb33a4 bootm: Fix typo in bootm.h
Fix a typo in include/bootm.h.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2025-10-26 09:03:32 -06:00
Wolfgang Wallner
e9386ec1d7 image: Fix typos in image.h
Fix some typos in include/image.h.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2025-10-26 09:03:30 -06:00
Peng Fan
ac9b02dd10 firmware: scmi: Add i.MX95 SCMI CPU Protocol
This protocol allows an agent to start, stop a CPU or set reset vector.
It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an
AP cluster).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2025-10-24 13:47:50 -06:00
Peng Fan
3f20ea3675 firmware: scmi: Add i.MX95 SCMI LMM protocol driver
Add Logical Machine Management(LMM) protocol which is intended for boot,
shutdown, and reset of other logical machines (LM). It is usually used to
allow one LM to manager another used as an offload or accelerator engine.

Following Linux Kernel, created a separate folder for holding vendor
protocol drivers.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2025-10-24 13:47:50 -06:00
Peng Fan
7830ccc77a firmware: scmi: Support probe vendor ID 0x80 and 0x82
Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI
vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use
Kconfig option to support conditional compilation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2025-10-24 13:47:50 -06:00
Peng Fan
d1f1c98d84 firmware: scmi: Cleanup the SCMI MISC ID
SCMI_IMX_PROTOCOL_ID_MISC was never used, so drop it. And move
SCMI_PROTOCOL_ID_IMX_MISC out of enum scmi_std_protocol to
scmi_nxp_protocols.h, because it is i.MX specific and following Linux
Kernel style, use macro definition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2025-10-24 13:47:50 -06:00
Peng Fan
251dd6bf0e firmware: scmi: Conditionally compile protocol support
Add conditional compilation for SCMI protocol support in scmi_get_protocol()
and scmi_add_protocol() based on corresponding Kconfig options. This ensures
that only the enabled protocols are compiled and accessed, and reducing binary
size.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
2025-10-24 13:47:50 -06:00
Benjamin Hahn
fae6c54d23 bootstd: make it possible to use tftp for netboot with standardboot
Add the option to load the bootscript with the tftp command (static IP)
instead of the dhcp command (dynamic IP). For this a new function
tftpb_run similar to dhcp_run, is needed. The selection of which command
to use can be done with the ip_dyn environment variable, which can be
set to yes or no. The ip_dyn variable was chosen as it is already in use
on the imx platforms.
Also edit the bootstd doc.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
2025-10-24 13:47:50 -06:00
Simon Glass
4ce78089b2 boot: Implement a priority for global bootmeths
Allow bootmeths to select when they want to run, using the bootdev
priority. Provide a new bootmeth_glob_allowed() function which checks if
a bootmeth is ready to use.

Fix a comment in bootflow_system() which is a test for global bootmeths.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-22 14:16:56 -06:00
Simon Glass
8e31093dbc boot: Support rescanning the global bootmeths
Add the logic to scan through the global bootmeths for every new
bootdev, in preparation for allowing global bootmeths to select where in
the hunter ordering they go.

Use a new bootmeth_glob_allowed() function to check if a bootmeth is
allowed, ensuring that each can run at most once.

For now this has no actual effect, since the global bootmeths are
unconditionally processed at the start, with iter->methods_done being
updated to include all of them. Therefore when scanning again, no
unprocessed global bootmeths will be found.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-22 14:16:56 -06:00
Simon Glass
bef963cb75 boot: Keep track of which bootmeths have been used
Add a bitfield which tracks when bootmeths have been used. This will be
needed when global bootmeths can be used later in the iteration.

Fix a missing bootflow_free() while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-22 14:16:56 -06:00
Simon Glass
0fe6de0dc5 boot: Add a flag for whether there are global bootmeths
The current 'doing_global' refers to being in the state of processing
global bootmeths. Since global bootmeths are currently used once at the
start, it becomes false once the last global bootmeth has been used.

In preparation for allowing bootmeths to run at other points in the
bootstd interation, add a new 'have_global' flag which tracks whether
there are any global bootmeths in the method_order[] list. It is set up
when iteration starts. Unlike doing_global which resets back to false
after the global bootmeths have been handled, once have_global is set to
true, it remains true for the entire iteration process. This provides a
quick check as to whether global-bootmeth processing is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-22 14:16:56 -06:00
Anshul Dalal
16ffcff028 spl: split spl_board_fixups to arch/board specific
The current spl_board_fixups API allows for modification of spl_image
before the SPL jumps to it. This can be used to modify the DT for the
next boot stage, however the current API only allows either the machine
arch or the board to use it.

This limits the utility of the API as there might be certain fixups that
should be applied to all boards sharing the same machine architecture
with others being board specific.

For TI's K3 specifically, this prevents us from performing architecture
level fixups since a lot of TI boards are already making use of the
spl_board_fixups API.

Therefore this patch splits the API into two to allow both board and the
architecture specific fixups. The order is kept as arch then board to
give board specific fixups the precedence.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
2025-10-22 12:05:52 -06:00
Tom Rini
29a96acaa3 Merge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20251022

net:
- airoha: improvements
- Tighten a few more driver dependencies
- designware: fix bitbang init error
- phy: Make driver overloading get_phy_id depend on !COMPILE_TEST
- phy: add paged PHY register accessors
- make dhcp_run() common for NET and NET_LWIP
- dwc_eth_ops: Correct check for FDT_64BIT
- mediatek: mt7988: various fixup + MDIO detach
- phy: aquantia: switch to use phy_get_ofnode(), fix bindings typo

net-legacy:
- bootp: Prevent buffer overflow to avoid leaking the RAM content
- tftp: make TFTP ports unconditionally configurable

misc:
- uthreads: Make use of CONFIG_IS_ENABLED consistently
2025-10-22 09:07:56 -06:00
Tom Rini
b21ba014a9 First set of u-boot-at91 features for the 2026.01 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFNBAABCgA3FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmj3VvoZHGV1Z2VuLmhy
 aXN0ZXZAbGluYXJvLm9yZwAKCRAesx4CDqwvyJOHCACkwHQb0AoreLp8zyyrd/HN
 Y0vpClAlu5Bj9Rgj1h8hL3lyVgwrhF5bswJbfXzjHkaWz7skjJLEkC+CVgQosR5f
 A+hAk6BKyn1BWz1f8QJ/GKVJqKBpKSTr0Xl1le8kp70gjXT3R0gXQPychNNIKGuA
 eywydwKDlCJZYbMjG1jKD/qpjAaD44dhajIoeORC22sWY5Z2ioTSaVjz4d8LJF7T
 eKt75qUTmacRMNAmTHaUagqMN7+niN8y2/5krIowW9NkW+Ha+GrtvPjTGTbwX1Aw
 UYCp5euFT4LiZoUK9XzG3cgmBPrPNMdHTGHkTk1Nv0TJHX5ENp9wg+lBtHCL/Sjp
 =KeQh
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2026.01-a' of https://source.denx.de/u-boot/custodians/u-boot-at91

First set of u-boot-at91 features for the 2026.01 cycle:

This small fixes set includes a change on clocks register value and a
fix for the sam9x60ek default timer.
2025-10-22 09:06:11 -06:00
Lucien.Jheng
34369d34e4 net: phy: add paged PHY register accessors
Synchronize paged PHY helpers with Linux v6.17.

Add support for PHY devices that use paged register access by
implementing the following functions:
- phy_save_page(): Save current page number
- phy_select_page(): Switch to a specific page and return previous page
- phy_restore_page(): Restore previously saved page

Also adds read_page and write_page callbacks to the phy_driver
structure to enable driver-specific page handling.

These helpers allow safe access to paged PHY registers by ensuring
proper page selection and restoration,
even in error conditions, which will be used by the Airoha PHY driver.

Signed-off-by: Lucien.Jheng <lucienzx159@gmail.com>
2025-10-22 14:28:33 +02:00
Jerome Forissier
4b8e785851 net: make dhcp_run() common for NET and NET_LWIP
There are currently two implementations of dhcp_run(): one in cmd/net.c
for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no
justification for that. Therefore, move the NET version into
net/net-common.c to be used by both stacks, and drop the NET_LWIP
version which by the way does not look totally correct.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Tom Rini <trini@konsulko.com>
Acked-by: Benjamin Hahn <B.Hahn@phytec.de>
2025-10-22 14:28:33 +02:00
Tom Rini
efe1d6303f uthreads: Make use of CONFIG_IS_ENABLED consistently
We do not yet support UTHREADS in xPL phases. However, we have the need
to dummy out certain functions so that xPL can build when full U-Boot
has UTHREADS enabled. Update the few places that need to use
CONFIG_IS_ENABLED so that we have the correct dummy in xPL.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-10-22 11:09:24 +02:00
Anshul Dalal
b1a3ed0688 spl: make args file optional in falcon mode
Falcon mode loads a kernel file and an args file which is the
device-tree. However in the case of kernel file being a FIT that
contains the device-tree within it, loading the args file is not
required.

Therefore, this patch introduces a new SPL_OS_BOOT_ARGS config options
that allows us to enable or disable loading of the args file in falcon
mode.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-10-20 11:54:29 -06:00
Manikandan Muralidharan
7885969610 clk: at91: remove default values for PMC_PLL_ACR
Remove default values for PMC PLL Analog Control Register(ACR) as the
values are specific for each SoC and PLL, so load them from PLL
characteristics structure

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
2025-10-17 12:33:46 +03:00
Mikhail Kshevetskiy
40f57b571c arm/airoha: an7581 ignores CFG_MAX_MEM_MAPPED value
This partly fix commit 726404a66c773 ("airoha: rework RAM size handling
to support multiple RAM size")

The function get_effective_memsize() do not see non-global defines
of CFG_MAX_MEM_MAPPED, so the effective memory size will not be changed.

Fix the issue by putting definition of CFG_MAX_MEM_MAPPED to the proper
place.

Fixes: 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-10-15 15:08:27 -06:00
Simon Glass
f6cd0a36ce boot: Improve comments related to global bootmeths
Add a few comments about global bootmeths and first_glob_method

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2025-10-14 16:12:50 -06:00
Tom Rini
b1cc9a53d7 AMD/Xilinx/FPGA changes for v2026.01-rc1 v2
zynqmp:
 - DT updates
 - Enable new commands
 
 mbv:
 - Simplify defconfigs
 
 clk:
 - Separate legacy handler and use SMC handler
 
 misc:
 - Tighten TTC Kconfig dependency
 
 net:
 - Add 10GBE support to Gem
 
 pwm:
 - cadence-ttc: Fix array sizes
 
 fwu:
 - Add platform hook support
 
 spi:
 - Remove undocumented cdns,is-dma property
 
 video:
 - Fix DPSUB RGB handling
 -----BEGIN PGP SIGNATURE-----
 
 iHQEABYIAB0WIQSXAixArPbWpRanWW+rB/7wTvUR9QUCaO5Y1wAKCRCrB/7wTvUR
 9TOOAQD21dxtXKgMCRumd391bWvtXTIoUPZ4AVKstviJBolAKAD4p3Nmp0RBFR6L
 4LH+4e5bARtOFDGL5ExCxK57xU5lCg==
 =1Hkr
 -----END PGP SIGNATURE-----

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

AMD/Xilinx/FPGA changes for v2026.01-rc1 v2

zynqmp:
- DT updates
- Enable new commands

mbv:
- Simplify defconfigs

clk:
- Separate legacy handler and use SMC handler

misc:
- Tighten TTC Kconfig dependency

net:
- Add 10GBE support to Gem

pwm:
- cadence-ttc: Fix array sizes

fwu:
- Add platform hook support

spi:
- Remove undocumented cdns,is-dma property

video:
- Fix DPSUB RGB handling
2025-10-14 09:48:02 -06:00
Tom Rini
14d36cd8da TPM changes:
Make all drive names defined with U_BOOT_DRIVER unique
 
 TEE changes:
 Rework things such that sandbox will also traverse the optee directory
 when SANDBOX_TEE is enabled, but only build one of the optee-specific
 files when OPTEE is enabled.
 
 EFI changes:
 Up to now we were relying on the file extension to accept and load
 an image over HTTP. We expected images to be either .iso or .img.
 
 By wiring up internal existing functions we can try to mount any
 file extension and reject it only if mounting fails.
 part_driver_lookup_type
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEgWII69YpahbL5iK5gS8AYozs+qIFAmjt/7cACgkQgS8AYozs
 +qJjFhAAuiReQHpldIqw0zPkzW26zF4KRNKzkSqGiiAEJZthZcwRsdn1Xid9BhTh
 bd47K5OXoPdP9mLL8xmPSYbxnLPCSrrbeMZO/jIivqrvYdA4ub6Mobn8siCeq5+G
 ONvnVPjgcZ3LDywsoDXHqta6sMh0gTeH4h5qiUQiM7sNGYz1gdx+8zOfTOpcwk9U
 771CoO1o86HKc0+WPJYkTD86ymGEbDLpcaKiL46UCpuFLAwdJ3l/fJHXwLCuxjnj
 pPwJ5AOOFtQVdKF32lQQdywoJvNKcrRdAgWFLUGNizRERQ6qZK1ov8IMpyRHZFpE
 FvVUF+2l8hFTYCbEKBC/RMlOeHp5ceE+GcVXYjmUIxqMRp7SldqQ3/WANkTKuvcb
 fIjYRAFwcqwHG7AuObD/ew+XMwjnNHDKvpuLxkKgj1wX0xmNcX97QmmKz2sPCS/D
 ZFEcI9bCkfyhcIGs0WBfZpQTIABrStblSQxG1XK7aYMmnJdzLFo6vXINAa+MFU6e
 rA4Pu+OmLyO6rdTuj0HRlXX832nvyVUkyY2d3CyEpcpat2IWwvVJWgCePW2wZo3E
 NawhpOuqLnehzhuRG3/5LeMsGLegQq7ak0/zV6egsl6Is08cKJIvzq7qndxJ/8Ez
 Ox2sKE3B2crhx3UTs+5XnBF8H8WRKCZW+/D0LSd5knMzo3UwPMo=
 =6iJS
 -----END PGP SIGNATURE-----

Merge tag 'mix-next-14102025' of https://source.denx.de/u-boot/custodians/u-boot-tpm

TPM changes:
Make all drive names defined with U_BOOT_DRIVER unique

TEE changes:
Rework things such that sandbox will also traverse the optee directory
when SANDBOX_TEE is enabled, but only build one of the optee-specific
files when OPTEE is enabled.

EFI changes:
Up to now we were relying on the file extension to accept and load
an image over HTTP. We expected images to be either .iso or .img.

By wiring up internal existing functions we can try to mount any
file extension and reject it only if mounting fails.
part_driver_lookup_type
2025-10-14 08:27:01 -06:00
Javier Tia
28c341ca07 part: Export part_driver_lookup_type for external use
Make part_driver_lookup_type non-static so it can be used outside
part.c. This allows external callers to determine the appropriate
partition driver for a block device, enabling more flexible handling of
partition types.

Add a prototype and kernel-doc comment in part.h to document the
function contract. Provide a stub inline implementation returning NULL
when partition support is disabled, ensuring build consistency across
configurations.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-10-14 10:29:30 +03:00
Tom Rini
ec90518ee6 spl: FIT: Make SPL_LOAD_FIT_FULL depend on SPL_LOAD_FIT
Today, only a few platforms enable SPL_LOAD_FIT_FULL, and all enable
SPL_LOAD_FIT. As can be seen in usage, the FULL symbol is a superset of
the first symbol, not an alternative. Update Kconfig entries based on
this and simplify the only code which checks for either being set.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-13 14:54:32 -06:00
Tom Rini
a073d3d37c Merge patch series "am65-cpsw-nuss phy_interface_t fixup for fixed TX delay"
Matthias Schiffer <matthias.schiffer@ew.tq-group.com> says:

Following a discussion on the LKML [1], there has been a clarification
of the correct use of the rgmii(/-rxid/-txid/-it) phy-modes [2] - namely,
that they don't describe the interface at the MAC or PHY boundary, but
whether the PCB traces add delays or not (where it is
implementation-defined whether the delays are added on the MAC or PHY
side in the latter case).

Accordingly, a fixup has been implemented in the am65-cpsw-nuss driver
to make it follow the clarified rules [3]; apply the same change to
U-Boot. Backwards compatibility is preserved: using an old DTB with
the wrong phy-mode only results in a warning message, but keeps the
Ethernet working. With a new DTB from Linux 6.17+ that sets the mode to
rgmii-id, these changes are necessary to avoid using an unsupported/
reserved configuration. See the commit message of patch 2/2 for some
additional detail.

[1] https://lore.kernel.org/lkml/d25b1447-c28b-4998-b238-92672434dc28@lunn.ch/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c360eb0c3ccb95306704fd221442283ee82f1f58
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca13b249f291f4920466638d1adbfb3f9c8db6e9

Link: https://lore.kernel.org/r/cover.1759218200.git.matthias.schiffer@ew.tq-group.com
2025-10-10 11:07:44 -06:00
Matthias Schiffer
8db554dcbb net: mdio-uclass: introduce dm_eth_phy_connect_interface()
dm_eth_phy_connect_interface() is a variant of dm_eth_phy_connect() that
allows to set the used PHY mode, in case the MAC driver needs to fix it
up. The previously static dm_eth_connect_phy_handle() is renamed and
extended for this purpose.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2025-10-10 11:07:44 -06:00
Tom Rini
8ea8487da0 include: completion.h: Convert the rest of the dummy functions to macros
While we declare some of our dummy functions as "inline" we do not also
declare them as "static" and so it is possible for the compiler to
decide to make these as global functions instead. This can lead to link
time failures in some cases, such as "allyesconfig". As these are just
dummy functions, convert them to a macro instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-10 10:26:47 -06:00
Tom Rini
361731fc39 Merge branch 'uboot-05102025' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
This series adds significant and valuable work by Mikhail Kshevetskiy to
align spi-mem with Linux 6.16. It also includes contributions to the mtd
performance patches, a work started by Miquel Raynal and improved by
Mikhail Kshevetskiy. Additionally, two patches tighten dependencies on
the Atmel driver.

The patches pass the pipeline CI:
https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/27873
2025-10-10 08:24:45 -06:00
Tom Rini
ecdc3872a7 Merge patch series "firmware: scmi: various update"
Peng Fan (OSS) <peng.fan@oss.nxp.com> says:

Misc update on firmware scmi:
 - Typo fix
 - Use io helpers
 - Use PAGE_SIZE for arm64
 - Add IN_USE error code
 - Add more error info
 - Support scmi max rx timeout in mailbox
 - Add myself as scmi maintainer, AKASHI contributed most code, but
   seems he is not invovled in the developement anymore, I volunteer to
   help here.

Some items on list that I am thinking to add:
- align with linux kernel to use cpu_to_le32 and le32_to_cpu, but have not find
  a good way to use the helpers.
- Add SCMI version negotiation as Linux Kernel

Link: https://lore.kernel.org/r/20250927-scmi-v1-0-5e9354fb3bff@nxp.com
2025-10-09 14:30:02 -06:00
Peng Fan
eb7469eb1a firmware: scmi: Add error code IN_USE
In SCMI spec 3.2, there is an update:
Add IN_USE error code for usage with Pin control protocol

So add the error decoding for IN_USE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-10-09 14:16:11 -06:00
Marek Vasut
8aa57934e5 fw_loader: Split from fs_loader into separate library file
The script based firmware loader does not use anything from the
fs_loader implementation. Separate it into its own library source
file and convert the mediatek PHY to use this separate code. This
should reduce the amount of code that is pulled in alongside the
firmware loader, as the FS loader is no longer included.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-10-09 13:50:40 -06:00
Tom Rini
a1fd7a9589 Merge tag 'u-boot-imx-master-20251009' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27872

- Several improvements for kontron-sl-mx8mm.
- Add rauc to bootmeths to phycore_imx8mp.
- Fix imx93_frdm USB vendor ID.
2025-10-09 13:47:28 -06:00
Padmarao Begari
aa4e7f7083 FWU: Add platform hook support for fwu metata
FWU metadata information is unavailable for platform-specific
operations since FWU initialization has not yet occurred.
The initialization function is invoked as part of the main
loop event. To address this, the FWU platform hook function
is introduced during FWU initialization, allowing metadata
processing with platform-specific operations.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250912100539.4127378-2-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-10-09 09:07:04 +02:00
Naman Trivedi
4146a31dce drivers: firmware: update xilinx_pm_request to support max payload
Currently xilinx_pm_request API supports four u32 payloads. However the
legacy SMC format supports five u32 request payloads and extended SMC
format supports six u32 request payloads. Add support for the same in
xilinx_pm_request API. Also add two dummy arguments to all the callers
of xilinx_pm_request.

The TF-A always fills seven u32 return payload so add support
for the same in xilinx_pm_request API.

Signed-off-by: Naman Trivedi <naman.trivedimanojbhai@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Acked-by: Senthil Nathan Thangaraj <senthilnathan.thangaraj@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/5ae6b560741f3ca8b89059c4ebb87acf75b4718e.1756388537.git.michal.simek@amd.com
2025-10-09 09:07:03 +02:00
Yegor Yefremov
f03601e369 arm: baltos: remove obsolete GPMC_NAND_ECC_LP_x8_LAYOUT macro
This define is obsolete, and bus width is now handled via
CONFIG_SYS_NAND_BUSWIDTH_16BIT option.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-10-08 16:12:53 -06:00
Marek Vasut
0ee639ff5a thermal: Convert .get_temp() return value to millicelsius
Linux kernel .get_temp() callback reports values in millicelsius,
U-Boot currently reports them in celsius. Align the two and report
in millicelsius. Update drivers accordingly. Update callsites that
use thermal_get_temp() as well.

The 'temperature' command now reports temperature in millicelsius
as well, with additional accuracy. This changes command line ABI
slightly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: David Zang <davidzangcs@gmail.com>
[trini: Update test/cmd/temperature.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-10-08 13:54:59 -06:00
Marek Vasut
863502de82 misc: fs_loader: Use buffer pointer in request_firmware_into_buf_via_script()
Use plain buffer pointer in request_firmware_into_buf_via_script()
instead of a pointer to pointer. The later is not necessary as the
request_firmware_into_buf_via_script() does not modify the buffer
pointer. Update the mediatek driver to match.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
2025-10-07 17:12:24 -06:00
Frieder Schrempf
16ead099eb imx: kontron-sl-mx8mm: Enable standard boot and disable legacy distro boot
The bootstd framework is the new way to support various bootflows
and media. Use it instead of legacy distro boot.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-10-07 08:58:28 -03:00
Mikhail Kshevetskiy
2cbdd3e449 mtd: spinand: Sync core code and device support with Linux 6.17-rc1
This makes the U-Boot SPI NAND driver almost the same as in Linux
6.17-rc1. The only major differences are:
 * support of ECC engines. The Linux driver supports different ECC
   engines while U-Boot uses on-die ECC only.
 * per operation maximum SPI bus frequency

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:30 +02:00
Miquel Raynal
1e103284a5 mtd: spinand: Add a ->configure_chip() hook
There is already a manufacturer hook, which is manufacturer specific but
not chip specific. We no longer have access to the actual NAND identity
at this stage so let's add a per-chip configuration hook to align the
chip configuration (if any) with the core's setting.

This is a port of linux commit
da55809ebb45 ("mtd: spinand: Add a ->configure_chip() hook")

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> # U-Boot port
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:27 +02:00
Mikhail Kshevetskiy
ccc6b42adc mtd: spinand: Enhance the logic when picking a variant
Currently the best variant picked in the first one in the list provided
in the manufacturer driver. This worked well while all operations where
performed at the same speed, but with the introduction of DTR transfers
this no longer works correctly.

Let's continue iterating over all the alternatives, even if we find a
match, keeping a reference over the theoretically fastest
operation. Only at the end we can tell which variant is the best.

This logic happening only once at boot.

The patch is based on linux commit
666c299be696 (mtd: spinand: Enhance the logic when picking a variant)
created by Miquel Raynal <miquel.raynal@bootlin.com>

The code was a bit restricted in the functionality since not all
required functionality is supported in the u-boot.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:22 +02:00
Mikhail Kshevetskiy
37f0fc45f5 mtd: spinand: add OTP support
The code was ported from linux-6.15

based on a linux commit c06b1f753bea (mtd: spinand: add OTP support)
created by Martin Kurbanov <mmkurbanov@salutedevices.com>

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:19 +02:00
Cheng Ming Lin
49b855662f mtd: spinand: Add read retry support
When the host ECC fails to correct the data error of NAND device,
there's a special read for data recovery method which can be setup
by the host for the next read. There are several retry levels that
can be attempted until the lost data is recovered or definitely
assumed lost.

This is the port of linux commit
f2cb43c98010 (mtd: spinand: Add read retry support)

Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> # U-Boot port
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:17 +02:00
Mikhail Kshevetskiy
90772e4503 mtd: spinand: add support of continuous reading mode
The code was ported from linux-6.12. The original continuous reading
support was implemented by Miquel Raynal <miquel.raynal@bootlin.com>
in linux commit 631cfdd0520d (mtd: spi-nand: Add continuous read support).

Here is an original patch description:
--------------------------------------
A regular page read consist in:
- Asking one page of content from the NAND array to be loaded in the
  chip's SRAM,
- Waiting for the operation to be done,
- Retrieving the data (I/O phase) from the chip's SRAM.

When reading several sequential pages, the above operation is repeated
over and over. There is however a way to optimize these accesses, by
enabling continuous reads. The feature requires the NAND chip to have a
second internal SRAM area plus a bit of additional internal logic to
trigger another internal transfer between the NAND array and the second
SRAM area while the I/O phase is ongoing. Once the first I/O phase is
done, the host can continue reading more data, continuously, as the chip
will automatically switch to the second SRAM content (which has already
been loaded) and in turns trigger the next load into the first SRAM area
again.

From an instruction perspective, the command op-codes are different, but
the same cycles are required. The only difference is that after a
continuous read (which is stopped by a CS deassert), the host must
observe a delay of tRST. However, because there is no guarantee in Linux
regarding the actual state of the CS pin after a transfer (in order to
speed-up the next transfer if targeting the same device), it was
necessary to manually end the continuous read with a configuration
register write operation.

Continuous reads have two main drawbacks:
* They only work on full pages (column address ignored)
* Only the main data area is pulled, out-of-band bytes are not
  accessible. Said otherwise, the feature can only be useful with on-die
  ECC engines.

Performance wise, measures have been performed on a Zynq platform using
Macronix SPI-NAND controller with a Macronix chip (based on the
flash_speed tool modified for testing sequential reads):
- 1-1-1 mode: performances improved from +3% (2-pages) up to +10% after
              a dozen pages.
- 1-1-4 mode: performances improved from +15% (2-pages) up to +40% after
              a dozen pages.

This series is based on a previous work from Macronix engineer Jaime
Liao.
--------------------------------------

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2025-10-05 20:26:15 +02:00