[nord-staging-qcom-next] mach-snapdragon: Add Nord-Ride SPL boot support - #141
Merged
Gopinath Sekar (g-sekar) merged 8 commits intoSep 9, 2026
Conversation
…ELF options Add two Kconfig options needed by boards whose SPL is not loaded directly by PBL: - SPL_QCOM_BOOT_FROM_PBL: gates whether spl_boot_device() trusts the pbl_shared_data structure passed via r0. Boards loaded by an intermediate bootloader (e.g. PBL->XBL->U-Boot SPL) don't get valid PBL shared data in r0 and must rely on a board-specific spl_boot_device() override instead. Defaults to y to preserve existing behavior for boards loaded directly by PBL. - SPL_WRAPPER_ELF: enables wrapping the U-Boot SPL binary in a wrapper ELF for boards whose boot ROM / signing tool expects the SPL image embedded as an ELF segment. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
…COM_BOOT_FROM_PBL spl_boot_device() currently assumes the pbl_shared_data structure passed via r0 is always valid, which only holds when U-Boot SPL is loaded directly by PBL. On boards where SPL is loaded by an intermediate bootloader, r0 does not contain valid PBL shared data, so this parsing must be skipped in favor of a board-specific spl_boot_device() override. Wrap the existing boot-media detection logic in a check for CONFIG_SPL_QCOM_BOOT_FROM_PBL so it only runs when applicable. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Add the SPL variant of PINCTRL_QCOM_NORD so the Nord pinctrl/GPIO driver can be built into SPL, needed for Nord-Ride SPL to configure pins (e.g. for UFS) before DDR/full driver model bring-up. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Add the SPL defconfig for Nord-Ride dev boards using the "Linux Embedded" partition layout (dedicated "uefi" partition for edk2/ U-Boot). SPL loads a FIT image containing TF-A, OP-TEE and U-Boot proper from the "uefi_a" UFS raw partition and hands off to TF-A via CONFIG_SPL_ATF. SPL's memory region (0xbc180000-0xbc280000) lays out TEXT, the FIT load buffer, stack, and malloc/fastboot pool bottom-to-top with explicit gaps, validated on nord-ride hardware. UFS boot parameters (devnum 4, partition "uefi_a"/1) come from the target's confirmed partition table. CONFIG_SPL_QCOM_BOOT_FROM_PBL is left disabled since nord-ride boots via UFS raw partition rather than PBL, and CONFIG_SPL_WRAPPER_ELF/the 4K-aligned wrap-elf build is used to meet the board's boot ROM signing requirements. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Add the board-specific SPL bring-up for Nord-Ride: - spl-nord.c: nord-ride always boots the SPL FIT image from a fixed UFS raw partition rather than via PBL, so spl_boot_device() is hard-coded to BOOT_DEVICE_UFS instead of relying on pbl_shared_data (see SPL_QCOM_BOOT_FROM_PBL). Also provides board_init_f() to clear BSS, set up malloc, run early init and console, then hand off to board_init_r(). - nord-spl-wrap-elf.lds: linker script for the SPL_WRAPPER_ELF build, wrapping the SPL binary in a single 4K-aligned PT_LOAD segment as required by nord-ride's boot ROM / image-signing tool. - include/configs/nord.h: board config header (CONFIG_SYS_CONFIG_NAME target), currently empty aside from the include guard. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Some SPL FIT images carry an optional "toc_fdt" image node intended for BL32 (OP-TEE), used to locate the TOC FDT that OP-TEE consumes. This node is loaded into memory by the generic FIT loadables path regardless of QCOM_BOOT_FROM_PBL, but its load address was never communicated to BL32. Add qcom_spl_get_toc_fdt_address() to look up the "toc_fdt" node's load address from the FIT at CONFIG_SPL_LOAD_FIT_ADDRESS, and call it from bl2_plat_get_bl31_params_v2() so the address can be passed to BL32 via arg0. The node is optional: boards whose FIT carries no "toc_fdt" node are unaffected and BL32 receives arg0=0. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Nord-Ride boots the SPL FIT image from UFS, not MMC. Explicitly disable CONFIG_SPL_MMC so the MMC boot path is not built into SPL. Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
Print which image is being loaded from the FIT (spl_load_simple_fit's load_simple_fit()) and the BL31 entry address just before jumping (spl_invoke_atf's bl31_entry()). These give visibility into SPL's boot progress on platforms without more detailed boot logging, e.g. "Loading image: tfa" / "Loading image: uboot" / "Loading image: optee" and "Jumping to BL31 at 0x...". Signed-off-by: smadhesu <smadhesu@qti.qualcomm.com>
balajiselvanathan
force-pushed
the
nord_spl
branch
from
September 9, 2026 09:14
021936b to
83d8f95
Compare
Gopinath Sekar (g-sekar)
merged commit Sep 9, 2026
d809352
into
qualcomm-linux:nord-staging-qcom-next
1 of 2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series adds SPL boot support for Qualcomm Nord-Ride dev boards,
which boot U-Boot SPL's FIT image from a fixed UFS raw partition
rather than being loaded directly by PBL.