Repository navigation
Conversation
gde-hue
force-pushed
the
nord-reboot-bootloader
branch
3 times, most recently
from
September 30, 2026 11:55
6511178 to
5a6c834
Compare
Gopinath Sekar (g-sekar)
approved these changes
Sep 30, 2026
gde-hue
force-pushed
the
nord-reboot-bootloader
branch
from
October 1, 2026 05:43
5a6c834 to
d4ff9a1
Compare
Add documentation for snagboot mode support on Qualcomm platforms. This covers the architecture, execution flow, and board enablement requirements. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
The driver reads ownership registers from the wrong address for V5. The ownership table is at offset 0x700 from spmi_cnfg base, not 0x0. This causes incorrect peripheral ownership detection and potential access violations. Add the missing 0x700 offset to match the kernel driver [1] [1] https://github.com/torvalds/linux/blob/4b99990cdf9560e8a071640baf19f312e6ae02f4/drivers/spmi/spmi-pmic-arb.c#L1737 Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
When CONFIG_SKIP_EARLY_DM is enabled and no clock driver is available during early serial init, devm_clk_get_optional() returns an error pointer. The original code attempted to enable this error pointer, causing a crash. Fix by checking for both error pointers and NULL before calling clk_enable(), using IS_ERR_OR_NULL() to handle all cases properly. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Enable CONFIG_SKIP_EARLY_DM to skip device model initialization during pre-relocation phase, improving boot time by around 50% by deferring device probing until after relocation Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Add a FIT (Flattened Image Tree) image template for Qualcomm platforms that use SPL to load a complete boot chain with pre-DDR and post-DDR stages. Pre-DDR initialization components (pre-ddr-config): - QC Config segments (qcconfig_1-4, qcconfig-meta) - QC Lib segments (qclib_1-2, qclib-meta) Post-DDR components (post-ddr-config): - ARM Trusted Firmware (TF-A/BL31) - OP-TEE (BL32) - U-Boot proper (BL33) The FIT image can be built using: mkimage -f board/qualcomm/fit_spl.its fit_spl.itb The default configuration is set to post-ddr config for standard boot flow, with pre-ddr config available for platforms requiring early DDR initialization. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Using length field exposes dynamic carveout regions to kernel, causing crashes when accessing these reserved memory areas. Subsystems like hypervisor perform runtime carveouts recorded in SMEM. RAM partition table v2+ includes available_length field which reflects memory available after these dynamic carveouts, while length field represents total partition size. Switch to available_length for v2+ to exclude carveout regions. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Allow SetVariable at runtime on U-Boot's in-RAM EFI variable store so the OS can write EFI variables via efivarfs. With this enabled U-Boot also advertises EFI_RT_SUPPORTED_SET_VARIABLE and exposes the RTStorageVolatile and VarToFile variables, which userspace tools such as efivar use to persist runtime changes back to the ubootefi.var store on the ESP across reboots. EFI_RT_VOLATILE_STORE depends on EFI_VARIABLE_FILE_STORE; select it explicitly so the option is not silently dropped if that default changes. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add a common configuration fragment enabling RSA-based FIT image signature verification and the required hash algorithms, for reuse across Qualcomm boards that verify a signed kernel FIT image (kernel + DTB + initramfs) as part of verified boot. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add a generic driver that binds to a U-Boot-only "qcom,hwinfo" DT node holding phandles to the existing IMEM/TCSR syscon nodes plus per-SoC offsets. This provides a common interface for reading the IMEM boot cookie (used to detect boot storage type) and the TCSR SOC_HW_VERSION register. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Add qcom_hwdetect, a helper that aggregates hardware parameters (chip ID, chip version, board version, platform, subtype, OEM variant, foundry ID, DDR size type, storage type) from SMEM, TCSR, and IMEM into a single struct qcom_hw_params. This is intended for consumption by FIT multi-DTB selection and other subsystems that need a unified view of hardware identification data. Depends on the qcom,hwinfo driver for IMEM/TCSR register access. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Add support for automatically selecting the correct DTB from a FIT image based on hardware parameters detected at runtime via SMEM, TCSR, and IMEM. The FIT image (qclinux_fit.img) is loaded from the "dtb_a" raw GPT partition. A metadata DTB embedded as the first FIT image is parsed to build a "bucket list" of matching identifiers based on detected hardware (OEM, SoC, SoC version, board, board revision, peripheral subtype, storage type, DDR size, soft SKU). FIT configurations are then scored against this bucket list via their "compatible" string, and the best-matching configuration's DTB (plus any listed overlays) is loaded, overlaid, and installed via the "fdt_addr" environment variable for the EFI boot flow to consume. This is gated behind CONFIG_QCOM_FIT_MULTIDTB and is a no-op unless both the config is enabled and hardware detection succeeds, so it is safe to enable without affecting boards that don't need it. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Enable FIT multi-DTB selection and its OF_LIBFDT_OVERLAY dependency by default. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Add the "qcom,hwinfo" DT node with the appropriate IMEM boot-cookie and TCSR HW-version offsets for each board, enabling FIT multi-DTB selection (CONFIG_QCOM_FIT_MULTIDTB) to detect hardware parameters at boot time. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
EDK2-based bootloaders on Qualcomm platforms place the FIT image (qclinux_fit.img) on a FAT filesystem partition rather than a raw GPT partition. Add a FAT loading path as a workaround to maintain compatibility with such bootloaders. This FAT loading path is a temporary workaround and will be removed once EDK2 and other bootloaders are updated to place the FIT image in the raw dtb partitions. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
part_get_info() calls find_valid_gpt() -> alloc_read_gpt_entries(), which re-reads the entire GPT partition-entry array from disk on every call once per partition while looking up each partition during boot. This happens because blkcache_fill() skips caching reads larger than max_blocks_per_entry (default: 8 blocks/4KiB), and the GPT entry array is bigger than that, so it never gets cached and every call triggers a fresh eMMC read. Raise the per-entry block-cache limit to cover the full GPT table (computed from CONFIG_EFI_PARTITION_ENTRIES_NUMBERS) so it is cached after the first read, turning subsequent GPT entry reads into cache hits and avoiding redundant eMMC accesses. Improves boot time by ~800ms on eMMC-based devices. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Include the platform-specific debug configuration fragments in qcm6490_defconfig and qcom_lemans_defconfig. This enables debug UART support by default for these Qualcomm platforms during U-Boot build. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
sa8775p was being handled by the generic clock stub, which just no-ops every request. The RPMH_CXO_CLK (bi_tcxo_div2) it exposes is identical on SM8550, SM8650 and SA8775P, so rather than bury it in the sa8775p GCC driver, add a dedicated standalone RPMH clock driver shared by all three SoCs. It reports the fixed CXO rate and accepts no-op enable/set_rate requests. Drop the sm8550/sm8650/sa8775p rpmh-clk compatibles from the generic clock stub now that they are handled by the real driver. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Extend the QCS8300 GCC driver with the remaining RCGs (USB2/USB3, UFS PHY, SDCC1, QUPv3 wrap0/wrap1/wrap3 SE clocks, GP1-5, PDM2, EMAC0, PCIe0/1) and their gate clocks. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add pinctrl support for QCS8300. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add the interconnect (NoC) driver for QCS8300. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
The kernel DTB for Monaco is missing several regions that XBL/TZ reserve on real hardware (sail SS/MD/OTA, hyp, xbl boot/dt, uefi log, gearvm smem, tags, trusted apps, tz stat, cpucp fw). Without marking as reserved, kernel uses these regions and crashes. So, add these missing regions in U-Boot DTS and then add these regions as reserved in EFI mem map that gets passed to kernel. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
monaco-pmics.dtsi has no PON/SDAM reboot-reason storage, so U-Boot can't read the reboot-reason to tell if it should stop in fastboot instead of booting the kernel. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add qcom_hwinfo in monaco-evk DTS to support FIT based multi-DTB selection for monaco-evk. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
vreg_l8a is the shared VCC rail for UFS (ufs_mem_hc vcc-supply) and eMMC (sdhc_1 vmmc-supply). UFS holds no regulator vote of its own in U-Boot, so nothing stops other consumers from disabling the rail while UFS still needs it. eMMC's power-cycle runs after UFS has already linked up and started transferring data. Its power-off fires a real disable vote on vreg_l8a, glitching UFS VCC while the link is live. UFS has no recovery from this: every following command fails (OCS errors, UTP timeouts, "Card did not respond to voltage select! : -110"). Force the rail always-on so the disable vote is rejected in regulator_set_enable() (-EACCES) before it reaches the RPMh driver. eMMC is non-removable and does not need a real power-cycle. Signed-off-by: Balaji Selvanathan <bselvana@qti.qualcomm.com>
Point qcom_qcs8300_defconfig at the monaco-evk device tree and turn on required drivers. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
…status flags" This reverts commit 0169263. Revert the fix did for Talos where it stops at U-Boot prompt if debug cable is disconnected. But this was causing instability (hangs) during fastboot console input in U-Boot prompt. Hence reverting this fix.
mmu_change_region_attr_nobreak() updates only the primary page table, leaving the emergency page table with stale attributes. The emergency table is used temporarily while the primary page table is being updated. As a result, speculative accesses can reach regions that were intended to be blocked in the primary table, leading to XPU violations. Update both primary and emergency page tables when modifying region attributes to keep mappings consistent regardless of the active translation table. Since splits can now happen in both the primary and emergency tables, double the number of page tables get_page_table_size() reserves for runtime splits. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
gde-hue
force-pushed
the
nord-reboot-bootloader
branch
2 times, most recently
from
October 28, 2026 06:31
734f514 to
f58bd79
Compare
Enable CONFIG_TEE, CONFIG_OPTEE and CONFIG_OPTEE_LIB in Shikra U-Boot defconfig to support OP-TEE integration. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
gde-hue
force-pushed
the
nord-reboot-bootloader
branch
from
October 28, 2026 09:33
f58bd79 to
dc875de
Compare
Add support for loading the Config/Chip Data Table (CDT) from eMMC during the Shikra SPL boot flow and registering it with QCLIB via the interface table. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Enabled CDT related configs for supporting the feature in Shikra. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Gopinath Sekar (g-sekar)
approved these changes
Oct 29, 2026
Decode the Shikra boot configuration once and use the selected device for MMC preparation, FIT partition lookup, SPL boot-device reporting, QUPFW media preparation, and pre-DDR loading. Map eMMC to MMC1/sequence 0 and SD to MMC2/sequence 1. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Add support for: Reading DDR training data from eMMC during Shikra boot flow and sending it to QcLIB via interface table. Saving DDR training data in eMMC when QcLIB performs DDR training and sends the data via interface table. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Enabled DDR training related configs for supporting the feature in Shikra. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Increase CONFIG_SPL_SYS_MALLOC_F_LEN from 0x38000 to 0x40000.
Expose SPL_PINCTRL_QCOM_NORD so the Nord pinctrl and GPIO driver can be used during SPL boot.
Add the Nord Ride SPL entry points for the XBL-to-SPL boot flow. XBL has already initialized DDR, so Nord skips the generic pre-DDR and QCLIB path, reports UFS as the boot device, and proceeds directly to board_init_r. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Print the FIT image name as it is loaded and the BL31 entry address before handoff. This provides visibility during SPL bring-up on Qualcomm chainloaded platforms. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Pass the optional toc_fdt image address to BL32 through arg0 when preparing the TF-A parameter list for Nord. Keep the common weak implementation as the fallback for other platforms. Use Nord\047s strong implementation to preserve the QCSDI-to-BL31 handoff and perform the board-specific TOC FDT fixup. Move the TOC FDT FIT lookup into a helper used by Nord. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Add the Nord SPL linker script and board configuration. Use the existing SPL_REMAKE_ELF infrastructure for the Nord-specific wrapper ELF layout and 4 KiB page alignment. Update the top-level Makefile for the board configuration. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Add the Nord Ride SPL defconfig for loading TF-A, OP-TEE, and U-Boot FIT from the UFS uefi_a partition. Use SPL_REMAKE_ELF with a Nord-specific single-segment linker script and 4 KiB page alignment required by the Nord signing flow. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
Retain the clocks, Nord clock controller, UFS PHY and controller, pinctrl, SMEM, debug UART, QUP wrapper in the SPL device tree. These nodes are required for Nord Ride UFS boot and early console initialization. Signed-off-by: Abhilash V <abhilash.v@oss.qualcomm.com>
MBN generation is enabled for Nord SPL, so wrap lds file is not required. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Enabled MBN related configs for supporting SPL MBN generation. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Makefile changes and MBN tool changes to support SPL MBN generation. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Added required checks for CDT compilation for all targets. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
Added required checks for DDR compilation for all targets. Signed-off-by: KR Sowmiya <kr.sowmiya@oss.qualcomm.com>
A choice entry is defined twice in the same configuration file, causing Kconfig to repeatedly prompt during oldconfig when used with defconfigs. Remove the duplicate entry so configuration generation converges correctly and oldconfig completes without re-prompting. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Add the SPMI arbiter and PMIC SDAM nodes needed to reach the reboot-reason cell, and a nvmem-reboot-mode node so U-Boot can set it and reboot into the bootloader on request. The changes need to be pushed to kernel first. So till that time, adding "workaround" tag for this commit. Signed-off-by: Deepak G <deepak.g10@oss.qualcomm.com>
gde-hue
force-pushed
the
nord-reboot-bootloader
branch
from
November 6, 2026 06:37
dc875de to
4f10f20
Compare
Gopinath Sekar (g-sekar)
force-pushed
the
qcom-next
branch
2 times, most recently
from
November 19, 2026 14:14
6c944b6 to
f64b602
Compare
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.
workaround: Add the SPMI arbiter and PMIC SDAM nodes needed to reach the reboot-reason cell, and a nvmem-reboot-mode node so U-Boot can set it and reboot into the bootloader on request.
The changes need to be pushed to kernel first. So till that time, adding "workaround" tag for this commit.