[PATCH 00/20] Introduce resume for J7xx SoCs
Richard Genoud (TI)
richard.genoud at bootlin.com
Thu Apr 30 10:43:53 CEST 2026
This series allows J7200/J721e/J721s2/J784s4/J722s to resume from
suspend.
On those SoCs, a magic value is set in a PMIC register by the DM
firmware just before suspend, then everything but the PMIC and DDR is
powered off.
At resume/boot time, the magic value has to be read back by U-Boot SPL in
order to know if we are indeed in a resume situation.
That's the purpose of j7xx_board_is_resuming() introduced here.
Then, if the SoC is resuming, the DDR has to be be brought out of
retention, at full speed and get out of low power mode.
Between those steps, the DDR_RET pin has to be de-asserted. But the
DDR_RET pins of all DDR chips are tied together on a single GPIO, so
it's impossible to resume one DDR chip after the other, they must be all
resumed at once.
That's why it's orchestrated from board_init_f() and not in the k3ddrss
driver.
Once the DDR is fully functional, the next steps are:
- retrieve the LPM memory region from DTS
- authenticate certificates from LPM memory region and apply firewalls
- ask TIFS to restore TFA and its own minimal context
- start TFA on remote proc
- load and jump to DM
Patch 1 adds a missing config option for j784s4
Patches 2-6 add the resume detection for all SoCs
Patches 7-9 add the DDR resume sequence for all SoCs
Patches 10-15 add the resume flow for all SoCs
Patch 16 updates the pm-cfg and schema to a new version
Patch 17 detects IO+DDR resume state for j7200/j784s4
Patch 18 stores the wakeup reason in MCU_PSRAM0_RAM for j7200/j784s4
Patch 19 removes now unneeded background firewall on DDR for j7200/j784s4
Patch 20 extends the firewall for ATF region to TIFS
Tested on J722s HS-FS, J7200 GP, J784s4 GP, J721s2 GP
BEWARE: This series is based on v2026.04 + AM62 LPM series:
https://lore.kernel.org/u-boot/20260105-topic-am62-ioddr-v2025-04-rc1-v9-0-7e33f2c77dbf@baylibre.com/
It needs lpm_memory_regions described in DTS:
https://lore.kernel.org/lkml/20260427160326.370415-1-richard.genoud@bootlin.com/
Abhash Kumar Jha (3):
arm: mach-k3: Update pm-boardcfg for all k3 platforms
board: evm: Enable de-isolation of IOs at resume for j7200 and j784s4
board: ti: evm: Store wakeup reason on scratchpad memory
Prasanth Babu Mantena (3):
firmware: ti_sci: add low power mode operations
arm: dts: k3-j7200: Remove background firewall on DDR
arm: dts: k3-j7200: Extend firewall for ATF region to TIFS
Richard Genoud (TI) (9):
configs: j784s4_evm_r5: enable TI_SCI_POWER_DOMAIN
global: k3: use gd to store the resume state
board: ti: j784s4: Add resume detection
board: ti: j722s: Add resume detection
ram: k3-ddrss: Add j722s DDR resume sequence
ram: k3-ddrss: support j784s4/j721e/j721s2 DDR resume
mach-k3: r5: common: add helper functions needed in LPM resume
sequence
arm: mach-k3: j784s4: Enable LPM resume flow for J784s4/J742s2 SOCs
arm: mach-k3: j722s: Enable LPM resume flow
Thomas Richard (TI) (5):
board: ti: j721e: Add resume detection for J721e/J7200
board: ti: j721s2: Add resume detection
ram: k3-ddrss: Add exit retention support
arm: mach-k3: j721e: Enable LPM resume flow for J7200/J721e SOC
arm: mach-k3: j721s2: Enable LPM resume flow
arch/arm/dts/k3-binman.dtsi | 18 +-
arch/arm/dts/k3-j7200-binman.dtsi | 18 +-
arch/arm/dts/k3-j722s-r5-evm.dts | 4 +
arch/arm/dts/k3-security.h | 1 +
arch/arm/include/asm/global_data.h | 19 ++
arch/arm/mach-k3/common.h | 16 +
.../arm/mach-k3/include/mach/j721e_hardware.h | 12 +
.../mach-k3/include/mach/j784s4_hardware.h | 11 +
arch/arm/mach-k3/include/mach/k3-ddr.h | 16 +
arch/arm/mach-k3/include/mach/security.h | 1 +
arch/arm/mach-k3/j721e/j721e_init.c | 64 ++++
arch/arm/mach-k3/j721s2/j721s2_init.c | 73 ++++-
arch/arm/mach-k3/j722s/j722s_init.c | 11 +-
arch/arm/mach-k3/j784s4/j784s4_init.c | 70 ++++-
arch/arm/mach-k3/lpm-common.h | 15 +
arch/arm/mach-k3/r5/Kconfig | 4 +
arch/arm/mach-k3/r5/Makefile | 1 +
arch/arm/mach-k3/r5/common.c | 17 +-
arch/arm/mach-k3/r5/lpm-common.c | 228 +++++++++++++++
arch/arm/mach-k3/schema.yaml | 195 ++++++++++---
arch/arm/mach-k3/security.c | 64 ++++
board/phytec/phycore_am62ax/pm-cfg.yaml | 7 +-
board/ti/am62ax/pm-cfg.yaml | 7 +-
board/ti/am62px/pm-cfg.yaml | 7 +-
board/ti/am62x/pm-cfg.yaml | 7 +-
board/ti/am64x/pm-cfg.yaml | 5 +-
board/ti/am65x/pm-cfg.yaml | 7 +-
board/ti/common/k3-lpm.h | 22 ++
board/ti/j7200/pm-cfg.yaml | 92 +++++-
board/ti/j721e/evm.c | 75 +++++
board/ti/j721e/pm-cfg.yaml | 92 +++++-
board/ti/j721s2/evm.c | 37 +++
board/ti/j721s2/pm-cfg.yaml | 94 +++++-
board/ti/j722s/evm.c | 51 ++++
board/ti/j722s/pm-cfg.yaml | 7 +-
board/ti/j784s4/evm.c | 78 +++++
board/ti/j784s4/pm-cfg.yaml | 94 +++++-
configs/j784s4_evm_r5_defconfig | 1 +
drivers/firmware/ti_sci.c | 179 ++++++++++++
drivers/firmware/ti_sci.h | 92 ++++++
drivers/ram/k3-ddrss/k3-ddrss.c | 273 ++++++++++++++++++
drivers/ram/k3-ddrss/lpddr4_k3_reg.h | 94 ++++++
include/linux/soc/ti/ti_sci_protocol.h | 8 +
tools/binman/etype/ti_board_config.py | 4 +-
44 files changed, 2088 insertions(+), 103 deletions(-)
create mode 100644 arch/arm/mach-k3/lpm-common.h
create mode 100644 arch/arm/mach-k3/r5/lpm-common.c
create mode 100644 board/ti/common/k3-lpm.h
create mode 100644 drivers/ram/k3-ddrss/lpddr4_k3_reg.h
More information about the U-Boot
mailing list