[PATCH 09/20] ram: k3-ddrss: support j784s4/j721e/j721s2 DDR resume
Richard Genoud (TI)
richard.genoud at bootlin.com
Thu Apr 30 10:44:02 CEST 2026
j78s4/j721e/j7200/J721s2 can't use the standard resume sequence.
Typical DDR resume sequence is:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
We have to separate each action in order to de-assert the DDR_RET pins
at the right time, because the DDR_RET pins are all tied together in
hardware.
At resume, only the initialization of the DDR is done by the driver, the
rest is handled in boart_init_f().
So, introduce lpm_init_only flag to only initialize the DDR when resume
is detected for those boards.
Signed-off-by: Richard Genoud (TI) <richard.genoud at bootlin.com>
---
drivers/ram/k3-ddrss/k3-ddrss.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index 7b23123ab00d..5db421353e1f 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -122,6 +122,7 @@ enum intrlv_size {
struct k3_ddrss_data {
u32 flags;
+ bool lpm_init_only;
bool (*is_lpm_resume)(void);
void (*ddrss_deassert_retention)(void);
};
@@ -1157,6 +1158,9 @@ static int k3_ddrss_probe(struct udevice *dev)
k3_lpddr4_init(ddrss);
k3_lpddr4_hardware_reg_init(ddrss);
+ if (is_lpm_resume && ddrss_data->lpm_init_only)
+ return k3_ddrss_init_freq(ddrss);
+
if (is_lpm_resume)
k3_ddrss_self_refresh_exit(ddrss->ddrss_ctl_cfg);
@@ -1294,6 +1298,8 @@ static struct ram_ops k3_ddrss_ops = {
static const struct k3_ddrss_data k3_data = {
.flags = SINGLE_DDR_SUBSYSTEM,
+ .lpm_init_only = true,
+ .is_lpm_resume = j7xx_board_is_resuming,
};
static const struct k3_ddrss_data am62xx_data = {
@@ -1304,6 +1310,8 @@ static const struct k3_ddrss_data am62xx_data = {
static const struct k3_ddrss_data j721s2_data = {
.flags = MULTI_DDR_SUBSYSTEM,
+ .lpm_init_only = true,
+ .is_lpm_resume = j7xx_board_is_resuming,
};
static const struct k3_ddrss_data j722s_data = {
More information about the U-Boot
mailing list