[PATCH v7 07/11] mach-snapdragon: Kconfig: changes / additions to support SPL
Michael Srba
Michael.Srba at seznam.cz
Mon May 11 15:28:29 CEST 2026
Hi,
On 5/11/26 15:05, Casey Connolly wrote:
> Hi Michael,
>
> On 08/05/2026 23:45, michael.srba at seznam.cz wrote:
>> From: Michael Srba <Michael.Srba at seznam.cz>
>>
>> Select SUPPORT_SPL so SPL build can be enabled, disable SYSRESET_PSCI in SPL.
>> (SPL runs in EL3, so if SPL itself doesn't provide PSCI, nothing else will.)
> I'm not sure if this was mentioned in a previous revision, but would it
> be possible to introduce a SNAPDRAGON_SPL kconfig (mayyybe in the
> mach-snapdragon kconfig?) to contain all the "if SPL" options and just
> simplify the list here? It just feels wrong to have half the options in
> the list be gated like this.
That is more or less what I did originally, but it was strongly opposed.
>
> It seems quite likely that we will end up with a few different SPL
> variants for snapdragon:
>
> 1. Your implementation for older SoCs doing many things from scratch
> 2. Qualcomms version for IoT more tightly integrated with TF-A
Well, that should mostly boil down to whether u-boot provides PSCI
or loads tf-a? Once someone REs all the stuff that qcom gets away with
hiding in blobs.
> 3. Another version I've seen where SPL is just used to chainload a full
> U-Boot and provide an extra level of redundancy
>
> These will all have slightly different requirements and code paths so
> being able to express this via kconfig seems like a good way to try and
> keep things manageable.
>
>> Also select (SPL_)OF_LIVE and DM_EVENT/SPL_EVENT, which are needed to fix up
>> upstream dt to make usb work.
>>
>> Mirror u-boot proper selections like GPIO and pinctrl to ensure consistent
>> behavior, and select SPL_SPRINTF, SPL_LIBCOMMON_SUPPORT etc for similar
>> reasons.
>>
>> Signed-off-by: Michael Srba <Michael.Srba at seznam.cz>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>> ---
>> arch/arm/Kconfig | 33 ++++++++++++++++++++++++++++++++-
>> arch/arm/mach-snapdragon/Kconfig | 10 ++++++++++
>> 2 files changed, 42 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index f624675eadf..8e818071df6 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -1135,6 +1135,7 @@ config ARCH_SNAPDRAGON
>> bool "Qualcomm Snapdragon SoCs"
>> select ARM64
>> select DM
>> + select DM_EVENT if USB_DWC3_GENERIC
>> select DM_GPIO
>> select DM_SERIAL
>> select DM_RESET
>> @@ -1149,9 +1150,39 @@ config ARCH_SNAPDRAGON
>> select SAVE_PREV_BL_FDT_ADDR if !ENABLE_ARM_SOC_BOOT0_HOOK
>> select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
>> select SYSRESET
>> - select SYSRESET_PSCI
>> + select SYSRESET_PSCI if !SPL
>> select ANDROID_BOOT_IMAGE_IGNORE_BLOB_ADDR
>> select MMU_PGPROT
>> + select SUPPORT_SPL
>> +
>> + select OF_LIVE if USB_DWC3_GENERIC
>> + select SPL_OF_LIVE if SPL_USB_DWC3_GENERIC
>> + select ARMV8_SPL_EXCEPTION_VECTORS if SPL
>> + select ENABLE_ARM_SOC_BOOT0_HOOK if SPL
>> + select SPL_DM if SPL
>> + select SPL_DM_GPIO if SPL
>> + select SPL_DM_PMIC if SPL
>> + select SPL_DM_USB_GADGET if SPL
>> + select SPL_ENV_SUPPORT if SPL
>> + select SPL_EVENT if SPL_USB_DWC3_GENERIC
>> + select SPL_GPIO if SPL
>> + select SPL_HAS_BSS_LINKER_SECTION if SPL
>> + select SPL_LIBCOMMON_SUPPORT if SPL
>> + select SPL_LIBDISK_SUPPORT if SPL
>> + select SPL_LIBGENERIC_SUPPORT if SPL
>> + select SPL_OF_CONTROL if SPL
>> + select SPL_PINCONF if SPL
>> + select SPL_PINCTRL if SPL
>> + select SPL_PINCTRL_FULL if SPL
>> + select SPL_PINCTRL_GENERIC if SPL
>> + select SPL_PINCONF_RECURSIVE if SPL
>> + select SPL_PINMUX if SPL
>> + select SPL_SPMI if SPL
>> + select SPL_SPMI_MSM if SPL
>> + select SPL_SPRINTF if SPL
>> + select SPL_STRTO if SPL
>> + select SPL_USB_GADGET if SPL
>> + imply SPL_MMC if SPL
>> imply OF_UPSTREAM
>> imply CMD_DM
>> imply DM_USB_GADGET
>> diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
>> index c195d478512..a2228e217af 100644
>> --- a/arch/arm/mach-snapdragon/Kconfig
>> +++ b/arch/arm/mach-snapdragon/Kconfig
>> @@ -14,6 +14,9 @@ config SYS_VENDOR
>> config SYS_MALLOC_F_LEN
>> default 0x2000
>>
>> +config SPL_SYS_MALLOC_F
>> + default y
>> +
>> config SPL_SYS_MALLOC_F_LEN
>> default 0x2000
>>
>> @@ -39,6 +42,13 @@ config SYS_CONFIG_NAME
>> Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header
>> will be used for board configuration.
>>
>> +config SPL_SHARES_INIT_SP_ADDR
>> + # override the default from common/spl/Kconfig
>> + default n
>> +
>> +config SPL_HAVE_INIT_STACK
>> + default y
>> +
>> choice
>> prompt "Qualcomm boot0.h workaround"
>> optional
>>
More information about the U-Boot
mailing list