]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
14 hours agobootstd: rauc: Change global method to check any partition master
Martin Schwan [Tue, 12 Aug 2025 12:38:34 +0000 (14:38 +0200)] 
bootstd: rauc: Change global method to check any partition

The bootmeth rauc should scan all partitions, in particular whole
devices, and not be a global method. There may exist multiple RAUC
systems on different devices and they should all be detected. This also
fixes a bug, where both a global bootflow and one using an actual,
complete device would be detected at the same time, when scanning for
valid bootflows.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
14 hours agoenv: Correct Kconfig type for ENV_MMC_SW_PARTITION
Tom Rini [Tue, 12 Aug 2025 17:31:09 +0000 (11:31 -0600)] 
env: Correct Kconfig type for ENV_MMC_SW_PARTITION

As part of renaming environment related Kconfig options,
ENV_MMC_SW_PARTITION was inadvertently changed from a string to a bool.
Correct this.

Fixes: ffc4914703a2 ("env: Rename ENV_MMC_PARTITION to ENV_MMC_SW_PARTITION")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
15 hours agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 14 Aug 2025 14:51:42 +0000 (08:51 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27379

- Board: mbv: Prepare MBV for CI
- Board: MPFS Icicle Kit cleanup
- Board: Add Andes Voyager board support
- RISCV: Update SYS_BOOTM_LEN to commonly used value
- starfive: fix return code of `mac write_eeprom`
- arch/riscv/lib: update memmove and memcpy for big-endian

22 hours agoarch/riscv/lib: update memmove and memcpy for big-endian
Ben Dooks [Thu, 7 Aug 2025 16:49:33 +0000 (17:49 +0100)] 
arch/riscv/lib: update memmove and memcpy for big-endian

Change the shift patterns for the unaligned memory move and copy code
to deal with big-endian by definign macros to change the shfit left and
right to go the opposite way.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agostarfive: fix return code of `mac write_eeprom`
Heinrich Schuchardt [Sat, 9 Aug 2025 08:21:55 +0000 (10:21 +0200)] 
starfive: fix return code of `mac write_eeprom`

When writing the EEPROM fails, the command usage help text is displayed
after the error message. We should only display the error message instead.

If writing the EEPROM fails, return CMD_RET_FAILURE (1) instead of
CMD_RET_USAGE (-1).

Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: E Shattow <e@freeshell.de>
22 hours agoboard: MAINTAINERS: Add Voyager board maintainer
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:27 +0000 (19:38 +0800)] 
board: MAINTAINERS: Add Voyager board maintainer

Add Voyager board maintainer.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agodoc: board: voyager: Add documentation for Voyager
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:40:55 +0000 (19:40 +0800)] 
doc: board: voyager: Add documentation for Voyager

Add documentation for Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoconfigs: andes: add Voyager board defconfig
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:40:40 +0000 (19:40 +0800)] 
configs: andes: add Voyager board defconfig

Add default configuration file for Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoboard: andestech: Add Voyager board support
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:32 +0000 (19:38 +0800)] 
board: andestech: Add Voyager board support

Introduce Voyager board specific code, including
- dram info
- shared cache enabling

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoriscv: dts: andes: Add Voyager device tree
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:17 +0000 (19:38 +0800)] 
riscv: dts: andes: Add Voyager device tree

Introduce the initial device tree support for Andes Voyager board.
We will convert to OF_UPSTREAM once the patch series for kernel is merged.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoriscv: board: Add Andes Voyager board Kconfig support
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:07 +0000 (19:38 +0800)] 
riscv: board: Add Andes Voyager board Kconfig support

The Voyager is Andes' first RISC-V development board.
It is built around Qilai SoC,
which includes Andes AX45MP quad-core cluster.

Introduce the Kconfig entry for the Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agocommon: spl: fix compilation warning
Leo Yu-Chi Liang [Wed, 13 Aug 2025 06:01:04 +0000 (14:01 +0800)] 
common: spl: fix compilation warning

Explicitly specify the type by replacing macro with variable
to fix the possible compilation warning.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoboard: microchip: mpfs_icicle: update to use system controller
Jamie Gibbons [Fri, 1 Aug 2025 12:36:26 +0000 (13:36 +0100)] 
board: microchip: mpfs_icicle: update to use system controller

A new system controller driver has been created to make code modular and
improve and clean code. Update and remove functions to account for these
additional drivers.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoboard: microchip: mpfs_icicle: enable new driver configs
Jamie Gibbons [Fri, 1 Aug 2025 12:36:25 +0000 (13:36 +0100)] 
board: microchip: mpfs_icicle: enable new driver configs

Enable the MPFS mailbox and system controller drivers for use with the
Icicle kit. These functions are crucial for the board setup functions
that run in the Icicle board file - mpfs_icicle.c.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agomisc: add PolarFire SoC system controller
Jamie Gibbons [Fri, 1 Aug 2025 12:36:24 +0000 (13:36 +0100)] 
misc: add PolarFire SoC system controller

This driver provides an interface to access the functions of the system
controller on the Microchip PolarFire SoC.
This driver includes functions to use the system controller to read
the device serial number.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agomailbox: add PolarFire SoC mailbox driver
Jamie Gibbons [Fri, 1 Aug 2025 12:36:23 +0000 (13:36 +0100)] 
mailbox: add PolarFire SoC mailbox driver

This driver adds support for the single mailbox channel of the MSS
system controller on the Microchip PolarFire SoC.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoboard: microchip: mpfs_icicle: make use of ft_board_setup()
Jamie Gibbons [Fri, 1 Aug 2025 12:36:22 +0000 (13:36 +0100)] 
board: microchip: mpfs_icicle: make use of ft_board_setup()

