public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v8 00/13] am62: IO+DDR resume support
@ 2025-12-22 20:01 Markus Schneider-Pargmann (TI.com)
  2025-12-22 20:01 ` [PATCH v8 01/13] arm: mach-k3: Kconfig: Add symbol for IO+DDR Low Power Mode Markus Schneider-Pargmann (TI.com)
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Markus Schneider-Pargmann (TI.com) @ 2025-12-22 20:01 UTC (permalink / raw)
  To: Tom Rini, Sumit Garg, Nishanth Menon, Robert Nelson,
	Vignesh Raghavendra, Bryan Brattlof
  Cc: Vishal Mahaveer, Kevin Hilman, Dhruva Gole, Sebin Francis,
	Kendall Willis, Akashdeep Kaur, u-boot, Anshul Dalal, Moteen Shah,
	Santhosh Kumar K, Nathan Morrisson, Garrett Giordano,
	Judith Mendez, Aparna Patra, Jayesh Choudhary, Chintan Vankar,
	Ilias Apalodimas, Neha Malcom Francis, Prasanth Babu Mantena,
	Beleswar Padhi, Manorit Chawdhry, Andrew Davis, Wadim Egorov,
	Udit Kumar, Andrew Goodbody, E Shattow, Devarsh Thakkar, Peng Fan,
	Jerome Forissier, Sam Protsenko, Marek Vasut, Andre Przywara,
	Théo Lebrun, Markus Schneider-Pargmann (TI.com)

Hi,

this series introduces support to resume from IO+DDR. IO+DDR is a low
power mode of am62a and am62p in which nearly everything is powered off
except DDR which is in self-refresh and a few pins which detect
activity and can wakeup the system again.

On resume uboot SPL is loaded and checks if this is a IO+DDR resume. If
it is, the DDR initialization sequence in k3-ddrss differs slightly as
it has to get the DDR out of the self-refresh.

Afterward a specific address determined from DT is used to get the
metadata that stores relevant context addresses. The context is restored
using the tisci message TI_SCI_MSG_MIN_CONTEXT_RESTORE. At the end all
further initializations are skipped and uboot SPL directly jumps into
the DM resume address which takes care of the rest.

k3-ddrss is using absolute register accesses at the moment. I am trying
to submit syscon DT patches upstream to access these through syscon,
unfortunately there is ongoing discussion regarding syscon.

I tested this on am62a.

Best,
Markus

Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
Changes in v8:
- Create and use am62xx-lpm-common for am62xx lpm common functions
- Create platform dependent functions in k3-ddrss in k3_ddrss_data
- Align am62a and am62p initialization regarding caches and QoS
- Link to v7: https://lore.kernel.org/r/20251210-topic-am62-ioddr-v2025-04-rc1-v7-0-f113b156f83f@baylibre.com

Changes in v7:
- Removed parent nodes bootph-pre-ram properties as not necessary
  anymore.
- Added missing new line in
    arm: mach-k3: common: Helper for LPM meta data address from DT
- Split off LPM specific ddr code into its own file k3-ddrss-lpm
- Rename lpm_ops->restore_context to lpm_ops->min_context_restore
- Pulled patch to add wakeup check helpers before the IO isolation
  removal to remove later cleanup of
  wkup_ctrl_remove_can_io_isolation_if_set()
- Some reviewed-bys and tested-bys removed due to changes in the
  patches
- Link to v6: https://lore.kernel.org/r/20251120-topic-am62-ioddr-v2025-04-rc1-v6-0-6dd99a7271bb@baylibre.com

Changes in v6:
- Add comment for last part of removing can io isolation
- Only mention a single kconfig symbol in the commit message
- Add defines for timeouts in k3-ddrss
- Link to v5: https://lore.kernel.org/r/20251110-topic-am62-ioddr-v2025-04-rc1-v5-0-980ee0036c26@baylibre.com

Changes in v5:
- Fixed compile warnings
- Link to v4: https://lore.kernel.org/r/20251030-topic-am62-ioddr-v2025-04-rc1-v4-0-4cef18af0226@baylibre.com

Changes in v4:
- Copy lpm_meta_data into the stack to be able to debug unstable memory
  issues
- Add missing comments about ctx_lo and ctx_hi
- Use absolute addresses for k3-ddrss CANUART_WAKE_STAT1 and
  CANUART_WAKE_OFF_MODE_STAT to avoid using addresses outside of the
  range given in the devicetree
- Remove the cherry picked devicetree patches as they are already
  included now
- In lpm_resume_from_ddr() print upper and lower 32bit of the meta data
  values separately.
- Link to v3: https://lore.kernel.org/r/20250623-topic-am62-ioddr-v2025-04-rc1-v3-0-a4da322c16af@baylibre.com

Changes in v3:
- Use wait_for_bit helpers in k3-ddrss where possible and add panic
  messages for easier debugging
- Link to v2: https://lore.kernel.org/r/20250613-topic-am62-ioddr-v2025-04-rc1-v2-0-3d233aaea355@baylibre.com

Changes in v2:
- Remove 'default n' from K3_IODDR
- Pick devicetree patches from upstream instead of mailinglist
- Link to v1: https://lore.kernel.org/r/20250311-topic-am62-ioddr-v2025-04-rc1-v1-0-666de9c105cb@baylibre.com

---
Markus Schneider-Pargmann (TI.com) (13):
      arm: mach-k3: Kconfig: Add symbol for IO+DDR Low Power Mode
      arm: mach-k3: am62xx-lpm-common: Add CANUART wakeup check helpers
      arm: mach-k3: Remove CANUART IO isolation
      ram: k3-ddrss: Add support for DDR in self-refresh
      firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE
      arm: mach-k3: am62xx-lpm-common: Add lpm_resume_from_ddr
      arm: mach-k3: am62xx-lpm-common: Helper for LPM meta data address from DT
      arm: mach-k3: am62a7_init: Resume on LPM exit
      arm: mach-k3: am62p5_init: Resume on LPM exit
      arm: dts: k3-am62a: Add r5 device nodes
      arm: dts: k3-am62p: Add r5 device nodes
      configs: am62ax_evm_r5: Enable IODDR resume support
      configs: am62p_evm_r5_defconfig: Enable IODDR resume support

 arch/arm/dts/k3-am62a7-sk-u-boot.dtsi  |   8 ++
 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi  |   8 ++
 arch/arm/mach-k3/Kconfig               |   8 ++
 arch/arm/mach-k3/Makefile              |   3 +
 arch/arm/mach-k3/am62ax/am62a7_init.c  |  14 +++
 arch/arm/mach-k3/am62px/am62p5_init.c  |  14 +++
 arch/arm/mach-k3/am62x/am625_init.c    |   5 +
 arch/arm/mach-k3/am62xx-lpm-common.c   | 220 +++++++++++++++++++++++++++++++++
 arch/arm/mach-k3/am62xx-lpm-common.h   |  19 +++
 configs/am62ax_evm_r5_defconfig        |   1 +
 configs/am62px_evm_r5_defconfig        |   1 +
 drivers/firmware/ti_sci.c              |  38 ++++++
 drivers/firmware/ti_sci.h              |  16 +++
 drivers/ram/k3-ddrss/Makefile          |   1 +
 drivers/ram/k3-ddrss/k3-ddrss-lpm.c    | 181 +++++++++++++++++++++++++++
 drivers/ram/k3-ddrss/k3-ddrss-lpm.h    |  20 +++
 drivers/ram/k3-ddrss/k3-ddrss.c        |  26 +++-
 include/linux/soc/ti/ti_sci_protocol.h |   9 ++
 18 files changed, 591 insertions(+), 1 deletion(-)
---
base-commit: 0e0a198a68be71148f5ec27ef86796174f91436f
change-id: 20250306-topic-am62-ioddr-v2025-04-rc1-0b3a0ffe92b1

Best regards,
-- 
Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-01-05 16:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22 20:01 [PATCH v8 00/13] am62: IO+DDR resume support Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 01/13] arm: mach-k3: Kconfig: Add symbol for IO+DDR Low Power Mode Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 02/13] arm: mach-k3: am62xx-lpm-common: Add CANUART wakeup check helpers Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 03/13] arm: mach-k3: Remove CANUART IO isolation Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 04/13] ram: k3-ddrss: Add support for DDR in self-refresh Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 05/13] firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 06/13] arm: mach-k3: am62xx-lpm-common: Add lpm_resume_from_ddr Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 07/13] arm: mach-k3: am62xx-lpm-common: Helper for LPM meta data address from DT Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 08/13] arm: mach-k3: am62a7_init: Resume on LPM exit Markus Schneider-Pargmann (TI.com)
2025-12-23  8:10   ` Kumar, Udit
2026-01-05 15:44     ` Markus Schneider-Pargmann
2025-12-22 20:01 ` [PATCH v8 09/13] arm: mach-k3: am62p5_init: " Markus Schneider-Pargmann (TI.com)
2025-12-23  8:13   ` Kumar, Udit
2025-12-22 20:01 ` [PATCH v8 10/13] arm: dts: k3-am62a: Add r5 device nodes Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 11/13] arm: dts: k3-am62p: " Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 12/13] configs: am62ax_evm_r5: Enable IODDR resume support Markus Schneider-Pargmann (TI.com)
2025-12-22 20:01 ` [PATCH v8 13/13] configs: am62p_evm_r5_defconfig: " Markus Schneider-Pargmann (TI.com)
2025-12-23  8:17 ` [PATCH v8 00/13] am62: IO+DDR " Kumar, Udit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox