28310 Commits

Author SHA1 Message Date
Anshul Dalal
8fd3768ca1 arm: armv8: remove redundant definition of mmu_status
mmu_status is used in io memcpy functions to prevent accesses to non
8-byte aligned addresses when the mmu is disabled. Though there is a
redundant definition enabled when icaches is turned off by setting
SYS_ICACHE_OFF.

This patch removes the redundant definition, allowing mmu_status to
properly report the status regardless of config settings. This shouldn't
be a problem since access to non 8-byte aligned data can be done
irrespective of icache state.

Fixes: 268f6ac1f95c ("arm64: Update memcpy_{from, to}io() helpers")

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-10-03 15:13:58 -06:00
Tom Rini
aff68c8514 Merge tag 'u-boot-socfpga-next-20250930' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next
SoCFPGA updates for v2025.10:

CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/27762

This pull request brings a set of updates across SoCFPGA platforms
covering Agilex5, Agilex7, N5X, and Stratix10. The changes include:

* Agilex5 enhancements:
  - USB3.1 enablement and DWC3 host driver support
  - System Manager register configuration for USB3
  - Watchdog timeout increase and SDMMC clock API integration
  - dcache handling improvements in SMC mailbox path
  - Enable SPL_SYS_DCACHE_OFF in defconfig

* Clock driver improvements:
  - Introduce dt-bindings header for Agilex clocks
  - Add enable/disable API and EMAC clock selection fixes
  - Replace manual shifts with FIELD_GET usage

* DDR updates:
  - IOSSM mailbox compatibility check
  - Correct DDR calibration status handling

* Device tree changes:
  - Agilex5: disable cache allocation for reads
  - Stratix10: add NAND IP node
  - Enable driver model watchdog
  - Enable USB3.1 node for Agilex5

* Config cleanups:
  - Simplify Agilex7 VAB defconfig
  - Remove obsolete SYS_BOOTM_LEN from N5X VAB config
  - Enable CRC32 support for SoCFPGA
  - Increase USB hub debounce timeout

Overall this set improves reliability of DDR and cache flows,
adds missing USB and MMC features for Agilex5, and refines clock
and configuration handling across platforms.

This patch set has been tested on Agilex 5 devkit, and Agilex devkit.
2025-09-30 16:11:23 -06:00
Naresh Kumar Ravulapalli
da57acb4c3 arch: arm: socfpga: Configure USB3 System Manager registers
For successful reset staggering pulse operation, reset pulse
override bit is set. Port overcurrent bit 1, which in reality
reflects PIPE power present signal is set to avoid giving
false information of Vbus status to HPS controller.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:45:37 +08:00
Naresh Kumar Ravulapalli
e3a11a240a arch: arm: dts: Enable USB3.1 for Agilex5
USB 3.1 node is enabled for Agilex5.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:56 +08:00
Boon Khai Ng
38d49808d4 cache: Check dcache availability before calling cache functions
When the data cache (dcache) is disabled, calling related
status functions can lead to compilation errors due to
undefined references.

Adding a !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) check before
invoking dcache_status() (used in common/memsize.c:get_ram_size())
and mmu_status() (from arch/arm/include/asm/io.h).

Without this check, builds with dcache disabled will fail to compile.

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-30 14:29:55 +08:00
Boon Khai Ng
8d28f121d3 arch: arm: mach-socfpga: smc: Add dcache flushing and invalidation in smc_send_mailbox()
Adding the dcache flushing and invalidation in the smc_send_mailbox()
At the same time replace the use of u64 with uintptr_t to ensure
compatibility across different architectures and correct the
pointer arithmetic for buffer end address calculation.

Signed-off-by: Mahesh Rao <mahesh.rao@altera.com>
Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:54 +08:00
Alif Zakuan Yuslaimi
f4db066455 arm: socfpga: mailbox: Remove CONFIG_CADENCE_QSPI guard from QSPI mailbox API declarations
The QSPI mailbox API function declarations (mbox_qspi_close and
mbox_qspi_open) in mailbox_s10.h were guarded by CONFIG_CADENCE_QSPI
preprocessor conditional. This prevented their prototypes from being
visible to code that may use the stub implementations when
CONFIG_CADENCE_QSPI is disabled.

Remove the CONFIG_CADENCE_QSPI preprocessor conditional so these functions
are always declared, regardless of the configuration. This avoids potential
build or linkage errors when stubs are used.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:54 +08:00
Alif Zakuan Yuslaimi
fb7aa75561 arm: socfpga: Define Use FPGA switch handoff section size for Agilex5
Agilex5 FPGA switch section in the handoff data is larger by 32 bytes
than the default value as these extra sections contains I3C0 and I3C1
register offsets and values with 4 bytes each.

This requires 4 more times of reading the FPGA switch section of the
handoff data to fully populate the handoff data table in the memory
during runtime.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:53 +08:00
Naresh Kumar Ravulapalli
26ffc37787 arm: dts: socfpga: Enable driver model for watchdog timer
All SoCFPGA platforms are switching to CONFIG_WDT (driver
model for watchdog timer drivers) from CONFIG_HW_WATCHDOG. Status
of watchdog is enabled to assist with this switching.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:52 +08:00
Naresh Kumar Ravulapalli
27e13c9c8d arch: arm: socfpga: Remove speed and mode from flash probe
Change is to allow the user to choose speed and mode values
from dts or the default ones.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:29:51 +08:00
Naresh Kumar Ravulapalli
f6dbe41638 arch: arm: dts: stratix10: Add NAND IP to base dtsi
Add NAND node to the base stratix10 dtsi file.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 14:06:57 +08:00
Naresh Kumar Ravulapalli
f0e722def6 arch: arm: dts: agilex5: Disable cache allocation for reads
In order to circumvent CCU NOC issue in Agilex5, it is recommended
to disable cache allocation for reads. This prevents hang issues
caused by CCP (Common Cache Pipe) Fill Done FIFO overflow.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-09-30 12:30:12 +08:00
Tom Rini
6190036e23 Merge patch series "vexpress63: Set the DM_RNG property"
This series from Debbie Horsfall <debbie.horsfall@arm.com> enhances the
Vexpress64 platform in a few ways.

Link: https://lore.kernel.org/r/20250917162222.1061111-1-debbie.horsfall@arm.com
2025-09-26 16:49:37 -06:00
Debbie Horsfall
1f3f1e090a arm: vexpress64: Enable SYSRESET and SYSRESET_PSCI
Select SYSRESET on Vexpress64 to enable system reset to support other
features, such as capsule-on-disk. Select SYSRESET_PSCI if PSCI is
inferred from the firmware (via ARM_PSCI_FW).
Select ARM_SMCCC for Vexpress64 boards which in turn selects
ARM_PSCI_FW.

The sysreset uclass unconditionally implements a reset_cpu() function.
Remove the empty reset_cpu() in vexpress64 board code.

Signed-off-by: Debbie Horsfall <debbie.horsfall@arm.com>
2025-09-26 16:49:37 -06:00
Vishnu Singh
b6d9aa6aaf bootstage: stash boot records to reserved mem before kernel handoff
U-Boot now stashes its bootstage buffer into a reserved memory region
whenever CONFIG_BOOTSTAGE_STASH is enabled, just before exiting to the
kernel. This allows a post boot parser to read a unified timeline
(SPL→U-Boot→Kernel→MCU/DSP) directly from DDR, enabling standardized
and repeatable boot-time profiling across releases and SoCs.

Change summary:
 Call bootstage_stash_default() in announce_and_cleanup()
  when CONFIG_BOOTSTAGE_STASH is set.

Reference boot-time parser utility:
 https://github.com/v-singh1/boot-time-parser