Move ethernet mac address setting to ft_board_setup() to remove the need
for fdt set in custom boot script.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 hours agoconfigs: microchip_mpfs_icicle: enable CONFIG_OF_BOARD_SETUP
Jamie Gibbons [Fri, 1 Aug 2025 12:36:21 +0000 (13:36 +0100)] 
configs: microchip_mpfs_icicle: enable CONFIG_OF_BOARD_SETUP

Enable CONFIG_OF_BOARD_SETUP and other dependencies to allow the use of
the ft_board_setup() function to replace fdt set in boot scripts for
Microchip's MPFS Icicle kit.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoxilinx: mbv: Use separate DTB for binman nodes
Michal Simek [Tue, 22 Jul 2025 11:03:46 +0000 (13:03 +0200)] 
xilinx: mbv: Use separate DTB for binman nodes

The commit d92fdb60677b ("binman: Add option for pointing to separate
description") added support for separating binman description to own file
not the be the part of DT for OS.
The main reason is that binman is not passing dt schema validation that's
why want to keep it separated.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoxilinx: mbv: Fix dt properties in interrupt controller node
Michal Simek [Tue, 22 Jul 2025 11:03:45 +0000 (13:03 +0200)] 
xilinx: mbv: Fix dt properties in interrupt controller node

Properties didn't match dt binding that's why should be fixed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoxilinx: mbv: Add missing mmu-type cpu property
Michal Simek [Tue, 22 Jul 2025 11:03:44 +0000 (13:03 +0200)] 
xilinx: mbv: Add missing mmu-type cpu property

OpenSBI expects mmu-type to be present in DT that's why add it. Without it
OpenSBI disable CPU node which ends up in not working boot.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoxilinx: mbv: Disable OF_HAS_PRIOR_STAGE
Michal Simek [Tue, 22 Jul 2025 11:03:43 +0000 (13:03 +0200)] 
xilinx: mbv: Disable OF_HAS_PRIOR_STAGE

There is no reason to use OF_BOARD for MBV because reduced DT is used by
SPL and full DT is passed via u-boot.img or u-boot.itb. There is no reason
to pick up DTB from certain address.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoriscv: Increase Microchip Icicle's SYS_BOOTM_LEN
Martin Herren [Sat, 19 Jul 2025 21:46:35 +0000 (23:46 +0200)] 
riscv: Increase Microchip Icicle's SYS_BOOTM_LEN

Increase Icicle's SYS_BOOTM_LEN to 0x4000000 which is the new default
value.
Done on Conor Dooley's request.

Signed-off-by: Martin Herren <sputnik@on-the-web.ch>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoriscv: Remove default SYS_BOOTM_LEN from defconfig
Martin Herren [Sat, 19 Jul 2025 21:46:34 +0000 (23:46 +0200)] 
riscv: Remove default SYS_BOOTM_LEN from defconfig

Remove CONFIG_SYS_BOOTM_LEN from all riscv defconfigs where the new
default value is used.

Signed-off-by: Martin Herren <sputnik@on-the-web.ch>
Acked-by: Michal Simek <michal.simek@amd.com> # xilinx_mbv
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoriscv: Set SYS_BOOTM_LEN default to 0x4000000
Martin Herren [Sat, 19 Jul 2025 21:46:33 +0000 (23:46 +0200)] 
riscv: Set SYS_BOOTM_LEN default to 0x4000000

This changes the default value to the most commonly used one among
existing defconfigs.

Signed-off-by: Martin Herren <sputnik@on-the-web.ch>
Acked-by: Michal Simek <michal.simek@amd.com> # xilinx_mbv
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
23 hours agoriscv: Set SYS_BOOTM_LEN explicitly to 0x800000
Martin Herren [Sat, 19 Jul 2025 21:46:32 +0000 (23:46 +0200)] 
riscv: Set SYS_BOOTM_LEN explicitly to 0x800000

For all riscv defconfigs that use the current default value.

This is done in provision of changing the default value to the most
common used value of 0x4000000.

Signed-off-by: Martin Herren <sputnik@on-the-web.ch>
Acked-by: Michal Simek <michal.simek@amd.com> # xilinx_mbv
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
23 hours agoriscv: cpu: Use CONFIG_IS_ENABLED(CPU) instead of plain ifdef
Michal Simek [Thu, 17 Jul 2025 06:26:15 +0000 (08:26 +0200)] 
riscv: cpu: Use CONFIG_IS_ENABLED(CPU) instead of plain ifdef

ifdef CONFIG_CPU only works in U-Boot proper but macro is not working when
XPL phases are used. In this case CONFIG_SPL_CPU is also defined and can be
disabled which is causing compilation error.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
39 hours agoMerge tag 'qcom-fixes-13Aug2025' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 13 Aug 2025 14:57:49 +0000 (08:57 -0600)] 
Merge tag 'qcom-fixes-13Aug2025' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon

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

Quite a few Smatch issues reported by Andrew, and the LMB allocation
fix.

40 hours agopinctrl: qcom: sdm845: Limit check off by 1
Andrew Goodbody [Thu, 7 Aug 2025 11:20:02 +0000 (12:20 +0100)] 
pinctrl: qcom: sdm845: Limit check off by 1

The driver specifies 154 pins so should have a maximum selector of 153
to ensure that the index into the array special_pins_names does not
overflow.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250807-pinctrl_qcom-v1-2-42fac6707fd5@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agopinctrl: qcom: sa8775: Limit check for array index not correct
Andrew Goodbody [Thu, 7 Aug 2025 11:20:01 +0000 (12:20 +0100)] 
pinctrl: qcom: sa8775: Limit check for array index not correct

