Skip to contentSkip to conversation

ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.

PATCH New Martin Fuzzey 2 participants 2 messages May 12, 2015 – May 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.

In order to save power the DDR pins should be put into high impedance when in suspend to RAM.

This requires manually requesting self refresh (rather than using the automatic mode implemented by the CCM / ESDCTL), followed by reconfiguring the IOMUXC.

Of course the code to do this cannot itself run from DDR so the code is copied to and executed from internal memory.

In my tests using a custom i.MX53 board with LPDDR2 RAM this reduced the suspend power consumption from 200mW to 60mW.

---

Changes since V1:
* Drop struct imx5_suspend_io_config and just use struct imx5_suspend_io_state
* Populate IRAM state structures with memcpy()

 arch/arm/mach-imx/Makefile        |    1 
 arch/arm/mach-imx/common.h        |    4 +
 arch/arm/mach-imx/pm-imx5.c       |  190 +++++++++++++++++++++++++++++++++++++
 arch/arm/mach-imx/suspend-imx53.S |  139 +++++++++++++++++++++++++++
 4 files changed, 333 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-imx/suspend-imx53.S
arch/arm/mach-imx/Makefile +1 -0
index 3244cf1..6ba3894 100644
@@ -94,6 +94,7 @@ obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o
 ifeq ($(CONFIG_SUSPEND),y)
 AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
+obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
 endif
 obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
 
arch/arm/mach-imx/common.h +4 -0
index 0f04e30..9ade280c 100644
@@ -121,9 +121,13 @@ int imx_cpu_kill(unsigned int cpu);
 
 #ifdef CONFIG_SUSPEND
 void v7_cpu_resume(void);
+void imx53_suspend(void __iomem *ocram_vbase);
+extern const u32 imx53_suspend_sz;
 void imx6_suspend(void __iomem *ocram_vbase);
 #else
 static inline void v7_cpu_resume(void) {}
+static inline void imx53_suspend(void __iomem *ocram_vbase) {}
+static const u32 imx53_suspend_sz;
 static inline void imx6_suspend(void __iomem *ocram_vbase) {}
 #endif
 
arch/arm/mach-imx/pm-imx5.c +189 -1

236 lines not on this page · raw message

arch/arm/mach-imx/suspend-imx53.S new file +139 -0

139 lines not on this page · raw message

Applied
#1 lore raw

PATCH v2 1/1 ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.

Quoted 7 lines · Martin Fuzzey

In order to save power the DDR pins should be put into high impedance when in suspend to RAM.

This requires manually requesting self refresh (rather than using the automatic mode implemented by the CCM / ESDCTL), followed by reconfiguring the IOMUXC.

Quoted 7 lines

Of course the code to do this cannot itself run from DDR so the code is copied to and executed from internal memory.

In my tests using a custom i.MX53 board with LPDDR2 RAM this reduced the suspend power consumption from 200mW to 60mW.

Applied, thanks.