Aristo Chen [Sun, 24 May 2026 15:13:16 +0000 (15:13 +0000)]
bootm: bound-check OS index in bootm_os_get_boot_func()
The boot_os[] table in bootm_os.c is a sparse array whose compile-time
size is set by its largest designated initializer (IH_OS_ELF), giving
it IH_OS_ELF + 1 entries. The accessor bootm_os_get_boot_func() returns
boot_os[os] without any bound check, even though the caller in
bootm_run_states() passes images->os.os straight through. That field is
populated by image_get_os() from the raw 8-bit ih_os byte of a legacy
uImage, and by fit_image_get_os() for a FIT, neither of which clamps
the value against the table size.
An attacker-supplied image whose OS field falls outside the populated
range therefore drives an out-of-bounds read of boot_os[]. The caller
only rejects a NULL return, so a non-NULL adjacent global is accepted
as a valid handler and invoked through the indirect call in
boot_selected_os(), turning an unsigned image with a malformed header
into a jump through an attacker-influenced function pointer. FIT
signature verification covers the os property and mitigates this path
for signed images, but legacy bootm and unsigned FIT do not.
Reject out-of-range indices in bootm_os_get_boot_func() so the existing
NULL handling in bootm_run_states() reports an unsupported OS and
declines to boot the image.
board: ti: am62ax: tifs-rm-cfg/rm-cfg: Update DMA resource sharing for CPSW
The CPSW3G instance of CPSW on AM62AX SoC provides Ethernet functionality.
Currently, Ethernet is supported on Linux which runs on the A53 core on the
SoC, by allocating all of the DMA resources associated with CPSW to A53_2.
In order to enable use-cases where the Ethernet traffic is sent from or
consumed by various CPU cores on the SoC simultaneously, while at the
same time, maintaining backward compatibility with the existing use-case
of A53 being the sole entity that exchanges traffic with CPSW via DMA,
update the DMA resource sharing scheme on AM62AX SoC to the following:
In the absence of primary owners of resources (existing use-case
where A53 owns all of the CPSW DMA resources), the secondary owner
can claim all of the resources as its own. For shared use-cases,
the resources that are not claimed by the primary are communicated
to the secondary owner allowing it to claim them. This ensures that
Linux on A53_2 can continue claiming all DMA resources associated
with CPSW in the absence of primary owners, while at the same time
providing users the flexibility to share CPSW DMA resources across
various CPU cores listed above if needed.
While Linux has been mentioned as the Operating System running
on A53, there is no dependency between the Operating System
running on A53 and its ability to claim the CPSW DMA resources
listed above.
Jie Zhang [Thu, 2 Apr 2026 17:13:16 +0000 (13:13 -0400)]
arm: dts: add/fix I2C controllers for sc5xx
sc59x processors have 6 I2C controllers, but their devicetrees
currently have only 3. The length of its register block should
be 0x100 instead of 0x1000. All I2C nodes should be disabled in
sc5xx.dtsi. They can be enabled in board devicetree files if
they are used on the boards. Add missing I2C controllers and
fix the above issues.
Peng Fan [Mon, 25 May 2026 03:09:39 +0000 (11:09 +0800)]
dm: core: use DT region size when mapping device addresses
Update dev_read_addr_*_ptr() and dev_remap_addr_*() helpers to use
dev_read_addr_size_*() and pass the DT-provided region size to
map_sysmem() / map_physmem() instead of 0.
Ensure mappings are consistent with the size defined in the device tree
and avoids implicit or unbounded mappings. When the DT does not provide
a size, the behavior remains unchanged since size is initialized to 0.
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
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)
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
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.
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>
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>
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>
Tom Rini [Thu, 11 Jun 2026 13:56:19 +0000 (07:56 -0600)]
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.
Tom Rini [Wed, 10 Jun 2026 20:52:36 +0000 (14:52 -0600)]
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.
Marek Vasut [Thu, 21 May 2026 20:17:49 +0000 (22:17 +0200)]
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>
Siu Ming Tong [Thu, 28 May 2026 02:38:37 +0000 (19:38 -0700)]
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>
Siu Ming Tong [Thu, 28 May 2026 02:38:36 +0000 (19:38 -0700)]
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>
Torsten Duwe [Thu, 28 May 2026 11:22:06 +0000 (13:22 +0200)]
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.
Emanuele Ghidoli [Thu, 28 May 2026 13:49:06 +0000 (15:49 +0200)]
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.
Aristo Chen [Tue, 26 May 2026 01:41:40 +0000 (01:41 +0000)]
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>
Weijie Gao [Tue, 26 May 2026 08:37:29 +0000 (16:37 +0800)]
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>
David Lechner [Wed, 6 May 2026 23:05:31 +0000 (18:05 -0500)]
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.
Julien Stephan [Wed, 29 Apr 2026 13:59:01 +0000 (15:59 +0200)]
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.
Julien Stephan [Wed, 29 Apr 2026 13:58:59 +0000 (15:58 +0200)]
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.
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.
Julien Stephan [Wed, 29 Apr 2026 13:58:57 +0000 (15:58 +0200)]
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
Julien Stephan [Wed, 29 Apr 2026 13:58:56 +0000 (15:58 +0200)]
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.
Vincent Jardin [Fri, 8 May 2026 13:54:08 +0000 (15:54 +0200)]
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>
Vincent Jardin [Fri, 8 May 2026 13:54:07 +0000 (15:54 +0200)]
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>
Vincent Jardin [Fri, 8 May 2026 13:54:06 +0000 (15:54 +0200)]
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:
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>
Vincent Jardin [Fri, 8 May 2026 13:54:05 +0000 (15:54 +0200)]
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>
Vincent Jardin [Fri, 8 May 2026 13:54:04 +0000 (15:54 +0200)]
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>
Tom Rini [Wed, 25 Mar 2026 19:00:22 +0000 (13:00 -0600)]
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>
Phil Sutter [Thu, 12 Feb 2026 22:31:10 +0000 (23:31 +0100)]
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: 9774462e34faa ("arm: Disable ATAGs support") Signed-off-by: Phil Sutter <phil@nwl.cc>
Chris Packham [Thu, 18 Dec 2025 22:59:36 +0000 (11:59 +1300)]
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>
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>
Chris Packham [Thu, 18 Dec 2025 22:59:34 +0000 (11:59 +1300)]
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: 661c98121d49 ("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>
Tom Rini [Tue, 9 Jun 2026 20:48:44 +0000 (14:48 -0600)]
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.
Peng Fan [Mon, 25 May 2026 04:07:41 +0000 (12:07 +0800)]
ram: aspeed: Use dev_read_addr_x() API
Use dev_read_addr_ptr() and dev_read_addr_index_ptr() which support both
live device tree and flat DT backends, avoiding direct dependency on
devfdt_* helpers.
While at here, also use ofnode_read_s32_default() to replace
fdtdec_get_int().
Peng Fan [Mon, 25 May 2026 04:06:01 +0000 (12:06 +0800)]
gpio: nx: Use dev_remap_addr()
Use dev_remap_addr() to simplify code.
dev_remap_addr() does same thing as dev_read_addr() + map_physmem(). And
it supports both live device tree and flat DT backends, avoiding direct
dependency on devfdt_* helpers.
Ye Li [Wed, 3 Jun 2026 05:51:58 +0000 (13:51 +0800)]
iMX9: scmi: Disable fused modules for iMX95/94/952
Disable relevant modules in kernel FDT and u-boot FDT according to
fuse settings on iMX95/94/952.
For u-boot FDT fixup, introduce a common function that each board
needs this fixup could select OF_BOARD_FIXUP and implement
board_fix_fdt to call imx9_uboot_fixup_by_fuse.
Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
The dtsi additions mirror the existing fsl-ls1028a.dtsi: the LX2160A
SoC dtsi gains the tmu@1f80000 node plus a thermal-zones hierarchy
with 7 sites:
cluster67-thermal site 0 A72 clusters 6 + 7
ddr1-cluster5-thermal site 1 DDR1 + A72 cluster 5
wriop-thermal site 2 WRIOP
dce-qbman-hsio2-thermal site 3 DCE + QBMAN + HSIO2
ccn-dpaa-tbu-thermal site 4 CCN508 + DPAA + TBU
cluster4-hsio3-thermal site 5 A72 cluster 4 + HSIO3
cluster23-thermal site 6 A72 clusters 2 + 3
Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Tom Rini <trini@konsulko.com> Inspired-by: Peng Fan <peng.fan@oss.nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 4 Jun 2026 12:20:33 +0000 (20:20 +0800)]
power: regulator: qcom-rpmh: convert ofnode API to dev_read API
Replace ofnode_read_u32(dev_ofnode(dev), ...) with
dev_read_u32(dev, ...), ofnode_read_string(dev_ofnode(dev), ...) with
dev_read_string(dev, ...), and ofnode_for_each_subnode(node,
dev_ofnode(dev)) with dev_for_each_subnode(node, dev).
No functional change.
Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 4 Jun 2026 12:20:29 +0000 (20:20 +0800)]
power: domain: imx8m: convert ofnode API to dev_read API
Replace ofnode_for_each_subnode(subnode, dev_ofnode(dev)) with
dev_for_each_subnode(subnode, dev) and ofnode_read_u32_default(
dev_ofnode(dev), ...) with dev_read_u32_default(dev, ...).
Peng Fan [Thu, 4 Jun 2026 12:20:28 +0000 (20:20 +0800)]
power: domain: meson-gx-pwrc-vpu: use dev_read_phandle_with_args for hhi-sysctrl
Replace the manual ofnode_read_u32() + ofnode_get_by_phandle() sequence
with a single dev_read_phandle_with_args() call to resolve the
amlogic,hhi-sysctrl phandle. This is cleaner and avoids the intermediate
phandle value and ofnode_valid() check.
No functional change.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 4 Jun 2026 12:20:27 +0000 (20:20 +0800)]
power: domain: meson-ee-pwrc: use dev_read_phandle_with_args for ao-sysctrl
Replace the manual ofnode_read_u32() + ofnode_get_by_phandle() sequence
with a single dev_read_phandle_with_args() call to resolve the
amlogic,ao-sysctrl phandle. This is cleaner and avoids the intermediate
phandle value and ofnode_valid() check.
No functional change.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 22 May 2026 07:14:14 +0000 (15:14 +0800)]
power: regulator: Fix power on/off delay issue
SD initialization failure happens with some UHS-I SD cards on
iMX8MM/iMX93/iMX91 EVK after
commit 4fcba5d556b4 ("regulator: implement basic reference counter").
When sending operation condition to SD card, the OCR does not return
correct status. The root cause is regulator on/off delay is missed
in MMC power cycle with above commit, so SD card is not completely
power off.
When SD startup, the sequence of MMC power cycle is:
mmc_power_init(get vmmc_supply dev) -> mmc_power_off -> udelay(2000)
-> mmc_power_on
Before above commit, as a fixed regulator, the GPIO is set as:
GPIO inactive (in mmc_power_init) ->
GPIO inactive and delay off-on-delay-us (in mmc_power_off) ->
udelay(2000) ->
GPIO active (in mmc_power_on)
After the commit:
GPIO inactive (in mmc_power_init) ->
enable_count is 0, regulator_set_enable returns -EALREADY immediately,
so GPIO is inactive but No off-on-delay-us (in mmc_power_off) ->
udelay(2000) ->
GPIO active (in mmc_power_on)
Move the off-on-delay-us delay before setting GPIO active to fix the issue.
Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Markus Niebel [Mon, 1 Jun 2026 10:13:18 +0000 (12:13 +0200)]
cmd: mmc: fix help and parameter verification with MMC_SPEED_MODE_SET not set
Currently help and parameter scanning does not check whether the feature
is enabled or not. This leads to wrong expectations based on help output
and no clear sign why the mmc dev and mmc rescan do not enforce the
supplied mode.
Fixes: 19f7a34a4642 ("mmc: Add support for enumerating MMC card in a given mode using mmc command") Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 4 Jun 2026 12:20:26 +0000 (20:20 +0800)]
mmc: octeontx_hsmmc: convert ofnode API to dev_read API
Replace all ofnode_read_*() / ofnode_read_bool() / ofnode_get_property()
calls with their dev_read_*() equivalents across
octeontx_mmc_get_valid(), octeontx_mmc_get_config(),
octeontx_mmc_host_probe() and octeontx_mmc_host_child_pre_probe().
Remove the intermediate 'ofnode node' local variables, the now-unused
'host->node' assignment in the probe function, and the corresponding
'ofnode node' field from struct octeontx_mmc_host.
Peng Fan [Thu, 4 Jun 2026 12:20:25 +0000 (20:20 +0800)]
mmc: msm_sdhci: convert ofnode API to dev_read API
Replace ofnode_read_u32(), ofnode_get_property() and
ofnode_read_string_index() with their dev_read_*() equivalents in
msm_sdc_clk_init(). Remove the intermediate 'ofnode node' local
variable.
No functional change.
Reviewed-by: Casey Connolly <casey.connolly@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 4 Jun 2026 12:20:24 +0000 (20:20 +0800)]
mmc: fsl_esdhc_imx: convert ofnode API to dev_read API
Replace ofnode_read_*() calls with their dev_read_*() equivalents in
fsl_esdhc_of_to_plat(). Remove the intermediate 'ofnode node' local
variable and the now-unnecessary <dm/ofnode.h> include.
Vincent Jardin [Tue, 26 May 2026 17:17:35 +0000 (19:17 +0200)]
arm: dts: fsl-lx2162a-qds: drop &dspi{0,1,2} block
arch/arm/dts/fsl-lx2162a-qds.dts carries a verbatim copy of the three
&dspi{0,1,2} overrides that are already provided by the parent include
arch/arm/dts/fsl-lx2160a-qds.dtsi
No functional change, the parent's &dspi{0,1,2} block keeps its
bus-num, status and flash children intact.
Signed-off-by: Vincent Jardin <vjardin@free.fr> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Vincent Jardin [Wed, 20 May 2026 21:48:41 +0000 (23:48 +0200)]
arm: dts: fsl-lx2160a: wdt0 for watchdog node
The SBSA generic watchdog node is currently declared without a
label, so any per-board DTS that wants to override one of its
properties has to use path syntax &{/soc/watchdog@23a0000}.
It fails with
Label or path /soc/watchdog@23a0000 not found
when the path contains an `@`, forcing to duplicate the node.
Adding a one-line
wdt0:
label allows to override the node with
&wdt0 { ... };
(for example to change timeout-sec).
Zero impact on existing boards.
Signed-off-by: Vincent Jardin <vjardin@free.fr> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 25 May 2026 03:51:49 +0000 (11:51 +0800)]
watchdog: mpc8xxx_wdt: Use dev_remap_addr()
Use dev_remap_addr() to replace devfdt_remap_addr 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> Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>