In sa8775p_get_pin_name the limit check for the index into
msm_special_pins_data allows for more elements than exist. Add code to
ensure the array index remains in bounds.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250807-pinctrl_qcom-v1-1-42fac6707fd5@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agobutton: qcom-pmic: Fix dereference of uninitialised pointer
Andrew Goodbody [Wed, 23 Jul 2025 10:58:04 +0000 (11:58 +0100)] 
button: qcom-pmic: Fix dereference of uninitialised pointer

The pointer 'label' is declared and later dereferenced without ever
having a value assigned to it. Add an assignment to this pointer so it
will be valid later when dereferenced.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250723-button-qcom-pmic-v1-1-9c317ac71167@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agoserial: msm-geni: No need to NULL check priv
Andrew Goodbody [Mon, 11 Aug 2025 17:03:40 +0000 (18:03 +0100)] 
serial: msm-geni: No need to NULL check priv

The NULL check for priv in qcom_geni_serial_poll_bit serves no useful
prupose as too much other code surrounding it relies on priv being
valid. Remove the NULL check for priv and other related code.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250811-serial_msm_geni-v1-2-4499179491bc@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agoserial: msm-geni: Detect error from get_clk_div_rate
Andrew Goodbody [Mon, 11 Aug 2025 17:03:39 +0000 (18:03 +0100)] 
serial: msm-geni: Detect error from get_clk_div_rate

In msm_serial_setbrg if the call to get_clk_div_rate fails then there
will not have been an assignment to clk_div which will lead to the call
to geni_serial_baud using an uninitialised value.
Check for an error from get_clk_div_rate and return an error code if so.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250811-serial_msm_geni-v1-1-4499179491bc@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agomach-snapdragon: fix erroneous lmb allocations
Casey Connolly [Mon, 11 Aug 2025 10:45:13 +0000 (12:45 +0200)] 
mach-snapdragon: fix erroneous lmb allocations

