Skip to contentSkip to conversation

Add U-Boot SPL support for Lemans EVK

PATCH New Balaji Selvanathan 1 participant 3 messages Jun 6 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover Add U-Boot SPL support for Lemans EVK

This series adds initial U-Boot SPL support, enabling the SPL to load a FIT image containing TF-A, OP-TEE and U-Boot proper from the "uefi_a" UFS partition and hand off to TF-A.

Patch 1 adds the U-Boot DTS overlay for the Lemans EVK. Patch 2 adds the SPL defconfig for the Lemans EVK.

---
Balaji Selvanathan (2):
arm: dts: qcom: Add Lemans EVK U-Boot DTS overlay for SPL
configs: qcom: Add qcom_lemans_spl_defconfig for Lemans EVK

 arch/arm/dts/lemans-evk-u-boot.dtsi |  63 ++++++++++++++++++++++
 configs/qcom_lemans_spl_defconfig   | 104 ++++++++++++++++++++++++++++++++++++
 2 files changed, 167 insertions(+)

---
base-commit: 75daa277941702bf58c88d65c0cb6ed962899d9e
change-id: 20260606-lemans_spl-7c6231c164c6

Best regards,

Signature · 1 line
Balaji Selvanathan <[email protected]>
#1 lore raw

PATCH 1/2 arm: dts: qcom: Add Lemans EVK U-Boot DTS overlay for SPL

Add the U-Boot DTS overlay for the Lemans EVK board.
Mark the required nodes with bootph-all to make them available in the SPL device tree. This covers the UFS host controller and PHY, GCC and RPMH clock controllers, Apps RSC, UART10 console, and the TLMM GPIO controller. A static memory layout is defined temporarily until the changes to get memory information from SMEM ([1]) gets merged.

[1] https://lore.kernel.org/u-boot/[email protected]/

---
 arch/arm/dts/lemans-evk-u-boot.dtsi | 63 +++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm/dts/lemans-evk-u-boot.dtsi new file +63 -0
new file mode 100644
index 00000000000..12fe2171f10
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+/ {
+	/* Will be removed when bootloader updates later */
+	memory@80000000 {
+		device_type = "memory";
+		bootph-all;  /* Include memory node in SPL DTB */
+		reg = <0x0 0x80000000 0x0 0x3ee00000>,
+		      <0x0 0xc0000000 0x0 0x04d00000>,
+		      <0xd 0x00000000 0x2 0x54100000>,
+		      <0xa 0x80000000 0x1 0x52d00000>,
+		      <0x9 0x00000000 0x1 0x80000000>,
+		      <0x1 0x00000000 0x2 0xf7500000>,
+		      <0x0 0xd0000000 0x0 0x00100000>,
+		      <0x0 0xd3500000 0x0 0x07c00000>,
+		      <0x0 0xdb300000 0x0 0x24d00000>;
+	};
+
+	clocks {
+		/* Fixed clocks needed by GCC */
+		xo_board_clk {
+			bootph-all;
+		};
+
+		sleep_clk {
+			bootph-all;
+		};
+	};
+};
+
+&ufs_mem_hc {
+	bootph-all; /* Enable UFS for SPL */
+};
+
+&ufs_mem_phy {
+	bootph-all;
+};
+
+&gcc {
+	bootph-all; /* Enable GCC for SPL */
+};
+
+/* RPMH clock controller - required by GCC */
+&rpmhcc {
+	bootph-all;
+};
+
+/* Apps RSC - parent of rpmhcc and rpmhpd */
+&apps_rsc {
+	bootph-all;
+};
+
+/* UART10 - console serial port */
+&uart10 {
+	bootph-all;
+};
+
+&tlmm {
+	bootph-all;   /* Make TLMM GPIO controller available in SPL */
+};
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 configs: qcom: Add qcom_lemans_spl_defconfig for Lemans EVK

In reply to Balaji Selvanathan

Add SPL defconfig for the Lemans EVK board. The SPL loads a FIT image containing TF-A, OP-TEE and U-Boot proper from the "uefi_a" UFS partition and hands off to TF-A.

---
 configs/qcom_lemans_spl_defconfig | 104 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
configs/qcom_lemans_spl_defconfig new file +104 -0
new file mode 100644
index 00000000000..06626e27323
@@ -0,0 +1,104 @@
+# Configuration for building U-Boot to be flashed
+# to the uefi partition of Lemans-EVK dev boards with
+# the "Linux Embedded" partition layout (which have
+# a dedicated "uefi" partition for edk2/U-Boot)
+
+#include "qcom_defconfig"
+
+# Address where U-Boot proper will be loaded
+CONFIG_TEXT_BASE=0xaf000000
+CONFIG_REMAKE_ELF=y
+CONFIG_FASTBOOT_BUF_ADDR=0xdb300000
+CONFIG_DEFAULT_DEVICE_TREE="qcom/lemans-evk"
+CONFIG_ENV_IS_IN_SCSI=y
+CONFIG_ENV_SCSI_PART_USE_TYPE_GUID=y
+# SCSI partition type GUID for logfs partition
+CONFIG_ENV_SCSI_PART_TYPE_GUID="bc0330eb-3410-4951-a617-03898dbe3372"
+# CONFIG_ENV_IS_DEFAULT is not set
+# CONFIG_ENV_IS_NOWHERE is not set
+
+# SPL configurations for Lemans-EVK
+# Purpose: Load FIT image (containing TFA, OPTEE and U-Boot proper)
+# from UFS storage and jump to next image (TFA)
+
+CONFIG_SPL=y
+CONFIG_SPL_BUILD=y
+CONFIG_SPL_FRAMEWORK=y
+
+CONFIG_SPL_TEXT_BASE=0x1c100000
+CONFIG_SPL_MAX_SIZE=0x60000
+CONFIG_SPL_BSS_LIMIT=y
+CONFIG_SPL_BSS_MAX_SIZE=0x10000
+# CONFIG_SPL_SEPARATE_BSS is not set
+
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SPL_HAVE_INIT_STACK=y
+CONFIG_SPL_STACK=0xD7300000
+
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x80000
+CONFIG_SPL_SYS_MALLOC=y
+CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
+CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0xdb300000
+CONFIG_SPL_SYS_MALLOC_SIZE=0x10000
+
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+
+CONFIG_SPL_DM=y
+CONFIG_SPL_OF_LIBFDT=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_SPL_OF_REAL=y
+CONFIG_SPL_SIMPLE_BUS=y
+
+CONFIG_SPL_DM_RESET=y
+
+CONFIG_SPL_CLK=y
+
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_DM_GPIO=y
+
+CONFIG_SPL_UFS=y
+CONFIG_SPL_UFS_QCOM=y
+
+CONFIG_SPL_UFS_RAW_U_BOOT_DEVNUM=4
+CONFIG_SPL_UFS_RAW_U_BOOT_SECTOR=0x0
+CONFIG_SPL_UFS_RAW_U_BOOT_USE_PARTITION=y
+CONFIG_SPL_UFS_RAW_U_BOOT_PARTITION_NAME="uefi_a"
+CONFIG_SPL_UFS_RAW_U_BOOT_PARTITION_NUM=1
+
+CONFIG_SPL_PARTITIONS=y
+CONFIG_SPL_DOS_PARTITION=y
+CONFIG_SPL_CHARSET=y
+
+CONFIG_SPL_PHY=y
+CONFIG_SPL_PHY_QCOM_QMP_UFS=y
+
+CONFIG_SPL_POWER=y
+CONFIG_SPL_POWER_DOMAIN=y
+
+CONFIG_SPL_LOAD_FIT=y
+
+CONFIG_SPL_ATF=y
+
+CONFIG_SPL_REMAKE_ELF=y
+
+CONFIG_COUNTER_FREQUENCY=19200000
+
+# CONFIG_SAVE_PREV_BL_FDT_ADDR is not set
+# CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set
+CONFIG_SPL_ATF_LOAD_IMAGE_V2=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
+CONFIG_SPL_HAS_LOAD_FIT_ADDRESS=y
+CONFIG_SPL_LOAD_FIT_ADDRESS=0xB0800000
+CONFIG_SPL_FRAMEWORK_BOARD_INIT_F=y
+
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_MISC=y
+CONFIG_SPL_QCOM_GENI=y
+CONFIG_SPL_MSM_GENI_SERIAL=y
+
+CONFIG_SPL_BANNER_PRINT=y
+CONFIG_SPL_CLK_STUB=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_SPL_PINCTRL_QCOM_SA8775P=y
Signature · 1 line
2.34.1