Trying to google my way around the Self-Refresh / DLL freezes... it seems like it's a pretty common issue, as multiple users had similar issues (hanging / freezing when getting out of Self-Refresh mode), for various systems (i.MX, AMs, etc.)
One had the issue that only froze when running the memory at 400MHz, with 533MHz, it worked fine.
Another one had the issue that he used an OPP-Setting that wasn't supported by the memory - so it often freezes.
There are some things we might try to look into as well.
If I understood correctly, then Self-Refresh is being entered and exited by the kernel. So both the call and the procedure is being controlled by software.
But our chip also supports the (optional) feature "Auto Self-Refresh". According to the JEDEC document:
"DDR3 SDRAM provides an Auto Self-Refresh mode (ASR) for application ease. ASR mode is enabled by setting MR2 bit A6 = 1b and MR2 bit A7 = 0b . The DRAM will manage Self-Refresh entry in either the Normal or Extended (optional) Temperature Ranges. In this mode, the DRAM will also manage Self-Refresh power consumption when the DRAM operating temperature changes, lower at low temperatures and higher at high temperatures. If the ASR option is not supported by the DRAM, MR2 bit A6 must be set to 0b. If the ASR mode is not enabled (MR2 bit.A6 = 0b), the SRT bit (MR2 A7) must be manually programmed with the operating temperature range required during Self-Refresh operation."
So - are we talking about AUTO self-refresh or self-refresh which causes our issue?
Since Auto Self-Refresh is optional, maybe it's disabled in our setup?
If Auto Self-Refresh does the same as Self-Refresh (but it's being handled by the RAM itself), maybe that woukd work instead?