In commit 6e4675b8e5d8 ("lmb: replace the lmb_alloc() and
lmb_alloc_base() API's") an additional allocation was mistakenly
introduced resulting in ${kernel_comp_size} containing the address of a
second 64mb region rather than the actual value of KERNEL_COMP_SIZE.

Additionally, in commit b40d7b8f72f1 ("Merge patch series "lmb: use
a single API for all allocations"") merge conflict resulted in an
additional 128mb allocation for ${loadaddr} when CONFIG_FASTBOOT
is enabled, where it should actually be set to the same value as
${fastboot_addr_r} to respect size constraints (and since it doesn't
seem to interfer with any bootflows).

Fixup both of these, freeing up 192mb of memory.

Fixes: 6e4675b8e5d8 ("lmb: replace the lmb_alloc() and lmb_alloc_base() API's")
Fixes: b40d7b8f72f1 ("Merge patch series "lmb: use a single API for all allocations"")
Link: https://lore.kernel.org/r/20250811104710.1896382-1-casey.connolly@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
40 hours agophy: qcom: Fix ret is uninitialised
Andrew Goodbody [Wed, 6 Aug 2025 16:55:04 +0000 (17:55 +0100)] 
phy: qcom: Fix ret is uninitialised

In qcom_snps_eusb2_phy_probe after the call to devm_clk_get if an error
is found then ret is printed but has not been assigned to by the code.
Decode the error from the pointer and assign it to ret.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250806-phy_qcom_snps-v1-1-5cda830026c7@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
2 days agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Tue, 12 Aug 2025 13:53:33 +0000 (07:53 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

These changes are  mostly smaller fixes, and some additions that were
dependent on recent DT updates: We switch the S3/V3/V3s over to
OF_UPSTREAM, the DTs were already identical anyway. While at it, Paul
sent more fixes for this SoC, I am pulling in two easy fixes that were
ready and low risk. Apart from other assorted fixes, this PR also
enables Ethernet on the new A527/T527 boards, made possible by the DT
update from the DT rebasing repository.

This passed the CI, and was boot tested on boards with Allwinner A10,
A20, A33, V40, A80, A83T, T113s3, F1C100s, H3, A64, H6, H616, A133 and
T527 SoCs.

2 days agosunxi: H616: dram: fix LPDDR3 mode register settings
Andre Przywara [Sun, 27 Jul 2025 13:04:09 +0000 (14:04 +0100)] 
sunxi: H616: dram: fix LPDDR3 mode register settings

The JEDEC LPDDR3 spec defines mode register 0 (MR0) as being read-only,
so there is no point in trying to set its value.
Also the H616 memory controller encodes the mode register index to be
written starting from bit 8 in MRCTRL1 (for LPDDR3 and LPDDR4 chips), so
we need to OR in that number to tell the controller which MR to program.

On top of that, the mode registers between DDR3 and LPDDR3 are
completely different, so writing values crafted for DDR3 into a LPDDR3
chip is just wrong. Due to the above mentioned bugs the writes for
MR0-MR2 did not have any effect (as they were all trying to set the
read-only MR0), so the mode registers just stayed unchanged.

Looking at the LPDDR3 spec and the BSP code, let's write the proper MR
values into LPDDR3 chips, using the proper addressing mode.
Use the opportunity to document the LPDDR3 mode register bits written.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2 days agosunxi: Enable SPL/SPI boot for OLinuXino Lime2
Eric Anderson [Sun, 13 Jul 2025 00:27:41 +0000 (17:27 -0700)] 
sunxi: Enable SPL/SPI boot for OLinuXino Lime2

58e9502e6 "arm: sunxi: Enable SPL/SPI boot for Olinuxino Lime2-eMMC
boards" enabled SPI boot for the eMMC variant. Olimex offers the
"s16MB" variant with SPI flash populated but without eMMC populated.
Tested on board rev L.

Signed-off-by: Eric Anderson <ejona86@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 days agosunxi: spl: initialise timer before clocks
Andre Przywara [Sun, 20 Jul 2025 15:29:19 +0000 (16:29 +0100)] 
sunxi: spl: initialise timer before clocks

Recent changes in the H6 clock code added delay() calls into the SPL clock
setup routine, which requires the timers to work. When compiling for
AArch64, we are always using the Arm Generic Timer (aka. arch timer),
which does not require further setup, hence having an empty timer_init()
routine.
However for 32-bit SoCs we use the Allwinner timers, which require some
setup routine, and hence we need timer_init() to be called before
clock_init().

Swap the order of the two calls, to be more robust when compiling the H6
clock code for AArch32 or when using the Allwinner timers for whatever
reason.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
3 days agosunxi: pinecube: Enable EMAC and network support
Paul Kocialkowski [Tue, 5 Aug 2025 17:48:24 +0000 (19:48 +0200)] 
sunxi: pinecube: Enable EMAC and network support

The pinecube has an ethernet connector which uses the EMAC and internal
PHY of the chip. Enable it in the config.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
3 days agosunxi: a133: dram: fix data type for address variable
Andre Przywara [Fri, 18 Jul 2025 23:58:34 +0000 (00:58 +0100)] 
sunxi: a133: dram: fix data type for address variable

Variables holding addresses are typically using the "long" C type in
U-Boot, to be easily compatible with both 32-bit and 64-bit builds.

The A133 DRAM driver is typically compiled for AArch64, so u64 is the
same type as unsigned long, but that breaks when compiling the DRAM
driver in AArch32 (for some experiments).

Fix the type to make the code more portable.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
3 days agosunxi: a527: radxa/avaota: enable Ethernet
Andre Przywara [Mon, 28 Jul 2025 23:24:52 +0000 (00:24 +0100)] 
sunxi: a527: radxa/avaota: enable Ethernet

The first of the two Ethernet controllers in the Allwinner A527/T527 is
compatible to the MAC from the previous SoCs. Consequently the recent DT
update brought use the MAC node, using the A64 compatible string as the
fallback, which works out of the box.

Enable the sun8i-emac Ethernet driver in the defconfig for the Radxa and
the Avaota boards, so that kernels and other data can be loaded via
TFTP. Please note that only one of the Ethernet sockets will work, the
second MAC is not compatible, and needs a new U-Boot driver. The
X96QPro+ TV box unfortunately uses only this second EMAC, so Ethernet
cannot be used there at the moment.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
3 days agopinctrl: sunxi: a523: change Ethernet pin function name
Andre Przywara [Wed, 30 Jul 2025 22:38:52 +0000 (23:38 +0100)] 
pinctrl: sunxi: a523: change Ethernet pin function name

The name of the pin function was changed last minute in the DT, from
emac0 to gmac0.
Adjust the name we use in the pinctrl driver accordingly.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
3 days agosunxi: Kconfig: Fix default order for V3s DRAM clock
Paul Kocialkowski [Tue, 5 Aug 2025 17:48:17 +0000 (19:48 +0200)] 
sunxi: Kconfig: Fix default order for V3s DRAM clock

The V3s (using co-packaged DRAM) runs at 360 MHz, which is specified in
the common platform Kconfig file. However the value for MACH_SUN8I will
be picked up instead due to ordering.

Re-order the defaults to have MACH_SUN8I_V3S before MACH_SUN8I and let
it select the correct default. Also update the LicheePi Zero Dock
defconfig to remove the value, which is now correctly selected.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 days agosunxi: Switch V3/V3s device-tree source to OF_UPSTREAM
Paul Kocialkowski [Tue, 5 Aug 2025 17:48:21 +0000 (19:48 +0200)] 
sunxi: Switch V3/V3s device-tree source to OF_UPSTREAM

There is nothing special for u-boot in the V3/V3s device-tree files,
they are just copies of the upstream ones.

Remove the copies and switch to OF_UPSTREAM for supported boards.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 days agoPrepare v2025.10-rc2 v2025.10-rc2
Tom Rini [Mon, 11 Aug 2025 19:47:46 +0000 (13:47 -0600)] 
Prepare v2025.10-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
3 days agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 11 Aug 2025 18:05:31 +0000 (12:05 -0600)] 
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 days agoarm: socfpga: Correct how we set BOOTFILE
Tom Rini [Mon, 11 Aug 2025 17:58:25 +0000 (11:58 -0600)] 
arm: socfpga: Correct how we set BOOTFILE

In order to set the BOOTFILE symbol we first need to have USE_BOOTFILE
be set, or some of the logic might not work as expected later on when
building. Second, defaults like this belong with the symbol itself.

Fixes: da595d236b97 ("include: configs: soc64: Use CONFIG_SPL_ATF to differentiate bootfile")
Signed-off-by: Tom Rini <trini@konsulko.com>
6 days agoMerge tag 'u-boot-socfpga-next-20250808' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 8 Aug 2025 17:13:41 +0000 (11:13 -0600)] 
Merge tag 'u-boot-socfpga-next-20250808' of https://source.denx.de/u-boot/custodians/u-boot-socfpga

This pull request introduces initial U-Boot support for Agilex7 M-series, along
with several enhancements and cleanups across existing Agilex platforms. Key
changes include new board support, DDR driver additions, updated device trees,
and broader SoCFPGA SPL improvements.

Highlights:

