arm: snapdragon: Add snagboot support for Lemans-EVK
Get series with b4
b4 am [email protected] change-id 20260731-snagboot-4e9f66f0252dVersions newest first
- v10 Latest7 patches 2 repliesIn review
- v98 patches 16 repliesSuperseded
- v88 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v7 | 8 patches | 4 replies | Superseded | |
| v6 | 8 patches | 0 replies | Superseded | |
| v5 | 8 patches | 0 replies | Superseded |
Changes in v10 from the cover letter
- Drop the CONFIG_ARM_SMCCC guards patch, SYSRESET_PSCI is already
off in snagboot mode so the PSCI functions are not built
- Depend on ENV_IS_DEFAULT instead of selecting ENV_IS_NOWHERE
- Drop depends on !ENV_IS_IN_SCSI, !PSCI_RESET, !SAVE_PREV_BL_INITRAMFS_START_ADDR, COUNTER_FREQUENCY != 0 and
TEXT_BASE != 0
- Replace the cmd-db.c change with a patch that lets QCOM_RPMH build
without QCOM_COMMAND_DB, and disable QCOM_COMMAND_DB in the snagboot
config fragment
- Fix the title underline in the snagboot doc
- Shorten the cover letter and link to the snagrecover IQ9075 docs
- Link to v9: https://lore.kernel.org/r/[email protected]
Patches in v10 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | arm: snapdragon: Make SYSRESET_PSCI optionalarch/ | +1 | 0 replies | |
| 2/7 | arm: snapdragon: Disable MMU early before U-Boot reset vectorarch/ arch/ | +29 | 0 replies | |
| 3/7 | arm: snapdragon: Add CONFIG_QCOM_SNAGBOOT_MODE optionarch/ | +14 | 0 replies | |
| 4/7 | soc: qcom: Allow RPMh to be built without Command DBdrivers/ include/ | +7 | 0 replies | |
| 5/7 | arch: arm: dts: remove Lemans EVK override DTSarch/ | +0 | 0 replies | |
| 6/7 | configs: add qcom_lemans_snagboot_defconfig for Lemans-EVKconfigs/ configs/ | +33 | 0 replies | |
| 7/7 | doc: qualcomm: Add snagboot mode documentationdoc/ doc/ | +85 | 0 replies |
Reviews trailers per patch
1 of 7 patches has a Reviewed-by or Acked-by.
| Patch | Varadarajan Narayanan |
|---|---|
| 1/7 | R-b |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v10 0/7] arm: snapdragon: Add snagboot support for Lemans-EVK
This series adds support for running U-Boot in snagboot mode on Qualcomm Snapdragon platforms, targeting the Lemans-EVK board.
Snagboot (https://github.com/bootlin/snagboot) is a recovery and reflashing tool that works through the SoC boot ROM. On Qualcomm SoCs, snagrecover loads XBL over Sahara in EDL mode to initialise DDR and then loads U-Boot into DDR, where it enters fastboot so that snagflash can write the images. Support for the Lemans-EVK (IQ9075) is in the snagboot tree, see the Qualcomm IQ9075 sections of
https://github.com/bootlin/snagboot/blob/main/docs/snagrecover.md
See also the doc/board/qualcomm/snagboot.rst added in patch 7 for usage and build steps.
XBL leaves the MMU enabled and does not set up PSCI firmware or Command DB in this flow, so the series adds a QCOM_SNAGBOOT_MODE option, an early MMU disable, and a defconfig and config fragment for Lemans-EVK.
Tested on Lemans-EVK board.
---
Changes in v10:
- Drop the CONFIG_ARM_SMCCC guards patch, SYSRESET_PSCI is already
off in snagboot mode so the PSCI functions are not built
- Depend on ENV_IS_DEFAULT instead of selecting ENV_IS_NOWHERE
- Drop depends on !ENV_IS_IN_SCSI, !PSCI_RESET, !SAVE_PREV_BL_INITRAMFS_START_ADDR, COUNTER_FREQUENCY != 0 and
TEXT_BASE != 0
- Replace the cmd-db.c change with a patch that lets QCOM_RPMH build
without QCOM_COMMAND_DB, and disable QCOM_COMMAND_DB in the snagboot
config fragment
- Fix the title underline in the snagboot doc
- Shorten the cover letter and link to the snagrecover IQ9075 docs
- Link to v9: https://lore.kernel.org/r/[email protected]
Changes in v9:
- Drop the assumption that snagboot mode needs IOMMU disabled:
QCOM_SNAGBOOT_MODE no longer depends on !IOMMU and
qcom-snagboot.config no longer sets CONFIG_IOMMU=n
- Link to v8: https://lore.kernel.org/r/[email protected]
Changes in v8:
- Make changes in documentation
- Link to v7: https://lore.kernel.org/r/[email protected]
Changes in v7:
- Rebased on top of latest main branch
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- Forget to send summary in v5 cover letter, no other changes in v6
- Link to v5: https://marc.info/?l=u-boot&m=178577208345353&w=2
Changes in v5:
- Make QCOM_BOOT0_SNAGBOOT_MODE as hidden config dependent on
QCOM_SNAGBOOT_MODE
- Disable C (Dcache) bit of SCTLR_EL3 register during MMU disable
- Remove now unused QCOM_COMMAND_DB_OPTIONAL Kconfig definition
- Disable unnecessar I2C configs (for Snagboot) in Qcom Snagboot
config fragment
- Add build steps for compiling U-Boot for Snagboot mode in
Qcom Snagboot doc
- Link to v4: https://lore.kernel.org/u-boot/[email protected]/
Changes in v4:
- Renamed QCOM_SNAGBOOT_SUPPORT to QCOM_SNAGBOOT_MODE
- Make SYSRESET_PSCI dependent on QCOM_SNAGBOOT_MODE
- Place Snagboot related configs in seperate config fragment
called configs/qcom-snagboot.config
- Include above config fragment in
configs/qcom_lemans_snagboot_defconfig
- Removed Lemans EVK override dtsi: arch/arm/dts/lemans-evk-u-boot.dtsi
- Removed QCOM_COMMAND_DB_OPTIONAL as now we use
CONFIG_QCOM_SNAGBOOT_MODE
- Added documentation on U-Boot for Snagboot
- Link to v3: https://lore.kernel.org/u-boot/[email protected]/
Changes in v3:
- Brought the MMU disable logic under CONFIG_QCOM_SNAGBOOT_SUPPORT
ifdef condition
- Moved the MMU disable codes to a new seperate file
- Used "if (IS_ENABLED(CONFIG_QCOM_COMMAND_DB_OPTIONAL))" instead
of #ifdef
- Removed enabling QCOM_COMMAND_DB_OPTIONAL, ENABLE_ARM_SOC_BOOT0_HOOK
and SKIP_RELOCATE as they are now automatically enabled by
QCOM_SNAGBOOT_SUPPORT selection
- Removed updating MAINTAINERS as the defconfig file is picked up by
the "N: qcom" line
- Link to v2: https://lore.kernel.org/u-boot/[email protected]/
Changes in v2:
- Changed SYSRESET_PSCI from 'select' to 'imply'
- Guard show_psci_version() and qcom_psci_fixup() with CONFIG_ARM_SMCCC
- Disables the MMU and invalidates TLBs at the earliest entry point
- Add qcom_lemans_snagboot_defconfig for Lemans-EVK
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---
Balaji Selvanathan (7):
arm: snapdragon: Make SYSRESET_PSCI optional
arm: snapdragon: Disable MMU early before U-Boot reset vector
arm: snapdragon: Add CONFIG_QCOM_SNAGBOOT_MODE option
soc: qcom: Allow RPMh to be built without Command DB
arch: arm: dts: remove Lemans EVK override DTS
configs: add qcom_lemans_snagboot_defconfig for Lemans-EVK
doc: qualcomm: Add snagboot mode documentation
arch/arm/Kconfig | 2 +- arch/arm/dts/lemans-evk-u-boot.dtsi | 19 ----- arch/arm/mach-snapdragon/Kconfig | 14 ++++ arch/arm/mach-snapdragon/include/mach/boot0.h | 2 + .../mach-snapdragon/include/mach/snagboot_boot0.h | 27 +++++++ configs/qcom-snagboot.config | 25 +++++++ configs/qcom_lemans_snagboot_defconfig | 8 +++ doc/board/qualcomm/index.rst | 1 + doc/board/qualcomm/snagboot.rst | 84 ++++++++++++++++++++++ drivers/soc/qcom/Kconfig | 1 - include/soc/qcom/cmd-db.h | 7 ++ 11 files changed, 169 insertions(+), 21 deletions(-)
---
base-commit: 3401e006432abcbf7d73d7210f10df157f990ed3
change-id: 20260731-snagboot-4e9f66f0252d
Best regards,
Signature · 1 line
Balaji Selvanathan <[email protected]>