From 89c45ac58e8f2f9ba8d54ebea82b3664dcbd7db9 Mon Sep 17 00:00:00 2001 From: smadhesu Date: Tue, 8 Sep 2026 15:25:34 +0530 Subject: [PATCH 1/2] arm64: dts: qcom: nord-ride: Tag SPL-required nodes with bootph-all nord-ride's SPL FDT is trimmed to only the nodes tagged bootph-all. Tag the root clock inputs (xo_board_clk, sleep_clk), the negcc clock controller, tlmm (pinctrl, needed for UFS reset-gpios), ufs_mem_phy, ufs_mem_hc, the debug UART and its parent qupv3_0 wrapper, smem, and its reserved-memory carveout, so all of these survive into the SPL FDT instead of being trimmed away. Signed-off-by: smadhesu --- arch/arm/dts/nord-ride-u-boot.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/nord-ride-u-boot.dtsi b/arch/arm/dts/nord-ride-u-boot.dtsi index 66500a979e9d..fdc91473817a 100644 --- a/arch/arm/dts/nord-ride-u-boot.dtsi +++ b/arch/arm/dts/nord-ride-u-boot.dtsi @@ -15,6 +15,14 @@ #include +&xo_board_clk { + bootph-all; +}; + +&sleep_clk { + bootph-all; +}; + / { negcc: clock-controller@8900000 { compatible = "qcom,nord-negcc"; @@ -22,6 +30,7 @@ #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>; + bootph-all; }; ufs_mem_phy: phy@1d40000 { @@ -38,11 +47,13 @@ #phy-cells = <0>; status = "okay"; + bootph-all; }; smem { compatible = "qcom,smem"; memory-region = <&smem_region>; + bootph-all; }; sram: sram@146d8000 { @@ -71,9 +82,14 @@ smem_region: smem-region@89b00000 { reg = <0x0 0x89b00000 0x0 0x400000>; no-map; + bootph-all; }; }; +&tlmm { + bootph-all; +}; + &ufs_mem_hc { compatible = "qcom,sa8797p-ufshc", "qcom,sa8255p-ufshc", @@ -101,6 +117,8 @@ phys = <&ufs_mem_phy>; phy-names = "ufsphy"; + + bootph-all; }; &uart4 { @@ -113,12 +131,14 @@ compatible = "qcom,sa8797p-geni-debug-uart", "qcom,sa8255p-geni-debug-uart", "qcom,geni-debug-uart"; + bootph-all; }; &qupv3_0 { compatible = "qcom,sa8797p-geni-se-qup", "qcom,sa8255p-geni-se-qup", "qcom,geni-se-qup"; + bootph-all; }; &qupv3_1 { From 22f4dd560436954e91c916bed5720434cb793f6a Mon Sep 17 00:00:00 2001 From: smadhesu Date: Tue, 8 Sep 2026 15:43:28 +0530 Subject: [PATCH 2/2] mach-snapdragon: Makefile.xpl: Use 4K page size for nord wrap-elf nord-ride's boot ROM / image-signing tool requires the wrapper ELF's single PT_LOAD segment to be 4K-aligned. Guard the added linker flags behind QCOM_SPL_SOC == nord so this only affects nord's wrap-elf build and does not regress lemans/shikra/ipq5210, which also use the wrap-elf mechanism but don't need this alignment. Signed-off-by: smadhesu --- scripts/Makefile.xpl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl index a3fd3e1375f7..23a19b72d9ec 100644 --- a/scripts/Makefile.xpl +++ b/scripts/Makefile.xpl @@ -256,6 +256,30 @@ MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) \ -n "$(shell cd $(srctree); readlink -f $(CONFIG_PMUFW_INIT_FILE))" endif +ifeq ($(CONFIG_SPL_WRAPPER_ELF),y) +# Convert ELF to object file +OBJCOPYFLAGS_$(SPL_BIN).bin.o = -I binary -O elf64-littleaarch64 + +# Wrap the object file inside a ELF +QCOM_SPL_SOC = $(shell echo $(notdir "$(CONFIG_DEFAULT_DEVICE_TREE)") | cut -f1 -d-) +QCOM_SPL_WRAP_LDS = $(srctree)/arch/arm/mach-snapdragon/$(QCOM_SPL_SOC)-spl-wrap-elf.lds +LDFLAGS_$(SPL_BIN).wrap-elf = -T $(obj)/$(SPL_BIN).wrap-elf.lds + +ifeq ($(QCOM_SPL_SOC),nord) +LDFLAGS_$(SPL_BIN).wrap-elf += -z common-page-size=0x1000 -z max-page-size=0x1000 +endif + +$(obj)/$(SPL_BIN).wrap-elf.lds: $(QCOM_SPL_WRAP_LDS) FORCE + $(call if_changed_dep,cpp_lds) + +$(obj)/$(SPL_BIN).bin.o: $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN).wrap-elf.lds FORCE + $(call if_changed,objcopy) + +$(obj)/$(SPL_BIN).wrap-elf: $(obj)/$(SPL_BIN).bin.o FORCE + $(call if_changed,ld) + +endif + $(obj)/$(SPL_BIN)-align.bin: $(obj)/$(SPL_BIN).bin @dd if=$< of=$@ conv=sync bs=4 2>/dev/null; @@ -302,6 +326,10 @@ INPUTS-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin INPUTS-$(CONFIG_ARCH_MEDIATEK) += $(obj)/u-boot-spl-mtk.bin +ifeq ($(CONFIG_ARCH_SNAPDRAGON),y) +INPUTS-$(CONFIG_SPL_WRAPPER_ELF) += $(obj)/u-boot-spl.wrap-elf +endif + all: $(INPUTS-y) quiet_cmd_cat = CAT $@