- Agilex7 M-series bring-up:
  - Basic DT support and board initialization for Agilex7 M-series SoC and
    SoCDK.
  - New sdram_agilex7m DDR driver with UIBSSM mailbox support and HBM support.
  - Clock driver support for Agilex7 M-series.
  - New defconfig: socfpga_agilex7m_defconfig.
- Agilex and Agilex5 enhancements:
  - Improved SPL support: ASYNC interrupt enabling, system manager init
    refactor, and cold scratch register usage.
  - Updated firewall probing and watchdog support in SPL.
  - Cleaned up DDR code, added secure region support for ATF, and improved warm
    reset handling.
- Device Tree and config updates:
  - Migration to upstream Linux DT layout for Agilex platforms.
  - Consolidated socfpga_agilex_defconfig and removed deprecated configs.
  - Platform-specific environment variables for Distro Boot added.
- Driver fixes and cleanups:
  - dwc_eth_xgmac and clk-agilex cleanup and improvements.
  - Several coverity and style fixes.

Contributions in this PR are from Alif Zakuan Yuslaimi, Tingting Meng, and
Andrew Goodbody.  This patch set has been tested on Agilex 5 devkit, Agilex
devkit and Agilex7m devkit.

Passing all pipeline tests at SoCFPGA U-boot custodian
https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/27318

6 days agoMerge tag 'efi-2025-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 8 Aug 2025 17:09:42 +0000 (11:09 -0600)] 
Merge tag 'efi-2025-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-10-rc2

Documentation:

* Describe running U-Boot as a pflash image on RISC-V QEMU
* Correct the description of the bootph-verify device-tree property

UEFI:

* In mkeficapsule fix a resource leak in read_bin_file()
* Support loading a Linux initial RAM disk with the bootefi command.

6 days agoMAINTAINERS: update email address of Heiko Schocher
Heiko Schocher [Fri, 8 Aug 2025 11:40:14 +0000 (13:40 +0200)] 
MAINTAINERS: update email address of Heiko Schocher

use the new email address for community work.

While at it, cleanup git shortlog output, by adding
fixes in .mailmap

Signed-off-by: Heiko Schocher <hs@nabladev.com>
6 days agoMerge tag 'u-boot-imx-master-20250808' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 8 Aug 2025 14:33:19 +0000 (08:33 -0600)] 
Merge tag 'u-boot-imx-master-20250808' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Several Smatch reported fixes.
- Enable the temperature command on imx8ulp-evk.
- Fix mx8mm_fracpll_tbl.
- Make optee packaging optional for imx8m.
- Reuse and export low_drive_freq_update() on imx9.
- Enable USB OTG ID pin pull up in SPL on dh-imx6.

6 days agoconfigs: Add defconfig for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:25:01 +0000 (18:25 -0700)] 
configs: Add defconfig for Agilex7 M-series

Add defconfig for Agilex7 M-series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: dts: Update Makefile for new platform Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:25:00 +0000 (18:25 -0700)] 
arch: arm: dts: Update Makefile for new platform Agilex7 M-series

Update Makefile to support Agilex7 M-series platform enablement.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: mach-socfpga: Update kconfig for new platform Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:59 +0000 (18:24 -0700)] 
arch: arm: mach-socfpga: Update kconfig for new platform Agilex7 M-series

Update Kconfig for new platform Agilex7 M-series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: soc64: Fix dram size calculation in clamshell mode
Tingting Meng [Mon, 4 Aug 2025 01:24:58 +0000 (18:24 -0700)] 
ddr: altera: soc64: Fix dram size calculation in clamshell mode

Fix wrong memory size calculation in clamshell mode

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: soc64: Clean up bit-shift by zero bit
Tingting Meng [Mon, 4 Aug 2025 01:24:57 +0000 (18:24 -0700)] 
ddr: altera: soc64: Clean up bit-shift by zero bit

Clean up bit-shift by zero bit

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: Add DDR driver for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:56 +0000 (18:24 -0700)] 
ddr: altera: Add DDR driver for Agilex7 M-series

This is for new platform enablement for Agilex7 M-series.
Add DDR driver for Agilex7 M-series. This driver is designed to support
DDR and HBM memory. The official HBM handoff is not ready yet, therefore
hardcoded handoff is used for HBM driver validation on mUDV board.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: Add uibssm mailbox support for Agilex7 M-series with HBM
Tingting Meng [Mon, 4 Aug 2025 01:24:55 +0000 (18:24 -0700)] 
ddr: altera: Add uibssm mailbox support for Agilex7 M-series with HBM

Add uibssm mailbox driver for Agilex7 M-series. HPS will interact with UIB
and HBM subsystem through software defined mailbox interface.
HPS can retrieve HBM memory interface calibration status, UIB
configuration, memory interfae configuration, trigger calibration and etc
with the list of supported mailbox command type and opcode.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoclk: altera: Add clock support for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:54 +0000 (18:24 -0700)] 
clk: altera: Add clock support for Agilex7 M-series

Agilex7 M-series reuse the clock driver from Agilex.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoinclude: configs: soc64: Use CONFIG_SPL_ATF to differentiate bootfile
Tingting Meng [Mon, 4 Aug 2025 01:24:53 +0000 (18:24 -0700)] 
include: configs: soc64: Use CONFIG_SPL_ATF to differentiate bootfile

ATF boot flow (SPL->ATF->U-Boot Proper->OS) boot to OS via kernel.itb file
using bootm command.

Change to use CONFIG_SPL_ATF to differentiate the bootfile of default
environment variable. We shouldn't use CONFIG_FIT because it is enabled
by default for U-Boot Proper.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoinclude: configs: Add config header file for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:52 +0000 (18:24 -0700)] 
include: configs: Add config header file for Agilex7 M-series