Sample boot time report:
    +--------------------------------------------------------------------+
                     am62xx-evm Boot Time Report
    +--------------------------------------------------------------------+
    Device Power On         : 0 ms
    SPL Time                : 843 ms
    U-Boot Time             : 2173 ms
    Kernel handoff time     : 462 ms
    Kernel Time             : 2522 ms
    Total Boot Time         : 6000 ms
    +--------------------------------------------------------------------+

    +--------------------------------------------------------------------+
                     Bootloader and Kernel Boot Records
    +--------------------------------------------------------------------+
    BOOTSTAGE_AWAKE                =      0 ms (+  0 ms)
    BOOTSTAGE_START_UBOOT_F        =    843 ms (+  0 ms)
    BOOTSTAGE_ACCUM_DM_F           =    843 ms (+  0 ms)
    BOOTSTAGE_START_UBOOT_R        =   1951 ms (+1108 ms)
    BOOTSTAGE_ACCUM_DM_R           =   1951 ms (+  0 ms)
    BOOTSTAGE_NET_ETH_START        =   2032 ms (+ 81 ms)
    BOOTSTAGE_NET_ETH_INIT         =   2053 ms (+ 21 ms)
    BOOTSTAGE_MAIN_LOOP            =   2055 ms (+  2 ms)
    BOOTSTAGE_START_MCU            =   2661 ms (+606 ms)
    BOOTSTAGE_BOOTM_START          =   2959 ms (+298 ms)
    BOOTSTAGE_RUN_OS               =   3016 ms (+ 57 ms)
    BOOTSTAGE_BOOTM_HANDOFF        =   3016 ms (+  0 ms)
    BOOTSTAGE_KERNEL_START         =   3478 ms (+462 ms)
    BOOTSTAGE_KERNEL_END           =   6000 ms (+2522 ms)
    +--------------------------------------------------------------------+

    +--------------------------------------------------------------------+
                     MCU Boot Records
    +--------------------------------------------------------------------+
    MCU_AWAKE                      =   2661 ms (+  0 ms)
    BOARD_PERIPHERALS_INIT         =   2661 ms (+  0 ms)
    MAIN_TASK_CREATE               =   2661 ms (+  0 ms)
    FIRST_TASK                     =   2662 ms (+  1 ms)
    DRIVERS_OPEN                   =   2662 ms (+  0 ms)
    BOARD_DRIVERS_OPEN             =   2662 ms (+  0 ms)
    IPC_SYNC_FOR_LINUX             =   6636 ms (+3974 ms)
    IPC_REGISTER_CLIENT            =   6636 ms (+  0 ms)
    IPC_SUSPEND_TASK               =   6636 ms (+  0 ms)
    IPC_RECEIVE_TASK               =   6636 ms (+  0 ms)
    IPC_SYNC_ALL                   =   6787 ms (+151 ms)
    +--------------------------------------------------------------------+

Signed-off-by: Vishnu Singh <v-singh1@ti.com>
2025-09-26 16:48:10 -06:00
Marek Vasut
7c0f1c46f8 arm64: Add MIDR entry for Cortex-A720
Add MIDR entry for Cortex-A720 core.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-09-26 16:47:48 -06:00
Michal Simek
c8a74db0cd arm: Change SYS_INIT_SP_BSS_OFFSET from int to hex
The most of OFFSET values are in hex instead of int which is easier for
layout description.

Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-09-26 16:46:26 -06:00
Ye Li
1566f803bf imx9: scmi: Add PCIE ECAM and outbound space to MMU
Add PCIE1 and PCIE2 ECAM space and outbound space to MMU pagetable,
so A55 can access them.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:52:54 -03:00
Ye Li
3d4e14f4c9 imx94_evk: Add i.MX943 EVK board support
Add board-level code and defconfig for the i.MX943 EVK board, supporting
multiple SOM variants: 19x19 LPDDR5, 19x19 LPDDR4 and 15x15 LPDDR4.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
88c5ed4aa0 arm: dts: Add i.MX943 EVK board dtsi files
Introduce the base dtsi files for the i.MX943 EVK board. These files
define the essential components such as messaging units, uSDHC, GPIOs
and lpuart for board bring-up.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
8824aa432c imx: ele_ahab: Add i.MX94 support to display_life_cycle()
Extend display_life_cycle() to support i.MX94.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
226a606c10 imx: ele_ahab: Implement display_life_cycle() for i.MX95
The register reflects lifecycle and some lifecycle-derived state of
i.MX95 has new offset address and layout, so display_life_cycle() is
added specifically for it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
54e4b1c36b imx9: Change container header temp buffer address
Due to i.MX95 has reserved first 256MB DDR, change to use the DDR
start address in u-boot as the container header buffer.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
6fc3934db5 imx: container: Add i.MX94 support to get_imageset_end()
Extend get_imageset_end() to handle i.MX94 family.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
f9c4fd3871 imx9: scmi: Update the files under arch/arm/mach-imx/imx9/scmi/ to support i.MX94
- Add base addresses for WDG3, WDG4, GPIO6, and GPIO7 for i.MX94.
- Introduce common.h with macros of clock IDs, power domains, and CPU
  types for platform-specific replacement (e.g., i.MX94, i.MX95).
