Genio 510 and 700 need a way to provision blank eMMC and recover boards
with unusable boot firmware. Add RAM-based fastboot download agents that
can be loaded through the MediaTek BootROM download protocol without
relying on the installed bootloader.
Fastboot in U-Boot proper is preferred when the complete download agent
fits the platform's BootROM payload limit. It provides U-Boot's shell and
boot facilities as well as flashing. The SPL variant offers a smaller
executable payload when including BL31 and U-Boot proper would exceed
that limit. Both require an external DDR loader and run fastboot from
DRAM after DDR initialization.
The two paths start USB fastboot at different stages:
Fastboot in SPL Fastboot in U-Boot proper
--------------- -------------------------
BootROM USB download BootROM USB download
(host -> SRAM) (host -> SRAM)
| |
v v
DDR loader DDR loader
| Initialize DRAM | Initialize DRAM
| Copy SPL to DRAM | Copy SPL + FIT to DRAM
v v
SPL SPL
| USB fastboot <-> host | Load BL31 + U-Boot from RAM
v v
eMMC provisioning BL31
|
v
U-Boot proper
| USB fastboot <-> host
v
eMMC provisioning
This series is based on upstream main plus "arm: mediatek: simplify SPL
boot-device selection", already picked up for mediatek-for-main. Generic
SPL fastboot is in main.
---
Changes in v5:
- Drop the SPL boot-device cleanup already picked up for mediatek-for-main.
- Rebase onto upstream main; drop the separate SPL fastboot prerequisite.
- Introduce the phase-aware build rule in the SPL DA patch.
- Use the architecture cleanup helper to disable and invalidate I-cache
as well as clean up D-cache and the MMU before handoff.
- Link to v4:
https://patch.msgid.link/20261006-ccaione-upstream-mt8390-da-v4-0-63d7d1247...@baylibre.com
Changes in v4:
- Use standard SPL/proper phase prefixes for the fastboot DA options.
- Simplify DA FIT-key handling and include the board-hook declarations.
- Enable MMU and CPU caches to improve SPL fastboot download throughput;
disable D-cache and the MMU before handing off to the next stage.
- Link to v3:
https://patch.msgid.link/20260930-ccaione-upstream-mt8390-da-v3-0-ae6091c7e...@baylibre.com
Changes in v3:
- Rebase onto current upstream/next.
- Separate the boot-device conditional cleanup from DA enablement.
- Use normal VBUS detection without changing the MTU3 driver.
- Apply the SPL agent's eMMC preparation to the U-Boot DA, including
reset-pin enablement.
- Reduce the U-Boot DA heap from 144 MiB to 16 MiB for sparse flashing.
- Document that enabling the eMMC reset pin is permanent.
- Use wildcard MAINTAINERS entries and clarify signing and heap-size
rationale.
- Link to v2:
https://patch.msgid.link/20260923-ccaione-upstream-mt8390-da-v2-0-8f264678a...@baylibre.com
Changes in v2:
- Rebase onto upstream/next, which now includes Genio SPL support.
- Align shared DA filenames with the mt8370 Genio naming.
- Use fixed USB peripheral mode instead of the private force-vbus DT
property, with corresponding MTU3 driver support.
- Limit RAM boot to the U-Boot DA and use phase-specific MMC settings.
- Separate shared and per-agent configuration, and make DA and normal
storage-image configurations mutually exclusive.
- Build the SPL DA entry only in SPL and simplify FIT key handling.
- Keep the SPL allocation limit large enough for sparse image writes.
- Select the eMMC user area when resuming boot with SPL fastboot continue.
- Explain the preferred U-Boot DA and the SPL alternative for tighter
BootROM payload limits; clarify DT requirements and continue behavior.
- Link to v1:
https://patch.msgid.link/20260914-ccaione-upstream-mt8390-da-v1-0-b76f9e30a...@baylibre.com
---
Carlo Caione (3):
arm: mediatek: enable U-Boot fastboot DAs on Genio 510 and 700
doc: board: mediatek: document Genio download agents
arm: mediatek: enable caches in the SPL download agent
Julien Masson (1):
arm: mediatek: enable SPL fastboot DAs on Genio 510 and 700
arch/arm/dts/mt8370-genio-510-evk-u-boot.dtsi | 6 +
arch/arm/dts/mt8370-genio-da-u-boot.dtsi | 64 ++++++++++
arch/arm/dts/mt8390-genio-700-evk-u-boot.dtsi | 6 +
arch/arm/dts/mtk-genio-da-binman-u-boot.dtsi | 14 +++
arch/arm/dts/mtk-genio-da-fit-binman-u-boot.dtsi | 62 ++++++++++
.../dts/mtk-genio-loader-spl-binman-u-boot.dtsi | 3 +-
arch/arm/mach-mediatek/Kconfig | 59 +++++++++
arch/arm/mach-mediatek/Makefile | 1 +
arch/arm/mach-mediatek/download_agent.c | 111 +++++++++++++++++
arch/arm/mach-mediatek/spl.c | 3 +
board/mediatek/MAINTAINERS | 12 +-
common/spl/Kconfig | 2 +-
configs/mt8370-genio-da-spl-fastboot.config | 21 ++++
configs/mt8370-genio-da-uboot-fastboot.config | 29 +++++
configs/mt8370-genio-da.config | 12 ++
configs/mt8370_genio_510_evk_da_spl_defconfig | 2 +
configs/mt8370_genio_510_evk_da_uboot_defconfig | 2 +
configs/mt8390_genio_700_evk_da_spl_defconfig | 2 +
configs/mt8390_genio_700_evk_da_uboot_defconfig | 2 +
doc/board/mediatek/mt8188-genio-evk.rst | 135 +++++++++++++++++++++
20 files changed, 539 insertions(+), 9 deletions(-)
---
base-commit: 62c9805d8d57cad407f0295879cc9a6182da464a
change-id: 20260910-ccaione-upstream-mt8390-da-f2f8416ab2a8
prerequisite-patch-id: 17f238594daf549dc39885bade80f2f82724117e
Best regards,
--
Carlo Caione <[email protected]>