Add config header file for new platform Agilex7 M-series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: mach-socfpga: Update handoff settings for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:51 +0000 (18:24 -0700)] 
arch: arm: mach-socfpga: Update handoff settings for Agilex7 M-series

Handoff settings updated for new platform Agilex7 M-series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: mach-socfpga: Improve help info.
Tingting Meng [Mon, 4 Aug 2025 01:24:50 +0000 (18:24 -0700)] 
arch: arm: mach-socfpga: Improve help info.

To improve help info for bridge enable/disable command.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: mach-socfpga: Add Agilex7 M-series mach-socfgpa enablement
Tingting Meng [Mon, 4 Aug 2025 01:24:49 +0000 (18:24 -0700)] 
arch: arm: mach-socfpga: Add Agilex7 M-series mach-socfgpa enablement

Add platform related files for new platform Agilex7 M-series.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: dts: Basic device tree support added for Agilex7 M-series
Tingting Meng [Mon, 4 Aug 2025 01:24:48 +0000 (18:24 -0700)] 
arch: arm: dts: Basic device tree support added for Agilex7 M-series

Agilex7 M-series support has been added using upstream Linux DTS.

socfpga_agilex_socdk-u-boot.dtsi was updated to support both Agilex and
Agilex7 M-series platforms.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: dts: agilex: Switch to using upstream Linux DT config
Tingting Meng [Mon, 4 Aug 2025 01:24:47 +0000 (18:24 -0700)] 
arch: arm: dts: agilex: Switch to using upstream Linux DT config

Migrate the legacy Agilex platform to use the upstream Linux device tree
configuration. This helps reduce maintenance overhead and aligns U-Boot
with the Linux kernel's DTS hierarchy and naming conventions.

This change improves consistency between U-Boot and Linux by removing
custom/legacy DTS handling and instead relying on the standardized
definitions provided by the upstream Linux DTS.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: agilex: Clean up DT settings in U-Boot dtsi files
Tingting Meng [Mon, 4 Aug 2025 01:24:46 +0000 (18:24 -0700)] 
arch: arm: agilex: Clean up DT settings in U-Boot dtsi files

Reorganize misplaced properties by moving board-common settings from
socfpga_agilex_socdk-u-boot.dtsi to socfpga_agilex-u-boot.dtsi to maintain
proper separation between common and board-level configurations.

Signed-off-by: Tingting Meng <tingting.meng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: soc64: Perform warm reset after L2 reset in SPL
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:45 +0000 (18:24 -0700)] 
arm: socfpga: soc64: Perform warm reset after L2 reset in SPL

SPL checks for a magic word in the system manager's scratch
register to determine if an L2 reset has occurred. If detected,
SPL places all slave CPUs (CPU1–3) into WFI mode. The master
CPU (CPU0) then initiates a warm reset by writing to the RMR_EL3
system register and also enters WFI mode.

This warm reset flow is handled entirely within the HPS. The
function `socfpga_sysreset_request()` triggers the warm
reset, and upon SPL re-entry, the updated `lowlevel_init_soc64.S`
handles the necessary initialization.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agosysreset: socfpga: soc64: Enable L2 reset
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:44 +0000 (18:24 -0700)] 
sysreset: socfpga: soc64: Enable L2 reset

Put all slave CPUs (CPU1-3) into WFI mode. Master CPU (CPU0) writes
the magic word into system manager's scratch register to indicate
the system has performed L2 reset and request reset manager to
perform hardware handshake and then trigger L2 reset. CPU0 put
itself into WFI mode. L2 reset will reboot all HPS CPU cores after
which all HPS cores are in WFI mode. L2 reset is followed by warm
reset request by SPL via RMR_EL3 system register.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: misc: Exclude Agilex from clock manager base address retrieval
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:43 +0000 (18:24 -0700)] 
arm: socfpga: misc: Exclude Agilex from clock manager base address retrieval

Agilex retrieves its clock manager address via probing its own clock
driver model during the SPL initialization.

Therefore, excluding Agilex from calling its clock driver in misc
driver to retrieve the clock manager address.

Once all SoC64 devices has been successfully transition to clock
driver model method, this implementation will be cleaned up.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoinclude: configs: socfpga: Add environment variables for distro boot
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:42 +0000 (18:24 -0700)] 
include: configs: socfpga: Add environment variables for distro boot

Added environment variables needed to support NAND distro boot

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: agilex: Get ACF from boot scratch register
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:41 +0000 (18:24 -0700)] 
ddr: altera: agilex: Get ACF from boot scratch register

The DDR data rate must be set correctly in the DDRIOCTRL
register according to the Actual Clock Frequency (ACF) value.

By enabling the reading of ACF value from bit 18 of the boot
scratch register during initialization, the DDR data rate is
able to be configured accurately.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: Define the usage of boot scratch cold reg 8
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:40 +0000 (18:24 -0700)] 
arm: socfpga: Define the usage of boot scratch cold reg 8

The boot scratch cold reg 8 is shared between DBE, DDR init progress
update and Linux EDAC. This patch defines how the bits are used by
respective features above and their macro names used in U-Boot.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: agilex: Remove code redundancy
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:39 +0000 (18:24 -0700)] 
ddr: altera: agilex: Remove code redundancy

Remove redundant code for MPFE CSR firewall disabled as this was
already set in DTreg dts.

Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoddr: altera: soc64: Add secure region support for ATF flow
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:38 +0000 (18:24 -0700)] 
ddr: altera: soc64: Add secure region support for ATF flow

Setting up firewall regions based on SDRAM memory banks configuration
(up to CONFIG_NR_DRAM_BANKS banks) instead of using whole address space.