- Extend imx_get_mac_from_fuse() to support i.MX94.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
1588c243b9 imx9: scmi: Add i.MX94 support to get_reset_reason()
Update get_reset_reason() to support i.MX94 to send message to the
System Manager to retrieve the LM/system last booted/shutdown reasons.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-26 09:51:21 -03:00
Peng Fan
998c6cc450 imx95: Add get_reset_reason() to retrieve the LM/system last booted/shutdown reasons
System Manager provides the last booted and shutdown reasons of the
logical machines (LM) and system using the SCMI misc protocol (Protocol
ID: 0x84, Message ID: 0xA). This path adds get_reset_reason() to query
and print these reasons in SPL and U-Boot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2025-09-26 09:51:21 -03:00
Ye Li
a87b928326 imx9: Add i.MX94 CPU type and SoC-level Kconfig
Introduce support for the new i.MX94 processor, including its CPU type
and SoC-level Kconfig entry.

The i.MX94 is a new member of the i.MX9 family. It uses a System Manager
to handle system-level functions such as power, clock, sensor and pin
control. The System Manager runs on a Cortex-M processor, while the
Cortex-A processor communicates with it via the ARM SCMI protocol and a
messaging unit.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
2025-09-26 09:51:21 -03:00
Mathieu Othacehe
9c7e61fccc board: rzg2l: Check the DTB pointer passed by the TF-A.
On the RZG2L platform, the advised
TF-A (https://github.com/renesas-rz/rzg_trusted-firmware-a/tree/v2.5/rzg2l)
does not pass any DTB blob to U-Boot.

On the other hand, the RZG2L part of U-Boot expects a DTB to be passed.  It
means that if one flashes the latest TF-A as well as the mainline U-Boot,
it will crash trying to dereference the NULL DTB pointer before outputing
anything.

Check if the DTB pointer is NULL before trying to use it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-09-25 23:18:34 +02:00
Osama Abdelkader
8558aaa3cf sandbox: use env_get() for time offset instead of getenv()
The sandbox time offset is intended to be controlled via the U-Boot
environment, not the host process environment. Update os_get_time_offset()
to use env_get() instead of the libc getenv().

Leave other getenv() uses (e.g. U_BOOT_PERSISTENT_DATA_DIR,
UBOOT_SB_FUZZ_TEST) unchanged, since those refer to host environment
variables needed by sandbox tests.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
2025-09-24 11:03:24 -06:00
Tom Rini
e482fdbbca Revert "Merge patch series "mkimage: Detect FIT image load address overlaps and fix related test/DTS issues""
This reverts commit 4d84fa1261eb27d57687f2e4c404a78b8653c183, reversing
changes made to b82a1fa7ddc7f3be2f3b75898d5dc44c34420bdd.

I had missed some feedback on this series from earlier, and we have
since had reports of regressions due to this as well. For now, revert
this.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-24 07:50:44 -06:00
Tom Rini
4d84fa1261 Merge patch series "mkimage: Detect FIT image load address overlaps and fix related test/DTS issues"
Aristo Chen <jj251510319013@gmail.com> says:

This patch series enhances FIT image robustness by adding **memory
region overlap detection** to `mkimage` and fixing existing overlaps
in DTS files and `binman` tests.

The primary goal is to prevent runtime memory corruption from
conflicting load addresses in FIT images.

Key Changes:

1.  `mkimage` Overlap Detection: A new validation in
    `tools/fit_image.c` checks for overlapping load addresses
    within FIT configurations. `mkimage` now errors out with
    detailed info on conflicts, preventing bad FIT image creation.

2.  New Test Case: A Python test verifies the new detection.
    It intentionally creates an overlap (kernel and FDT)
    to confirm correct error handling.

3.  Fixes for Existing Overlaps:
    * Board DTS (k3-am6xx): Adjusted load addresses for TI
      firmware stubs to prevent conflicts. This resolves
      previously undetected overlaps.
    * `binman` Tests: Fixed several tests. U-Boot load
      addresses were shifted to avoid ATF conflicts. A new
      linker script for TEE ELF sections ensures distinct
      memory layouts.

4.  Documentation: Added guidance for developers on how to
    determine ELF load addresses using readelf, linker scripts,
    and objdump when working with binman FIT images.

Impact:

This series improves FIT image reliability by catching overlaps
at build time, helping developers resolve issues before runtime
failures.

Link: https://lore.kernel.org/r/20250914110021.4103-1-aristo.chen@canonical.com
2025-09-23 13:41:16 -06:00
Aristo Chen
cbc4da1dce arm: dts: k3-am6xx: Fix FIT image memory overlap in binman configurations
Fix memory overlaps in FIT image configurations for TI AM62x and AM64x
PHYCore and SK boards.

The overlaps occurred in two categories:

1. TI firmware stub images (tifsstub-hs, tifsstub-fs, tifsstub-gp):
   These mutually exclusive firmware variants were incorrectly assigned
   the same load address within FIT configurations, causing overlap
   detection to fail. Adjust addresses with 64KB spacing:
   - tifsstub-hs: Keep original address
   - tifsstub-fs: Move to +64KB offset
   - tifsstub-gp: Move to +128KB offset

2. Device tree overlay images (som-no-rtc, som-no-spi, som-no-eth):
   These overlay files had insufficient spacing between load addresses,
   causing actual memory overlaps. Increase spacing to 8KB boundaries
   to accommodate overlay sizes safely.

An upcoming commit will validate if the memory region is overlapped

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
2025-09-23 13:35:22 -06:00
Tom Rini
b82a1fa7dd Prepare v2025.10-rc5
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCaNKh1AAKCRAr4qD1Cr/k
 CnQgAQD5TlXCGlBUqvpBo8Q4eoWQb+bIjP7UJlquO3nB9vrqAgD/cpKwXDBZ88fL
 7UwAs2FAuE21eJ/SwZ/NQImwR0CkNAk=
 =N0hy
 -----END PGP SIGNATURE-----

Merge tag 'v2025.10-rc5' into next

Prepare v2025.10-rc5
2025-09-23 08:24:59 -06:00
Ye Li
2d7a6f19bb arm: imx9: Fix LPCG number in ccm_reg structure
The LPCG number on iMX93 and iMX91 is 127 not 122. The wrong
value is used in ccm_reg structure and Coverity reports several
issues as out-of-bounds write.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-21 09:08:50 -03:00
Ye Li
9390876cc8 imx: imx8ulp: Call DM post init function for init_r phase
The ELE MU driver needs to be probed at init_r phase as well because
some ELE APIs will be called.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-09-21 09:07:58 -03:00
Ye Li
5c4e28e52f arm: dts: imx95-evk: set alias for enetc PCI buses
Use fixed seq 0 and 1 for enetc PCI buses, then the seq for PCI controllers
could start after them.

Signed-off-by: Ye Li <ye.li@nxp.com>
2025-09-20 17:46:15 -03:00
Ye Li
749f6762b4 arm: dts: imx95: Assign HSIOPLL_VCO as HSIOPLL parent clock
We have to explicitly assign HSIOPLL_VCO as HSIOPLL parent. So when
enabling HSIOPLL, its parent HSIOPLL_VCO will be enabled firstly.

Signed-off-by: Ye Li <ye.li@nxp.com>
2025-09-20 17:46:15 -03:00
John Ripple
b717a4090f imx8: Add ahab_commit command
The ahab_commit command allows the user to commit into the SECO fuses
that control the SRK key revocation information. This is used to Revoke
compromised SRK keys.

To use ahab_commit, the boot container must be built with an SRK
revocation bit mask that is not 0x0. For the SPSDK provided by NXP, this
means setting the 'srk_revoke_mask' option in the config file used to
sign the boot container. The 'ahab_commit 0x10' can then be used to commit
the SRK revocation information into the SECO fuses.

Signed-off-by: John Ripple <john.ripple@keysight.com>
2025-09-20 17:45:39 -03:00
Kunihiko Hayashi
d33b21b7e2 ARM: Remove mistyped GICV3 definition from ARCH_SYNQUACER
The config "GIC_V3" seems to be typo, and currently "GICV3" remains
disabled. This should be removed until needed.

Fixes: 5cd4a355e0f0 ("board: synquacer: Add DeveloperBox 96boards EE support")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
2025-09-20 12:02:58 -06:00
Tom Rini
464800d91b Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27673

- Switch to upstream devicetree for TH1520 platform
- Remove fdt_high env variable
- Support SMP on RISC-V cores with Zalrsc only
- Make MPFS Generic
- riscv: dts: starfive: prune redundant jh7110-common
2025-09-20 10:02:00 -06:00
E Shattow
10fdc2735d configs: starfive: Use visionfive2 DEVICE_TREE_INCLUDES dtsi named similar to defconfig
Add SYS_CPU automatic inclusion jh7110-u-boot.dtsi to item of config list
DEVICE_TREE_INCLUDES as starfive-visionfive2-u-boot.dtsi and rename file.

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:23:32 +08:00
E Shattow
b8732d30a4 riscv: dts: starfive: visionfive2 depend on SYS_CPU automatic dtsi inclusion
Drop visionfive2 per-board -u-boot.dtsi stubs and instead rely on
automatic inclusion of jh7110-u-boot.dtsi

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:23:32 +08:00
E Shattow
3e6d5b205d riscv: dts: starfive: sync visionfive2 overrides with upstream Linux for-next
Sync automatic dtsi inclusion overrides for JH7110 CPU with upstream
"riscv: dts: starfive: jh7110: bootph-pre-ram hinting needed by boot
loader" from upstream Linux conor/riscv-dt-for-next commit 8181cc2f3f21

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:23:32 +08:00
E Shattow
27f617019d riscv: dts: starfive: prune redundant jh7110-common overrides
Prune jh7110-common-u-boot.dtsi (clocks, qspi flash, eeprom, and
bootph-pre-ram hints now upstream since devicetree-rebasing v6.16).

In preparation for removal of per-dts jh7110-*-u-boot.dtsi replace include
by next dependency jh7110-u-boot.dtsi in automatic dtsi inclusion order.

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:23:32 +08:00
Greentime Hu
36d9587fa8 arch/riscv: Remove unused macro in encoding.h
This patch remove the unused macro DRAM_BASE.

Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:23:17 +08:00
Jamie Gibbons
d141a41feb board: microchip: icicle: rename all icicle files to generic
Make all Icicle Kit files generic. This supports the addition of
upcoming support for other MPFS boards.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:22:42 +08:00
Yao Zi
a681cfecb4 riscv: Add a Zalrsc-only alternative for synchronization in start.S
Add an alternative implementation that use Zalrsc extension only for
HART lottery and SMP locking to support SMP on cores without "Zaamo"
extension available. The Zaamo implementation is still prioritized if
both of them are available, since it takes fewer instructions.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:22:29 +08:00
Yao Zi
fde7702c9b riscv: Add Kconfig options to distinguish Zaamo and Zalrsc
Ratified on Apr. 2024, the original RISC-V "A" extension is now split
into two separate extensions, "Zaamo" for atomic operations and "Zalrsc"
for load-reserved/store-conditional instructions.

For now, we've already seen real-world designs implement the Zalrsc
extension only[2]. As U-Boot mainly runs with only one HART, we could
easily support these designs by not using AMO instructions in the
hard-written assembly if necessary, for which this patch introduces two
new Kconfig options to indicate the availability of "Zaamo" and "Zalrsc".

Note that even with this patch, "A" extension is specified in the ISA
string passed to the compiler as long as one of "Zaamo" or "Zalrsc" is
available, since they're only recognized with a quite recent version of
GCC/Clang. The compiler usually doesn't automatically generate atomic
instructions unless the source explicitly instructs it to do so, thus
this should be safe.

Link: d94c64c63e # [1]
Link: https://lore.kernel.org/u-boot/20250729162035.209849-9-uros.stajic@htecgroup.com/ # [2]
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:22:29 +08:00
Yao Zi
0d74bbfda3 dts: th1520: Switch to upstream devicetree
Imply OF_UPSTREAM in platform Kconfig option and adapt existing boards
to use the correct upstream devicetree paths.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-09-19 19:03:57 +08:00