Commit Graph
105982 Commits
Author SHA1 Message Date
Tom Rini 69491eb60a Merge patch series "allow control DTB to double as "FIT image""
Rasmus Villemoes <rv@rasmusvillemoes.dk> says:

The commit message for patch 1 explains what it is I'd like to be able
to do, but here's some more background:

For a long time, we've embedded the boot script in the U-Boot binary
by building a bootscript.itb, and using a .dtsi like

  / {
          config {
                 bootscript = /incbin/("/path/to/bootscript.itb");
          };
  };

which in turn is mentioned in CONFIG_DEVICE_TREE_INCLUDES, that
bootscript.itb FIT image has been embedded in U-Boot's control
dtb. Running that was then a matter of doing

  fdt addr ${fdtcontroladdr} && fdt get addr bsaddr /config bootscript && source ${bsaddr}

There are a couple of advantage of having the bootscript (and other
script logic) embedded in the U-Boot binary. First, there's no need to
figure out some separate partition to store the script in, and making
sure that gets updated whenever the bootloader itself does. Second,
one doesn't need to worry about verifying the script; whatever steps
one needs to take to implement secure boot for U-Boot itself will by
necessity also cover the control dtb (if nothing else then because
that's where the public key for the kernel verification lives). And
third, the boot script is automatically updated together with U-Boot
itself; and if U-Boot is stored in an eMMC boot partition, that update
is guaranteed to be atomic.

Now with the stricter requirements of libfdt starting from v2026.04,
the above command no longer worked, or only half the time, because the
embedded FIT image may not land on an 8-byte aligned address. So that
line had to be changed a little (line breaks added)

  fdt addr ${fdtcontroladdr}
    && fdt get addr bsaddr /config bootscript
    && fdt get size bssize /config bootscript
    && cp.b ${bsaddr} ${loadaddr} ${bssize}
    && source ${loadaddr}

which is getting quite unwieldy.

Then it struck me that one could perhaps simplify all of this quite a
lot: Cut out the intermediate bootscript.itb, just create a .dtsi
which directly puts a /images node inside the control dtb

/ {
  	images {
		default = "bootscript";
		bootscript {
			description = "Boot script";
			data = /incbin/("/path/to/bootscript.sh");
			type = "script";
			compression = "none";
		};
	};
};

and treat the control dtb itself as a FIT image; so the command to put
in $bootcmd becomes simply

  source ${fdtcontroladdr}:bootscript

and embedding other pieces of callable scripts is quite trivial.

And that almost works out-of-the-box, except for the fit_check_format() sanity check.

Introduce a CONFIG_ knob that allows one to opt out of those sanity
checks, for the special case of the address being checked being
identical to gd->fdt_blob.

Link: https://lore.kernel.org/r/20260602213013.558064-1-rv@rasmusvillemoes.dk
2026-06-11 07:56:52 -06:00
Rasmus VillemoesandTom Rini c8a636af67 test: hook up test of allowing control DTB to act as FIT image
Add a test demonstrating how one can embed various scripts in the
control DTB.

Verify that the source command can be used with ${fdtcontroladdr} by
itself (invoking the default script), and with :<node-name>
suffix. Check that the scripts themselves can invoke "sibling"
scripts. Also verify that without CONTROL_DTB_AS_FIT set, the control
DTB is not accepted by the source command.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
2026-06-11 07:56:45 -06:00
Rasmus VillemoesandTom Rini a6369b8bb2 doc: develop: add section on embedding scripts inside control DTB
Add a section that explains how one can embed scripts in the control
DTB and run them from the U-Boot shell, the advantages of doing that
compared to using a separately built FIT image, and the configuration
knob that must be turned on to allow this to work.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
2026-06-11 07:56:45 -06:00
Rasmus VillemoesandTom Rini 7779540f09 image-fit.c: introduce CONTROL_DTB_AS_FIT config knob
Having scripts embedded one way or the other in the U-Boot binary
means they are automatically verified/trusted by whatever mechanism
verifies U-Boot.

Writing those scripts in the built-in environment leads to
backslatitis and missing or wrong quoting and is generally not very
readable or maintainable.

Maintaining scripts in external files allows one
to have both syntax highlighting and to some extent apply shellcheck
on it (though U-Boot's shell is of course not quite POSIX sh, so some
'#shellcheck disable' directives are needed). Getting those into the
U-Boot binary is then a matter of having a suitable .dtsi file such as

/ {
	images {
		default = "boot";
		boot {
			description = "Bootscript";
			data = /incbin/("boot.sh");
			type = "script";
			compression = "none";
		};
		factory-reset {
			description = "Script for performing factory reset";
			data = /incbin/("factory-reset.sh");
			type = "script";
			compression = "none";
		};
	};
};

and making that part of CONFIG_DEVICE_TREE_INCLUDES, so that U-Boot's
control DTB effectively doubles as a FIT image containing a few
"script" entries. At run-time, one's default bootcommand can then
simply be

  source ${fdtcontroladdr}:boot

Except of course that the control DTB is in fact not quite a FIT
image. The lack of timestamp and description properties could
potentially be worked around (by just adding those via that same
.dtsi), but the no-@ check is not possible to get around. But since
the control dtb is by definition trusted, we can make an exception for
that particular address, if the new CONTROL_DTB_AS_FIT config option
is enabled.

One can of course build an ordinary FIT image with those
scripts. However, that requires extra steps in the boot command for
loading that script from storage, requires one to use "configurations"
for pointing at a single script to run, and signing the FIT image
using the same key used for verifying the kernel. Moreover, in certain
situations, such as bootstrapping/production, there is no place to
load that FIT image from, and it is much simpler to just have the
necessary scripts be part of the U-Boot image itself.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
2026-06-11 07:56:45 -06:00
Tom Rini d5dd2ebb5a Merge tag 'mediatek-for-next-2026-06-10' of https://source.denx.de/u-boot/custodians/u-boot-mediatek into next
* Network support for Genio 520/720.
 * Order drivers/net Makefile and Kconfig.
 * Refactor some common Airoha net/phy functions to a new common file.
 * Add new AN8801 chip support.
 * Add board-specific devicetree and config.
* Use scnprintf() instead of snprintf() in mtk pinctrl.
* Align configs for Genio EVK boards.
2026-06-11 07:56:19 -06:00
Tom Rini 3bd1868354 Merge patch series "This series introduces initial U-Boot support for mach-axiado AX3005 SCM3005 board, a quad-core ARM Cortex-A53 (ARMv8/ARM64) platform."
Siu Ming Tong <smtong@axiado.com> says:

Patch 1 adds the device tree files: an SoC-level DTSI describing
GIC-v3, Cadence/Zynq UART, a fixed reference clock, and spin-table
secondary CPU boot, plus a board-level DTS setting the console to
uart3 at 115200 baud with 2 GB DRAM at 0x80000000.

Patch 2 adds mach-axiado to support Axiado SoC-based boards, Kconfig
plumbing (AXIADO_AX3005 and TARGET_SCM3005), defconfig, board source
with ft_board_setup() and a MAINTAINERS entry.

Tested on SCM3005 EVK hardware

Link: https://lore.kernel.org/r/20260527-review-v2-0-10daefddf47d@axiado.com
2026-06-11 07:51:13 -06:00
Marek VasutandTom Rini 53305a02a7 MAINTAINERS: Replace ASpeed with N:
Use N: to match on all aspeed/ast2500 files, drop the large list of
entries which represent the same set of relevant files and miss a
few in the process.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2026-06-11 07:51:11 -06:00
Siu Ming TongandTom Rini 3f18211626 grm: axiado: Add AX3005 based SCM3005 board support
Introduce mach-axiado to support Axiado SoC-based boards. This adds
the platform Kconfig and build infrastructure, along with initial
SCM3005 board support using the AX3005 SoC.

Introduces AXIADO_AX3005, which selects ARM64, driver
model, GIC-v3, and Zynq UART. TARGET_SCM3005 selects ARCH_AXIADO,
allowing future SoC variants to share the platform configuration.
Secondary cores use spin-table boot. ft_board_setup() corrects
the cpu-release-addr in the FDT, which arch_fixup_fdt() overwrites
with the post-relocation address.
Add U-Boot board support for the Axiado AX3005 based targets, a quad-core
ARM Cortex-A53 (ARMv8) platform.

Tested-by: Siu Ming Tong <smtong@axiado.com>
Signed-off-by: Karthikeyan Mitran <kmitran@axiado.com>
Signed-off-by: Siu Ming Tong <smtong@axiado.com>
2026-06-10 14:52:25 -06:00
Siu Ming TongandTom Rini 7a06f03e57 arm64: dts: axiado: Add AX3005 SCM3005 device tree
Add device tree source files for the Axiado AX3005 SCM3005 board.
The AX3005 is a quad-core 64-bit ARMv8 Cortex-A53 SoC.

The DTSI describes the SoC-level nodes: GIC-v3 interrupt controller,
Cadence/Zynq UART, fixed reference clock, and spin-table secondary
CPU boot.  A /memreserve/ directive protects the spin-table release
address at 0x80002fa0 from being overwritten during boot.

The SCM3005 DTS sets the console to uart3 at 115200 baud and declares
2 GB of DRAM starting at 0x80000000.

Tested-by: Siu Ming Tong <smtong@axiado.com>
Signed-off-by: Karthikeyan Mitran <kmitran@axiado.com>
Signed-off-by: Siu Ming Tong <smtong@axiado.com>
2026-06-10 14:52:25 -06:00
Torsten DuweandTom Rini 4e249b94af clk: enhance clk-gpio to also handle gated-fixed-clock
Devicetree commit a198185b9b5 introduced a new type of clock,
"gated-fixed-clock", for which Das U-Boot does not have
a driver yet. The required code is similar to gpio-gate-clock,
and can be added using little extra text space.

Use this code e.g. to boot a Rock5 ITX from NVMe

Signed-off-by: Torsten Duwe <duwe@lst.de>
2026-06-10 14:50:00 -06:00
Emanuele GhidoliandTom Rini e65a87e959 serial: lpuart: Fix RX FIFO Enable bitmask
The Receive FIFO Enable (RXFE) field in the LPUART FIFO register is
bit 3 on all supported architectures. The define has been wrong since
it was introduced: for non-i.MX8/i.MXRT it set bit 6, which on LS102xA
is read-only-as-zero, so the bug went unnoticed.

NXP confirmed bit 3 is correct everywhere, so drop the ARCH-based
selection.

Link: https://github.com/nxp-imx/uboot-imx/commit/9498bcc514737269bb0ca436f775460741ab8199
Link: https://lore.kernel.org/u-boot/dc163ea7-9063-4dfb-a39a-e643c0bcccf1@oss.nxp.com/
Fixes: 6209e14cb0 ("serial: lpuart: add 32-bit registers lpuart support")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2026-06-10 14:49:55 -06:00
Aristo ChenandTom Rini 6c636eabbd treewide: prefer __func__ over __FUNCTION__ and __PRETTY_FUNCTION__
__FUNCTION__ and __PRETTY_FUNCTION__ are gcc extensions that predate
the C99 __func__ identifier. scripts/checkpatch.pl emits a warning
for any new use of __FUNCTION__ and recommends __func__ instead. In
C (unlike C++) __PRETTY_FUNCTION__ is identical to __func__ because
C function names do not carry signature information, so the
distinction has no behavioural effect here. The majority of the tree
already uses __func__, but a handful of older files in arch/, board/,
boot/, drivers/, examples/ and include/ still carry the gcc spellings
(55 occurrences of __FUNCTION__ across 19 files plus one
__PRETTY_FUNCTION__ in drivers/usb/musb-new/omap2430.c). Convert
them all to the C99 form so the tree is consistent and new patches
in these areas do not have to follow an outdated local style.

Ten "Unnecessary ftrace-like logging - prefer using ftrace" warnings
remain on the printf("%s\n", __func__) and dbg("%s\n", __func__)
function-entry traces in drivers/net/rtl8169.c (behind DEBUG_RTL8169*
preprocessor guards) and drivers/usb/host/ohci-hcd.c. checkpatch
matches the literal "%s\n", __func__ shape regardless of the wrapper,
so silencing those warnings would require changing the debug message
text or removing the traces entirely.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-06-10 14:49:46 -06:00
Weijie GaoandTom Rini 1cc0442ede bootmenu: fix incorrect menu quitting logic
The last entry of bootmenu is always set for exiting the menu, and its
command is set to an empty string.

When user selects to quit the menu, bootmenu will try to run this empty
command. However run_command() with empty cmd string will return failure,
and the return value will be overridden to BOOTMENU_RET_FAIL, not the
expected BOOTMENU_RET_QUIT.

This patch adds a default success value to the cmd_ret variable, and makes
sure run_command() is called only when the menu command is not empty.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2026-06-10 14:49:43 -06:00
David Lechner f30d2dbedb configs/mt8365: enable bootstd, FIT and DT overlays
Enable options needed by the default board support package for Genio
350 EVK board that uses this config.

CONFIG_CMD_PART is selected by the new options, so is removed here since
it is now redundant.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260512-mtk-genio-defconfig-v2-3-bf4c30ef7f14@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:37:04 -05:00
David Lechner 10ae95703b configs/mt8195: enable bootstd, FIT and DT overlays
Enable options needed by the default board support package for Genio
1200 EVK board that uses this config.

CONFIG_CMD_PART is selected by the new options, so is removed here since
it is now redundant.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260512-mtk-genio-defconfig-v2-2-bf4c30ef7f14@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:37:04 -05:00
David Lechner b016f0bb46 configs/mt8188: enable bootstd, FIT and DT overlays
Enable options needed by the default board support package for Genio
510/700 EVK boards that use this config.

CONFIG_CMD_PART is selected by the new options, so is removed here since
it is now redundant.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260512-mtk-genio-defconfig-v2-1-bf4c30ef7f14@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:37:04 -05:00
David Lechner 2258b6419a pinctrl: mediatek: use scnprintf() instead of snprintf()
Replace snprintf() with scnprintf() in the MediaTek pinctrl driver.

snprintf() returns the number of characters that _would_ have been
written if the buffer were large enough, while scnprintf() returns the
number of characters actually written to the buffer. Since we use the
return value to advance the buffer pointer, we need to use scnprintf()
to have the correct pointer arithmetic.

Fixes: 76da7482cf ("pinctrl: mediatek: print bias info along with pinmux")
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260506-mtk-pinctrl-fix-scnprintf-v1-1-56b99d5809db@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:31:42 -05:00
Julien StephanandDavid Lechner b581ec125a configs: mt8189: Enable ethernet support
Enable configs needed to support ethernet on MT8189-based boards.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-9-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:26:56 -05:00
Julien StephanandDavid Lechner 6a0804c87e arm: dts: mt8189: Add ethernet support for Genio 520/720 boards
Add Ethernet support for MediaTek MT8189-based Genio 520 and Genio 720
development boards.

The ethernet interface is disabled by default in the SoC dtsi and
enabled in the board-specific configuration with proper PHY settings.

The ethernet related nodes are not part of current dt submission on the
kernel [1] and come from downstream u-boot. When switching to
OF_UPSTREAM we should add them back.

[1]: https://lore.kernel.org/all/20251203-add-mediatek-genio-520-720-evk-v1-3-df794b2a30ae@collabora.com/

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-8-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:25:21 -05:00
Julien StephanandDavid Lechner 44f7d5945b net: dwc_eth_qos: Add mediatek support
Synopsys DWC Ethernet QOS device support for MediaTek SoCs.
in particular this initial commit adds support for Genio 520/720 and
Genio 510/700 EVKs

Signed-off-by: fanyi zhang <fanyi.zhang@mediatek.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-7-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:25:21 -05:00
Julien StephanandDavid Lechner 227243b67e net: phy: Add airoha AN8801 ethernet phy driver
Add Airoha AN8801 Ethernet PHY driver (air_an8801.c).
Implement CL22/CL45 MDIO access, LED control, and RGMII delay
configuration. Provide probe, initialization, LED setup, and status
handling. Expose DTS properties for clock delays. Register driver with
PHY framework and trigger on startup.

Signed-off-by: Yanqing Wang <ot_yanqing.wang@mediatek.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Kevin-KW Huang <kevin-kw.huang@airoha.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-6-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:25:21 -05:00
Julien StephanandDavid Lechner 751af7d98f net: phy: air_phy_lib: Factorize BuckPBus register
In preparation of Airoha AN8801R PHY support, move the BuckPBus
register accessors and definitions, present in air_en8811h driver,
into the Airoha PHY shared code (air_phy_lib), so they will be usable
by the new driver without duplicating them.
Also, update air_en8811h driver to use the new function names.

Adapted from [1].

[1]: https://lore.kernel.org/all/20260326-add-airoha-an8801-support-v2-2-1a42d6b6050f@collabora.com/

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-5-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:25:21 -05:00
Julien StephanandDavid Lechner 2287b573df net: Fix alphabetical ordering in drivers/net/Kconfig
Reorder entries under DWC_ETH_QOS to maintain alphabetical sorting by
CONFIG_ names:
- Move CONFIG_DWC_ETH_QOS_QCOM before CONFIG_DWC_ETH_QOS_ROCKCHIP
- Move CONFIG_DWC_ETH_QOS_STARFIVE after CONFIG_DWC_ETH_QOS_ROCKCHIP

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-4-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:13:56 -05:00
Julien StephanandDavid Lechner 379e9ab2d0 net: Fix alphabetical ordering in drivers/net/Makefile
Reorder entries to maintain alphabetical sorting by CONFIG_ names:
- Move CONFIG_DWC_ETH_QOS_QCOM before CONFIG_DWC_ETH_QOS_ROCKCHIP
- Move CONFIG_DWC_ETH_XGMAC after CONFIG_DWC_ETH_QOS_STM32
- Move CONFIG_MDIO_GPIO_BITBANG before CONFIG_MDIO_IPQ4019
- Move airoha directory at the end

This ensures consistent alphabetical ordering throughout the Makefile.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-3-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:13:56 -05:00
Julien StephanandDavid Lechner 57b382e609 MAINTAINERS: add maintainer entry for air_en8811 driver
Add a new entry for drivers/net/phy/airoha/air_en8811.c  driver.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Tommy.Shih <tommy.shih@airoha.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-2-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:13:56 -05:00
Julien StephanandDavid Lechner 45eec051ce MAINTAINERS: remove trailing colons from section titles
For consistency, remove trailing colons for the three following
sections: ACPI, ALIST, and INTERCONNECT.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260429-add-ethernet-support-for-genio-520-720-v4-1-be54e17239b7@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
2026-06-10 15:13:56 -05:00
Tom Rini 953653936c Merge tag 'u-boot-marvell-next-20260610' of https://source.denx.de/u-boot/custodians/u-boot-marvell into next
CI: https://source.denx.de/u-boot/custodians/u-boot-marvell/-/pipelines/30414

u-boot-marvell changes 2026-06-10:
- arm: kirkwood: Remove unnecessary watchdog GPIO for ZyXEL NSA325 board (Tony)
- net: mvpp2: fix NULL pointer dereference in mvpp2_phy_connect (Vincent)
- mtd: nand: pxa3xx: Pass valid dev to dev_err() (Chris)
- arm: mvebu: db-xc3-24g4xg: Remove marvell, nand-keep-config (Chris)
- arm: mvebu: Add Allied Telesis x220 (Chris)
- board: Synology: legacy.c: Include asm/io.h (Phil)
- board: Synology: common: Fix typo in Makefile (Phil)
- serial: serial_octeon_bootcmd.c: use correct Kconfig symbol (Heinrich)
- arm: mvebu: Drop unnecessary BOARD_EARLY_INIT_F usage (Tom)
- pinctrl: armada-38x: Staticize and constify driver ops (Marek)
- arm: mach-mvebu: armada8k: cpuinfo and SAR (Vincent)
- board: freebox: add Nodebox 10G board support (Vincent)
- board: freebox: nbx10g: add emmcboot for dual-bank eMMC boot (Vincent)
- board: freebox: nbx10g: add device serial and MAC address initialization (Vincent)
- arm: dts: armada-8040-nbx: add U-Boot dtsi for conditional OP-TEE (Vincent)
- timer: orion: Use dev_remap_addr_index() (Peng)
2026-06-10 09:18:15 -06:00
Tom Rini 45cfba58db Merge tag 'fsl-qoriq-next-2026-06-09' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/30397

- Add JEDEC JC_42.4 thermal driver
- Add QorIQ/Layerscape TMU support
- Misc dts fix for fsl-lx2160a
- Misc i.MX9 SCMI updates
2026-06-10 09:17:16 -06:00
Peng FanandStefan Roese eab66c3a90 timer: orion: Use dev_remap_addr_index()
Use dev_remap_addr_index() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese 7e93129173 arm: dts: armada-8040-nbx: add U-Boot dtsi for conditional OP-TEE
Add armada-8040-nbx-u-boot.dtsi with the firmware/optee node guarded
by CONFIG_OPTEE. This allows U-Boot to probe the OP-TEE driver only
when OP-TEE support is enabled in the configuration.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese 35ae4491bf board: freebox: nbx10g: add device serial and MAC address initialization
Read device identification data from a dedicated eMMC region. This
provides:

- Unique device serial number for identification and tracking
- Factory-programmed MAC address for network interfaces
- Bundle information for device variant identification

The serial structure includes CRC32 validation to detect corruption.
On read failure or invalid data, sensible defaults are used to ensure
the system remains bootable.

The fbxserial command provides two subcommands:
- fbxserial show: Display serial info (default)
- fbxserial init: Initialize ethaddr from serial info

Use CONFIG_PREBOOT="fbxserial init" to automatically set MAC addresses
during boot. This approach avoids patching shared board code.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese 3db9d9abc1 board: freebox: nbx10g: add emmcboot for dual-bank eMMC boot
Add the emmcboot command as board-specific support for the Nodebox 10G.

This is a legacy boot format that has been in production on this board
for many years so it cannot change anymore. It implements a dual-bank
boot system for reliable firmware updates:

- Bank0: Stable/fallback boot image
- Bank1: Newer/test boot image with reboot tracking

The boot order depends on the nrboot counter stored in eMMC:
- Healthy state (counter < 4): Try Bank1 first, then Bank0
- Degraded state (counter >= 4): Try Bank0 first, then Bank1

Each bank stores an image tag with CRC32 validation. The counter uses
a bit-counting scheme for wear leveling and tracks consecutive failed
boots to trigger automatic fallback.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese 3457acc014 board: freebox: add Nodebox 10G board support
Add board support for the Freebox Nodebox 10G based on the Marvell
Armada 8040 SoC. This board features:

- Quad-core ARMv8 AP806 with dual CP110 companions
- eMMC storage via Xenon SDHCI controller
- 1G SGMII Ethernet on CP0 lane 5
- I2C buses for peripheral access
- NS16550 UART console at 115200 baud

The implementation includes:
- Device tree for the Nodebox 10G hardware
- Dedicated board directory (board/freebox/nbx10g/)
- Board-specific Kconfig and defconfig

The U-Boot comphy bindings (phy-type/phy-speed) differ from the
mainline Linux PHY framework bindings used by phy-mvebu-cp110-comphy,
so U-Boot and the kernel each have their own device tree.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese a721ac0da7 arm: mach-mvebu: armada8k: cpuinfo and SAR
Add CPU information display for Armada 8040 platforms.

The soc_info.c reads the AP806 Sample-At-Reset (SAR) register to
determine the PLL clock configuration and converts it to actual
CPU, DDR, and Fabric frequencies using the PLL frequency table.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Marek VasutandStefan Roese dd1084ed2e pinctrl: armada-38x: Staticize and constify driver ops
Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Tom RiniandStefan Roese 9b432691dc arm: mvebu: Drop unnecessary BOARD_EARLY_INIT_F usage
All of these platforms enable CONFIG_BOARD_EARLY_INIT_F and then have a
do-nothing board_early_init_f function. Change to not enabling the
option and so not needing an empty function.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
2026-06-10 11:23:26 +02:00
Heinrich SchuchardtandStefan Roese bd75c26240 serial: serial_octeon_bootcmd.c: use correct Kconfig symbol
CONFIG_SYS_IS_IN_ENV does not exist.
CONFIG_SYS_CONSOLE_IS_IN_ENV seems to be needed here.

Fixes: f1054661e5 ("serial: serial_octeon_bootcmd.c: Add PCI remote console support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Phil SutterandStefan Roese b2306246dd board: Synology: common: Fix typo in Makefile
Due to this, legacy.c was neither compiled nor linked into the binary
and thus booting legacy DS414 firmware failed. Missing atag setup led to
no console output (and probably stalled boot) after:

| Uncompressing Linux... done, booting the kernel.

Fixes: 9774462e34 ("arm: Disable ATAGs support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
2026-06-10 11:23:26 +02:00
Phil SutterandStefan Roese f64593af3d board: Synology: legacy.c: Include asm/io.h
Some boards building this source define CFG_SYS_TCLK as a term involving
readl() which is undefined otherwise.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2026-06-10 11:23:26 +02:00
Chris PackhamandStefan Roese 59e13ed8f6 arm: mvebu: Add Allied Telesis x220
Add the Allied Telesis x220 board. There are a number of other variants
with the same CPU block that are sold under some different brand names
but the x220 was first.

The x220 uses the AlleyCat3 switch chip with integrated ARMv7 CPU.
Because of this it is reliant on a binary blob for the DDR training. In
upstream u-boot this is replaced by an empty file.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Chris PackhamandStefan Roese c444ff30e1 arm: mvebu: db-xc3-24g4xg: Remove marvell, nand-keep-config
nand-keep-config is used to retain the NAND controller configuration
from an earlier boot stage. In U-Boot's case there isn't an earlier boot
stage so reconfiguring the NAND controller is required.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Chris PackhamandStefan Roese a9cc75a25e mtd: nand: pxa3xx: Pass valid dev to dev_err()
info->controller.active is not initialised so the dev_err() call ends up
dereferencing a null pointer causing a crash instead of outputting the
error. Add a dev member to struct pxa3xx_nand_info and use that instead
of info->controller.active->mtd.dev.

Fixes: 661c98121d ("mtd: nand: pxa3xx: Fix not calling dev_xxx with a device")
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Vincent JardinandStefan Roese 50b3c87e0e net: mvpp2: fix NULL pointer dereference in mvpp2_phy_connect
Fix two NULL pointer dereferences in mvpp2_phy_connect():

1. port->phy_dev->dev is used in dev_warn() but
   port->phy_dev is not assigned yet (assigned later at line below).

2. port->phy_dev->dev is used in dev_err() inside
   the "if (!phy_dev)" block, which means phy_dev is NULL.

Both cases would cause a crash if the PHY detection fails or returns
a generic PHY. Use the already available 'dev' parameter instead.

Fixes: 9db60ee470 ("net: mvpp2: Convert netdev_xxx to dev_xxx")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
2026-06-10 11:23:26 +02:00
Tony DinhandStefan Roese 001f7e5f4c arm: kirkwood: Remove unnecessary watchdog GPIO for ZyXEL NSA325 board
Watchdog was already disabled in board/zyxel/nsa325/kwbimage.cfg.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
2026-06-10 11:23:26 +02:00
Tom Rini 8ef5312bba Merge tag 'mmc-next-2026-06-10' of https://source.denx.de/u-boot/custodians/u-boot-mmc into next
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/30396

- Convert ofnode API to dev_read API for mmc/power
- Minor fix power on/off delay
- Correct mmc command help
2026-06-09 19:51:45 -06:00
Tom Rini 511bd63db9 Merge assorted patches to use device API to replace devfdt_ helpers
These assorted patch series from Peng Fan (OSS) <peng.fan@oss.nxp.com>
have the goal to remove the direct usage of devfdt_ APIs in drivers. The
device APIs supports both live device tree and flat DT backends,
avoiding direct dependency on devfdt_* helpers.
2026-06-09 16:00:11 -06:00
Peng FanandTom Rini 8d1d86ff58 ata: dwc_ahci: Use dev_read_addr_index()
Use dev_read_addr_index() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-09 16:00:11 -06:00
Peng FanandTom Rini ffbfe1cec3 ata: mtk_ahci: Use dev_remap_addr_index() and ofnode API
Use dev_remap_addr_index() instead of devfdt_remap_addr_index() to map the
controller registers, removing the dependency on FDT-specific helpers.

Replace the direct fdt_get_property() lookup combined with dev_of_offset()
by dev_read_prop().

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-09 16:00:11 -06:00
Peng FanandTom Rini ebb9ee6ef4 rng: rproc_rng200: Use dev_remap_addr()
Use dev_remap_addr() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

And only mapping sizeof(void *) is wrong, RNG_FIFO_COUNT_OFFSET(0x24) is
accessed in this driver. So dev_remap_addr() could also fix the mapping
size.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-09 14:53:34 -06:00
Peng FanandTom Rini 8e4414d1a9 misc: k3_avs: Use dev_read_addr_index()
Use dev_read_addr_index() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-06-09 14:53:34 -06:00