First 1 MiB (0 to 0xfffff) of SDRAM is configured as secure region,
other address spaces are non-secure regions. The ARM Trusted Firmware (ATF)
image is located in this first 1 MiB memory region. So, this can prevent
software executing at non-secure state EL0-EL2 and non-secure masters
access to secure region.

Add common function for firewall setup and reuse for all SoC64 devices.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: agilex: Enable system manager driver for Agilex
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:37 +0000 (18:24 -0700)] 
arm: socfpga: agilex: Enable system manager driver for Agilex

The base address of system manager can be retrieved
using DT framework through the system manager driver.

Enable system manager support for Agilex by probing the
system manager driver to initialize during SPL boot up.

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: agilex5: Refactor system manager driver initialization
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:36 +0000 (18:24 -0700)] 
arm: socfpga: agilex5: Refactor system manager driver initialization

Refactor system manager initialization by searching for system manager
alias in Agilex5 device tree instead of manually passing node name to
the device model calling function

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agodrivers: clk: agilex: Replace status polling with wait_for_bit_le32()
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:35 +0000 (18:24 -0700)] 
drivers: clk: agilex: Replace status polling with wait_for_bit_le32()

Replace cm_wait_for_fsm() function with wait_for_bit_le32() function
which supports accurate timeout.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agodrivers: watchdog: Enable watchdog support in SPL for Agilex
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:34 +0000 (18:24 -0700)] 
drivers: watchdog: Enable watchdog support in SPL for Agilex

Enable watchdog as early as possible after clock initialization
which is set at 10 seconds.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarm: socfpga: Enable ASYNC interrupts in Agilex SPL
Tien Fong Chee [Fri, 8 Aug 2025 14:20:42 +0000 (22:20 +0800)] 
arm: socfpga: Enable ASYNC interrupts in Agilex SPL

Asynchronous aborts were previously masked at SPL
entry.

To ensure early detection of system errors
such as ECC faults or bus errors, asynchronous aborts
should be explicitly unmasked by clearing the A-bit in
the DAIF register during Agilex SPL initialization.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
# Conflicts:
# arch/arm/mach-socfpga/spl_agilex.c

6 days agoarm: socfpga: Update Agilex SPL data save and restore implementation
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:32 +0000 (18:24 -0700)] 
arm: socfpga: Update Agilex SPL data save and restore implementation

Enable backup for data section to support warm reset in Agilex SPL as
no SPL image would be reloaded in warm reset.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoboard: phytec: phycore-imx93: Add VOLT_LOW_DRIVE frequency fixup
Primoz Fiser [Thu, 7 Aug 2025 13:13:54 +0000 (15:13 +0200)] 
board: phytec: phycore-imx93: Add VOLT_LOW_DRIVE frequency fixup

For phyCORE-i.MX93 SoMs with i.MX93 parts running in VOLT_LOW_DRIVE mode
(SoCs with speed grade fuse set to 900 MHz) reduce usdhc clocks from 400
MHz to 266 MHz. Do this in board code since global imx9 board_fix_fdt()
is not used in case of phycore-imx93 board since commit d3b9b7996889
("board: phytec: imx93: Add eeprom-based hardware introspection").

While at it, add a note to ft_board_setup() function to inform that
fixup for Linux device-tree is taken care by ft_system_setup() in imx9
global arch/arm/mach-imx/imx9/soc.c implementation.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
6 days agoimx9: soc: Reuse and export low_drive_freq_update()
Primoz Fiser [Thu, 7 Aug 2025 13:13:53 +0000 (15:13 +0200)] 
imx9: soc: Reuse and export low_drive_freq_update()

Reuse and export low_drive_freq_update() function. This way global imx9
board_fix_fdt() doesn't duplicate code. While low_drive_freq_update()
can be reused on boards such as phyCORE-i.MX93 (TARGET_PHYCORE_IMX93)
which is not using the global imx9 board_fix_fdt() implementation.

While at it, make printout logic less verbose by only outputting on the
error condition and not on each successful clock fixup. Also drop now
invalid comment (low_drive_freq_update() now does fixup for internal and
kernel device-tree).

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
6 days agoarm: socfpga: agilex: Probe DT for firewall setup
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:31 +0000 (18:24 -0700)] 
arm: socfpga: agilex: Probe DT for firewall setup

Update Agilex SPL code to implement device tree model
for firewall registers setup by using DTreg driver to
probe from device tree for the firewall settings instead
of calling firewall driver function.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoarch: arm: dts: agilex: Update Agilex device tree
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:30 +0000 (18:24 -0700)] 
arch: arm: dts: agilex: Update Agilex device tree

Update exisitng Agilex device tree to support multiple flashes boot
- MMC, QSPI and NAND.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agoconfigs: agilex: Combine defconfig for all boot flashes
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:29 +0000 (18:24 -0700)] 
configs: agilex: Combine defconfig for all boot flashes

Combine all MMC, NAND and QSPI configs into single defconfig which is named
as "socfpga_agilex_defconfig". This will be the default defconfig to use.
It supports booting from all three flashes using ARM Trusted Firmware (ATF)
as the secure runtime monitor.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agodrivers: clk: agilex: Use real clock source frequency
Alif Zakuan Yuslaimi [Mon, 4 Aug 2025 01:24:28 +0000 (18:24 -0700)] 
drivers: clk: agilex: Use real clock source frequency

Update the ARMv8 generic timer frequency register (cntfrq_el0)
with the actual hardware timer frequency (COUNTER_FREQUENCY_REAL).

The generic timer frequency was set to 0x200000000 during boot clk
which needs to be set to 0x400000000 when transition from boot clk
to PLL clk.

