Hi all, This patch set adds support for falcon boot on AM62a, 62p and 62x by bypassing A53 SPL and U-boot.
Existing Boot flow: R5 SPL -> ATF -> A53 SPL -> U-Boot -> Linux Kernel Updated flow: R5 SPL -> ATF -> Linux Kernel U-Boot's falcon mode expects the jump from SPL to kernel to happen on the same core which is not directly applicable for our heterogeneous platforms since ATF, OPTEE and other non SPL binaries from tispl.bin should be loaded before the kernel by the R5 SPL. So we have to use a different flow to bypass A53 SPL and U-Boot, we first load the newly added tispl_falcon.bin instead of tispl.bin which lacks u-boot-spl.bin (A53's SPL) and the corresponding fdt. This sets up dm, tifs, optee and atf. Once loaded, we load the kernel and the dtb (with fixups) at ATF's PRELOADED_BL33_BASE and K3_HW_CONFIG_BASE. NOTE: Since we're now using the SPL to load the kernel and kernel expects a 2MiB aligned load address, the existing PRELOADED_BL33_BASE has to be changed for ATF to 0x82000000 with K3_HW_CONFIG_BASE set to 0x88000000 for the DTB. Depends on: [PATCH v3 0/4] Allow falcon boot from A-core SPL on K3 devices https://lore.kernel.org/u-boot/[email protected]/ Signed-off-by: Anshul Dalal <[email protected]> --- Changes in v9: * Update the boot flow diagram in documentation * Refactor the documentation diagram into am62x_sk.rst v8: https://lore.kernel.org/u-boot/[email protected]/ Changes in v8: * Base the series on the recently added support for secure falcon mode * Split the [8/10] patch of previous series to multiple commits * Move R5 falcon mode logic from k3/common.c to k3/r5/common.c * Load `tifalcon.bin` from rootfs even in raw eMMC boot to simplify usage * Drop the section on 'SPI usage' in the documentation v7: https://lore.kernel.org/u-boot/[email protected]/ Changes in v7: * Replaced AM62a/p documentation with a hyperlink to AM62x's docs * Made CMD_BOOTZ disabled for TI_SECURE_DEVICE v6: https://lore.kernel.org/u-boot/[email protected]/ Changes in v6: * Added A53 build steps in docs * Had git add SVGs as text instead of blob * Added memory map for standard boot flow v5: https://lore.kernel.org/u-boot/[email protected]/ Changes in v5: * Added documentation * Moved address for kernel and dtb to 0x82000000 and 0x88000000 respectively v4: https://lore.kernel.org/u-boot/[email protected]/ Changes in v4: * Move emmc boot fixes to saperate patch * Update load address for kernel to 0x82200000 * Add jump_stub config v3: https://lore.kernel.org/u-boot/[email protected]/ Changes in v3: * Make tifs load and entry address consistent with tispl for am62a and 62p * Update loadables order to be same as tispl.bin * Use rootfs for boot instead of boot partition * Disable SPL_HAS_BOOTZ to save space * Add default dtbs for each board in Kconfig * Fix fdt totalsize in the header before applying fixups * Update Makefile to clean tispl_falcon.bin on `make clean` v2: https://lore.kernel.org/u-boot/[email protected]/ Changes in v2: * Move to CONFIG_SYS_SPI_* * Remove the need for CMD_BOOTI v1: https://lore.kernel.org/u-boot/[email protected]/ --- Anshul Dalal (8): arch: arm: k3-binman: add fit for falcon boot configs: add falcon mode fragment for k3 devices mach-k3: common: enable falcon mode from R5 SPL mach-k3: common: support only MMC in R5 falcon mode mach-k3: r5: common: add fdt fixups for falcon mode mach-k3: r5: common: add bootargs to kernel's dtb Makefile: add tifalcon.bin to CLEAN_FILES doc: ti: document R5 falcon mode for AM62 platforms Makefile | 2 +- arch/arm/dts/k3-am625-sk-binman.dtsi | 64 ++++ arch/arm/dts/k3-am62a-sk-binman.dtsi | 51 +++ arch/arm/dts/k3-am62p-sk-binman.dtsi | 51 +++ arch/arm/dts/k3-binman.dtsi | 54 +++ arch/arm/mach-k3/am62ax/am62a7_init.c | 3 + arch/arm/mach-k3/am62px/am62p5_init.c | 4 + arch/arm/mach-k3/am62x/am625_init.c | 3 + arch/arm/mach-k3/common.c | 8 + arch/arm/mach-k3/common.h | 5 + arch/arm/mach-k3/r5/common.c | 145 ++++++++ configs/k3_r5_falcon.config | 39 +++ doc/board/ti/am62ax_sk.rst | 31 ++ doc/board/ti/am62px_sk.rst | 31 ++ doc/board/ti/am62x_sk.rst | 319 ++++++++++++++++++ doc/board/ti/img/fitImage_falcon.svg | 180 ++++++++++ doc/board/ti/img/tifsstub_dm_tifalcon.bin.svg | 285 ++++++++++++++++ 17 files changed, 1274 insertions(+), 1 deletion(-) create mode 100644 configs/k3_r5_falcon.config create mode 100644 doc/board/ti/img/fitImage_falcon.svg create mode 100644 doc/board/ti/img/tifsstub_dm_tifalcon.bin.svg -- 2.51.0

