@@ -13,203 +13,19 @@ device. If your application requires inactive power management, you must determi
1313low power mode described below satisfies your requirements. Each mode must be evaluated
1414based on power consumption and latency (the time it takes to wakeup to Active mode) requirements. Specific
1515values are detailed in the device-specific data sheet. As part of this SDK offering,
16- Texas Instruments has added support for the following low power modes:
16+ Texas Instruments has added support for the following low power modes (ordered from lowest power consumption
17+ to highest power consumption):
1718
18- #. Deep Sleep
19- #. MCU Only
2019#. Partial I/O
2120#. I/O Only Plus DDR
21+ #. Deep Sleep
22+ #. MCU Only
2223
2324TI SDK 10.0 (ti-linux-6.6.y kernel and 10.0 DM firmware) adds support for
2425an updated LPM Software Architecture that seamlessly manages the various
2526Suspend-to-RAM modes supported by AM62 family of devices. More details about
2627this architecture can be found in :ref: `LPM constraints framework<pm_constraints_fwk> ` section.
2728
28- **********
29- Deep Sleep
30- **********
31-
32- Deep Sleep AKA Suspend-to-RAM is a low-power mode that allows an embedded device
33- to retain its state in RAM while the processor is turned off.
34- This can save a significant amount of power, especially in devices that are
35- battery-powered.
36-
37- The benefits of using deep sleep in embedded devices:
38-
39- #. Faster wake-up: devices can wake up from this low-power state much faster than
40- a complete power cycle.
41- #. Better efficiency: deep sleep can help to improve the efficiency of embedded devices by
42- reducing the amount of time that the processor is idle. This is because the processor can
43- be kept in a low-power state when it is not needed.
44-
45- In order to enter deep sleep, use the following command:
46-
47- .. ifconfig :: CONFIG_part_variant in ('AM62X')
48-
49- .. code-block :: console
50-
51- root@am62xx-evm:~# echo mem > /sys/power/state
52- [ 444.719520] PM: suspend entry (deep)
53- [ 444.723374] Filesystems sync: 0.000 seconds
54- [ 444.751309] Freezing user space processes
55- [ 444.756923] Freezing user space processes completed (elapsed 0.001 seconds)
56- [ 444.763924] OOM killer disabled.
57- [ 444.767141] Freezing remaining freezable tasks
58- [ 444.772908] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
59- [ 444.780328] printk: Suspending console(s) (use no_console_suspend to debug)
60- [ 444.796853] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
61- [ 444.797037] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
62- [ 444.805604] omap8250 2800000.serial: PM domain pd:146 will not be powered off
63- [ 444.806188] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
64- [ 444.816592] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
65- [ 444.820627] Disabling non-boot CPUs ...
66- [ 444.822859] psci: CPU1 killed (polled 0 ms)
67- [ 444.826567] psci: CPU2 killed (polled 0 ms)
68- [ 444.830170] psci: CPU3 killed (polled 0 ms)
69-
70- .. ifconfig :: CONFIG_part_variant in ('AM62AX' , 'AM62PX')
71-
72- .. code-block :: console
73-
74- root@<machine>:~# echo mem > /sys/power/state
75- [ 230.181404] PM: suspend entry (deep)
76- [ 230.185406] Filesystems sync: 0.000 seconds
77- [ 230.219094] Freezing user space processes
78- [ 230.224495] Freezing user space processes completed (elapsed 0.001 seconds)
79- [ 230.231506] OOM killer disabled.
80- [ 230.234736] Freezing remaining freezable tasks
81- [ 230.240432] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
82- [ 230.247825] printk: Suspending console(s) (use no_console_suspend to debug)
83- [ 230.266309] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
84- [ 230.266456] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
85- [ 230.273953] omap8250 2800000.serial: PM domain pd:146 will not be powered off
86- [ 230.274450] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
87- [ 230.284177] remoteproc remoteproc1: stopped remote processor 79000000.r5f
88- [ 230.287440] Disabling non-boot CPUs ...
89- [ 230.289569] psci: CPU1 killed (polled 0 ms)
90- [ 230.292413] psci: CPU2 killed (polled 4 ms)
91- [ 230.295457] psci: CPU3 killed (polled 0 ms)
92-
93- This partially indicates that linux has finished it's deep sleep sequence.
94- For further confirmation, one can take a look at the PMIC_LPM_EN pin on the EVM
95- (after programming the PMCTRL_SYS register (0x43018080) to 0x15). Here, if the pin is 3.3V when active and
96- 0V when in deep sleep.
97-
98- .. note ::
99-
100- The system will enter deep sleep mode only if DM selects it based on existing constraints.
101-
102- Refer to the :ref: `Wakeup Sources<pm_wakeup_sources> ` section for information on how to wakeup the device from
103- Deep Sleep mode using one of the supported wakeup sources.
104-
105- .. _pm_mcu_only :
106-
107- ********
108- MCU Only
109- ********
110-
111- Similar to Deep Sleep, with the major distinction being that the MCU core is kept alive to run applications.
112- The benefits of using MCU Only mode:
113-
114- #. Low power consumption: MCU Only mode can save a significant amount of power, especially in battery-powered
115- devices. This is because The rest of the SoC status is the same as Deep Sleep and DDR is in self-refresh.
116- #. Run background tasks: This mode can be used to run background tasks that do not require the full power of the system.
117- For example, you could use the firmware on the MCU core to run a watchdog timer, a sensor polling loop,
118- or a network communication task.
119- #. Respond to interrupts: This allows the system to still respond to external events, while it is in a low-power state.
120-
121- To enter MCU Only mode, set :code: `100 usec ` resume latency for CPU0 in linux:
122-
123- .. code-block :: console
124-
125- root@<machine>:~# echo 100 > /sys/devices/system/cpu/cpu0/power/pm_qos_resume_latency_us
126-
127- .. important ::
128-
129- Note that the step below to set "enabled" won't work for SDK 10.00
130- and will be supported in future release
131-
132- .. ifconfig :: CONFIG_part_variant in ('AM62X')
133-
134- To enter MCU Only mode, enable MCU M4 core as a wakeup source in linux:
135-
136- .. code-block :: console
137-
138- root@am62xx-evm:~# echo enabled > /sys/bus/platform/devices/5000000.m4fss/power/wakeup
139-
140- .. ifconfig :: CONFIG_part_variant in ('AM62AX', 'AM62PX')
141-
142- To enter MCU Only mode, enable MCU R5 core as a wakeup source in linux:
143-
144- .. code-block :: console
145-
146- root@<machine>:~# echo enabled > /sys/bus/platform/devices/79000000.r5f/power/wakeup
147-
148- Now, the SoC can be suspended using the following command:
149-
150- .. code-block :: console
151-
152- root@<machine>:~# rtcwake -s 5 -m mem
153- rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Jan 1 00:01:02 1970
154- [ 45.548480] PM: suspend entry (deep)
155- [ 45.552187] Filesystems sync: 0.000 seconds
156- [ 45.566606] Freezing user space processes
157- [ 45.572093] Freezing user space processes completed (elapsed 0.001 seconds)
158- [ 45.579083] OOM killer disabled.
159- [ 45.582309] Freezing remaining freezable tasks
160- [ 45.587984] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
161- [ 45.595432] printk: Suspending console(s) (use no_console_suspend to debug)
162- [ 45.627136] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
163- [ 45.640758] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
164- [ 45.648341] omap8250 2800000.serial: PM domain pd:146 will not be powered off
165- [ 45.648892] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
166- [ 45.648993] cpu cpu3: ti_sci_suspend: sending max CPU latency=100
167- [ 45.649033] ti-sci 44043000.system-controller: ti_sci_cmd_set_latency_constraint: latency: 100: state: 1: ret 0
168- [ 45.669270] Disabling non-boot CPUs ...
169- [ 45.671353] psci: CPU1 killed (polled 0 ms)
170- [ 45.674819] psci: CPU2 killed (polled 0 ms)
171- [ 45.676640] psci: CPU3 killed (polled 4 ms)
172- [ 45.677311] Enabling non-boot CPUs ...
173- [ 45.677632] Detected VIPT I-cache on CPU1
174- [ 45.677672] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
175- [ 45.677724] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
176- [ 45.678694] CPU1 is up
177- [ 45.678934] Detected VIPT I-cache on CPU2
178- [ 45.678962] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
179- [ 45.679002] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
180- [ 45.679778] CPU2 is up
181- [ 45.680016] Detected VIPT I-cache on CPU3
182- [ 45.680045] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
183- [ 45.680088] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
184- [ 45.680939] CPU3 is up
185- [ 45.681332] ti-sci 44043000.system-controller: ti_sci_resume: wakeup source: 0x50
186- [ 45.703650] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
187- [ 45.719704] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
188- [ 45.719730] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
189- [ 46.004264] OOM killer enabled.
190- [ 46.007406] Restarting tasks ... done.
191- [ 46.012454] random: crng reseeded on system resumption
192- [ 46.026923] platform 79000000.r5f: Core is on in resume
193- [ 46.032206] platform 79000000.r5f: received echo reply from 79000000.r5f
194- [ 46.032262] PM: suspend exit
195-
196- Once the SoC enters MCU Only mode, the following log should be printed
197- on the MCU UART (in most cases it will be /dev/ttyUSB3)
198-
199- .. code-block :: text
200-
201- [IPC RPMSG ECHO] Next MCU mode is 1
202- [IPC RPMSG ECHO] Suspend request to MCU-only mode received
203- [IPC RPMSG ECHO] Press a single key on this terminal to resume the kernel from MCU only mode
204-
205- .. note ::
206-
207- The system will enter MCU Only mode only if DM selects it based on existing constraints.
208-
209- Refer to the :ref: `Wakeup Sources<pm_wakeup_sources> ` section for information on how to wakeup the device from
210- MCU Only mode using one of the supported wakeup sources.
211-
212-
21329***********
21430Partial I/O
21531***********
@@ -415,6 +231,190 @@ I/O Only Plus DDR
415231
416232 The system will enter I/O Only plus DDR mode only if DM selects it based on existing constraints.
417233
234+ **********
235+ Deep Sleep
236+ **********
237+
238+ Deep Sleep AKA Suspend-to-RAM is a low-power mode that allows an embedded device
239+ to retain its state in RAM while the processor is turned off.
240+ This can save a significant amount of power, especially in devices that are
241+ battery-powered.
242+
243+ The benefits of using deep sleep in embedded devices:
244+
245+ #. Faster wake-up: devices can wake up from this low-power state much faster than
246+ a complete power cycle.
247+ #. Better efficiency: deep sleep can help to improve the efficiency of embedded devices by
248+ reducing the amount of time that the processor is idle. This is because the processor can
249+ be kept in a low-power state when it is not needed.
250+
251+ In order to enter deep sleep, use the following command:
252+
253+ .. ifconfig :: CONFIG_part_variant in ('AM62X')
254+
255+ .. code-block :: console
256+
257+ root@am62xx-evm:~# echo mem > /sys/power/state
258+ [ 444.719520] PM: suspend entry (deep)
259+ [ 444.723374] Filesystems sync: 0.000 seconds
260+ [ 444.751309] Freezing user space processes
261+ [ 444.756923] Freezing user space processes completed (elapsed 0.001 seconds)
262+ [ 444.763924] OOM killer disabled.
263+ [ 444.767141] Freezing remaining freezable tasks
264+ [ 444.772908] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
265+ [ 444.780328] printk: Suspending console(s) (use no_console_suspend to debug)
266+ [ 444.796853] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
267+ [ 444.797037] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
268+ [ 444.805604] omap8250 2800000.serial: PM domain pd:146 will not be powered off
269+ [ 444.806188] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
270+ [ 444.816592] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
271+ [ 444.820627] Disabling non-boot CPUs ...
272+ [ 444.822859] psci: CPU1 killed (polled 0 ms)
273+ [ 444.826567] psci: CPU2 killed (polled 0 ms)
274+ [ 444.830170] psci: CPU3 killed (polled 0 ms)
275+
276+ .. ifconfig :: CONFIG_part_variant in ('AM62AX' , 'AM62PX')
277+
278+ .. code-block :: console
279+
280+ root@<machine>:~# echo mem > /sys/power/state
281+ [ 230.181404] PM: suspend entry (deep)
282+ [ 230.185406] Filesystems sync: 0.000 seconds
283+ [ 230.219094] Freezing user space processes
284+ [ 230.224495] Freezing user space processes completed (elapsed 0.001 seconds)
285+ [ 230.231506] OOM killer disabled.
286+ [ 230.234736] Freezing remaining freezable tasks
287+ [ 230.240432] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
288+ [ 230.247825] printk: Suspending console(s) (use no_console_suspend to debug)
289+ [ 230.266309] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
290+ [ 230.266456] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
291+ [ 230.273953] omap8250 2800000.serial: PM domain pd:146 will not be powered off
292+ [ 230.274450] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
293+ [ 230.284177] remoteproc remoteproc1: stopped remote processor 79000000.r5f
294+ [ 230.287440] Disabling non-boot CPUs ...
295+ [ 230.289569] psci: CPU1 killed (polled 0 ms)
296+ [ 230.292413] psci: CPU2 killed (polled 4 ms)
297+ [ 230.295457] psci: CPU3 killed (polled 0 ms)
298+
299+ This partially indicates that linux has finished it's deep sleep sequence.
300+ For further confirmation, one can take a look at the PMIC_LPM_EN pin on the EVM
301+ (after programming the PMCTRL_SYS register (0x43018080) to 0x15). Here, if the pin is 3.3V when active and
302+ 0V when in deep sleep.
303+
304+ .. note ::
305+
306+ The system will enter deep sleep mode only if DM selects it based on existing constraints.
307+
308+ Refer to the :ref: `Wakeup Sources<pm_wakeup_sources> ` section for information on how to wakeup the device from
309+ Deep Sleep mode using one of the supported wakeup sources.
310+
311+ .. _pm_mcu_only :
312+
313+ ********
314+ MCU Only
315+ ********
316+
317+ Similar to Deep Sleep, with the major distinction being that the MCU core is kept alive to run applications.
318+ The benefits of using MCU Only mode:
319+
320+ #. Low power consumption: MCU Only mode can save a significant amount of power, especially in battery-powered
321+ devices. This is because The rest of the SoC status is the same as Deep Sleep and DDR is in self-refresh.
322+ #. Run background tasks: This mode can be used to run background tasks that do not require the full power of the system.
323+ For example, you could use the firmware on the MCU core to run a watchdog timer, a sensor polling loop,
324+ or a network communication task.
325+ #. Respond to interrupts: This allows the system to still respond to external events, while it is in a low-power state.
326+
327+ To enter MCU Only mode, set :code: `100 usec ` resume latency for CPU0 in linux:
328+
329+ .. code-block :: console
330+
331+ root@<machine>:~# echo 100 > /sys/devices/system/cpu/cpu0/power/pm_qos_resume_latency_us
332+
333+ .. important ::
334+
335+ Note that the step below to set "enabled" won't work for SDK 10.00
336+ and will be supported in future release
337+
338+ .. ifconfig :: CONFIG_part_variant in ('AM62X')
339+
340+ To enter MCU Only mode, enable MCU M4 core as a wakeup source in linux:
341+
342+ .. code-block :: console
343+
344+ root@am62xx-evm:~# echo enabled > /sys/bus/platform/devices/5000000.m4fss/power/wakeup
345+
346+ .. ifconfig :: CONFIG_part_variant in ('AM62AX', 'AM62PX')
347+
348+ To enter MCU Only mode, enable MCU R5 core as a wakeup source in linux:
349+
350+ .. code-block :: console
351+
352+ root@<machine>:~# echo enabled > /sys/bus/platform/devices/79000000.r5f/power/wakeup
353+
354+ Now, the SoC can be suspended using the following command:
355+
356+ .. code-block :: console
357+
358+ root@<machine>:~# rtcwake -s 5 -m mem
359+ rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Jan 1 00:01:02 1970
360+ [ 45.548480] PM: suspend entry (deep)
361+ [ 45.552187] Filesystems sync: 0.000 seconds
362+ [ 45.566606] Freezing user space processes
363+ [ 45.572093] Freezing user space processes completed (elapsed 0.001 seconds)
364+ [ 45.579083] OOM killer disabled.
365+ [ 45.582309] Freezing remaining freezable tasks
366+ [ 45.587984] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
367+ [ 45.595432] printk: Suspending console(s) (use no_console_suspend to debug)
368+ [ 45.627136] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 179: state: 1: ret 0
369+ [ 45.640758] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 178: state: 1: ret 0
370+ [ 45.648341] omap8250 2800000.serial: PM domain pd:146 will not be powered off
371+ [ 45.648892] ti-sci 44043000.system-controller: ti_sci_cmd_set_device_constraint: device: 117: state: 1: ret 0
372+ [ 45.648993] cpu cpu3: ti_sci_suspend: sending max CPU latency=100
373+ [ 45.649033] ti-sci 44043000.system-controller: ti_sci_cmd_set_latency_constraint: latency: 100: state: 1: ret 0
374+ [ 45.669270] Disabling non-boot CPUs ...
375+ [ 45.671353] psci: CPU1 killed (polled 0 ms)
376+ [ 45.674819] psci: CPU2 killed (polled 0 ms)
377+ [ 45.676640] psci: CPU3 killed (polled 4 ms)
378+ [ 45.677311] Enabling non-boot CPUs ...
379+ [ 45.677632] Detected VIPT I-cache on CPU1
380+ [ 45.677672] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
381+ [ 45.677724] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
382+ [ 45.678694] CPU1 is up
383+ [ 45.678934] Detected VIPT I-cache on CPU2
384+ [ 45.678962] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
385+ [ 45.679002] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
386+ [ 45.679778] CPU2 is up
387+ [ 45.680016] Detected VIPT I-cache on CPU3
388+ [ 45.680045] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
389+ [ 45.680088] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
390+ [ 45.680939] CPU3 is up
391+ [ 45.681332] ti-sci 44043000.system-controller: ti_sci_resume: wakeup source: 0x50
392+ [ 45.703650] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
393+ [ 45.719704] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
394+ [ 45.719730] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
395+ [ 46.004264] OOM killer enabled.
396+ [ 46.007406] Restarting tasks ... done.
397+ [ 46.012454] random: crng reseeded on system resumption
398+ [ 46.026923] platform 79000000.r5f: Core is on in resume
399+ [ 46.032206] platform 79000000.r5f: received echo reply from 79000000.r5f
400+ [ 46.032262] PM: suspend exit
401+
402+ Once the SoC enters MCU Only mode, the following log should be printed
403+ on the MCU UART (in most cases it will be /dev/ttyUSB3)
404+
405+ .. code-block :: text
406+
407+ [IPC RPMSG ECHO] Next MCU mode is 1
408+ [IPC RPMSG ECHO] Suspend request to MCU-only mode received
409+ [IPC RPMSG ECHO] Press a single key on this terminal to resume the kernel from MCU only mode
410+
411+ .. note ::
412+
413+ The system will enter MCU Only mode only if DM selects it based on existing constraints.
414+
415+ Refer to the :ref: `Wakeup Sources<pm_wakeup_sources> ` section for information on how to wakeup the device from
416+ MCU Only mode using one of the supported wakeup sources.
417+
418418***********
419419Limitations
420420***********
0 commit comments