This will ensure that subsequent timer operations are based on the
correct frequency, ensuring accurate timekeeping.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agonet: dwc_eth_xgmac_socfpga: Remove always true test
Andrew Goodbody [Mon, 4 Aug 2025 15:11:38 +0000 (16:11 +0100)] 
net: dwc_eth_xgmac_socfpga: Remove always true test

In dwxgmac_of_get_mac_mode there is a test for mac_mode which will
return if false. After this point mac_mode is guaranteed to be true so
there is no need to test for this. Remove that test.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agonet: dwc_eth_xgmac: Use unwind goto on error
Andrew Goodbody [Mon, 4 Aug 2025 15:11:37 +0000 (16:11 +0100)] 
net: dwc_eth_xgmac: Use unwind goto on error

In xgmac_probe there is a direct return after the point where unwind
gotos start to be used to undo actions performed by earlier code. Use
the appropriate unwind goto instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
6 days agodoc: spl: fix typo 'TPL' to 'VPL'
Leo Yu-Chi Liang [Wed, 6 Aug 2025 11:39:12 +0000 (19:39 +0800)] 
doc: spl: fix typo 'TPL' to 'VPL'

Fix typo: change 'TPL' to 'VPL'.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
6 days agoefi_loader: Support loading a ramdisk with bootefi
Simon Glass [Tue, 5 Aug 2025 05:46:14 +0000 (07:46 +0200)] 
efi_loader: Support loading a ramdisk with bootefi

It is sometimes useful to be able to boot via EFI using a Linux initrd.
Add support for this.

Fix a 'specifiy' typo while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 days agodoc: qemu-riscv: describe running as flash image
Heinrich Schuchardt [Tue, 29 Jul 2025 07:47:26 +0000 (09:47 +0200)] 
doc: qemu-riscv: describe running as flash image

Describe how to build U-Boot to be run by QEMU as an emulated flash image.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
6 days agotools: mkeficapsule: resource leak in read_bin_file()
Heinrich Schuchardt [Sat, 26 Jul 2025 06:31:23 +0000 (08:31 +0200)] 
tools: mkeficapsule: resource leak in read_bin_file()

Free the allocated buffer in case of an error.

Fixes: 9e63786e2b4b ("tools: mkeficapsule: rework the code a little bit")
Addresses-Coverity-ID: 345917 Resource leak
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 days agopylibfdt: setup.py: Drop license_files
Tom Rini [Fri, 25 Jul 2025 15:18:21 +0000 (09:18 -0600)] 
pylibfdt: setup.py: Drop license_files

On more recent versions of setuptools the warning about not being able
to find the files specified in license_files has re-appeared. This is
because as best I can tell, it can't and won't look in $(srctree) but
rather only subdirectories of scripts/dtc/pylibfdt. Since we already
provide both SPDX tags and a license field with the SPDX contents, let
us just drop license_files as it's not mandatory.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 days agovirtio: fix freeing of virtio ring buffer
Heinrich Schuchardt [Sat, 26 Jul 2025 06:17:58 +0000 (08:17 +0200)] 
virtio: fix freeing of virtio ring buffer

If the allocation if the bounce buffer fails, virtio_free_pages is called
with a random value from the stack.

Ensure that vring.size is initialized.

Fixes: 37e53db38bdb ("virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM")
Addresses-Coverity-ID: 453314 Uninitialized scalar variable
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 days agomeminfo: correct "free" memory region size
Shiji Yang [Sun, 27 Jul 2025 07:42:01 +0000 (15:42 +0800)] 
meminfo: correct "free" memory region size

The size of free memory should be $lmb_base - $ram_base.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
7 days agomtd: spi-nor: Fix return value of s25_s28_mdp_ready()
Takahiro Kuwano [Mon, 28 Jul 2025 01:13:58 +0000 (10:13 +0900)] 
mtd: spi-nor: Fix return value of s25_s28_mdp_ready()

s25_s28_mdp_ready() returns 1 when spansion_sr_ready() returns negative
value (error code). Fix this problem by following Linux implementation.

Fixes: 1c3dd193b5b ("mtd: spi-nor-core: Add fixups for Cypress s25hl-t/s25hs-t")
Reported-by: Hiroyuki Saito <Hiroyuki.Saito2@infineon.com>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
7 days agodrivers: scsi: fix inaccurate block count reporting in scsi operations
Balaji Selvanathan [Mon, 28 Jul 2025 16:21:05 +0000 (21:51 +0530)] 
drivers: scsi: fix inaccurate block count reporting in scsi operations

The 'blks' variable in scsi_read/write/erase functions is updated
regardless of pass/fail of the scsi operation . If the scsi operation
fails, 'blkcnt' is updated using an incorrect value of 'blks'. This
wrong 'blkcnt' is returned to the caller and it assumes all blocks were
processed correctly.

Fix this by updating the 'blks' variable only if the scsi operation
succeeds.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
7 days agoMerge patch series "arm: dts: k3-am62a: remove GP security variant for AM62A"
Tom Rini [Thu, 7 Aug 2025 17:14:07 +0000 (11:14 -0600)] 
Merge patch series "arm: dts: k3-am62a: remove GP security variant for AM62A"

Bryan Brattlof <bb@ti.com> says:

The AM62Ax was created right when TI was shifting to their high security
(HS-FS and HS-SE) processes. During this transition a small subset of
AM62A parts where configured to use the old "GP" security for internal
and for select groups of partners but never sold for the wider public.

To help simplify the build and to avoid any confusion of which security
configurations are supported going forward remove the GP builds for the
AM62A SoCs.

Link: https://lore.kernel.org/r/20250729-no-62a-gp-v1-0-1dbdb4469ad3@ti.com