AM62 Low Power: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#switch: {{#var:RELEASE_NAME}}
| am62-yocto-kirkstone-6.1.46_09.01.00.08-v1.0=
{{#vardefine:TI_LOW_POWER_DOCS_LINK|https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_low_power_modes.html}}
{{#vardefine:TI_WAKEUP_SOURCES_DOCS_LINK|https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_wakeup_sources.html#wakeup-sources}}
| #default=}
}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} Low Power Modes}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
--> {{PageHeader|{{#var:HARDWARE_NAME}} Low Power Modes}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
= Background =
= Background =


TI's AM62 contains numerous low power modes and features. Extensive documentation on the subject can be found by consulting TI's [https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_low_power_modes.html Low Power Modes] article.
TI's AM62 contains numerous low power modes and features. Extensive documentation on the subject can be found by consulting TI's [{{#var:TI_LOW_POWER_DOCS_LINK}} Low Power Modes] article.
<br>
<br>
<br>
<br>
Line 15: Line 21:


In order to enter deep sleep, use the following command:
In order to enter deep sleep, use the following command:
  # pm-suspend
  root@am62x-var-som:~# pm-suspend
[  26.430955] mmc2: card 0001 removed
[  26.668685] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[  26.716750] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[  26.875564] PM: suspend entry (deep)
[  26.880123] Filesystems sync: 0.000 seconds
[  26.904501] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
[  26.925158] Freezing user space processes
[  26.931899] Freezing user space processes completed (elapsed 0.002 seconds)
[  26.938937] OOM killer disabled.
[  26.942261] Freezing remaining freezable tasks
[  26.948416] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[  26.955832] printk: Suspending console(s) (use no_console_suspend to debug)


= Wake up =
= Wake up =
Line 35: Line 53:
  };
  };


For more information on various wake-up sources, please consult TI's [https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_wakeup_sources.html#wakeup-sources Wakeup Sources] article.
Touching the screen after the system has been suspended will wake the system.
 
For more information on available wake-up sources, please consult TI's [{{#var:TI_WAKEUP_SOURCES_DOCS_LINK}} Wakeup Sources] article.


= CPU Hotplug =
= CPU Hotplug =
The modern Linux kernel has features to support CPU "hotplugging." On the AM62, this allows for individual CPU cores to be completely powered down and back up dynamically. This can be used to help reduce power usage of a system at runtime.
See the Variscite [https://variwiki.com/index.php?title=CPU_freq_and_num_of_cores Set the CPU freq. and number of active cores] article for more information.
<br>
For example, CPU3 can be powered off at runtime by issuing the following command:
root@am62x-var-som:~# echo off > /sys/devices/system/cpu/cpu3/online                                                                                                                                                             
[71329.969188] psci: CPU3 killed (polled 0 ms)
<br>
Then brought back online later with:
root@am62x-var-som:~# echo on > /sys/devices/system/cpu/cpu3/online                                             
I/TC: Secondary CPU 3 initializing                                                                                                                                                                                               
I/TC: Secondary CPU 3 switching to normal world boot                                                                                                                                                                             
[71401.705095] Detected VIPT I-cache on CPU3                                                                                                                                                                                     
[71401.709422] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000                                                                                                                                                     
[71401.716493] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
<br>
This can be repeated for any CPU, with the exception that one CPU must always remain online with this, that is, you cannot power off ALL CPUs simultaneously using the hotplug method.
<br>
<br>
Additional information can be found by consulting the kernel documentation on the subject:<br>
[https://github.com/varigit-dev/ti-linux-kernel/blob/{{#var:KERNEL_COMMIT}}/Documentation/core-api/cpu_hotplug.rst CPU hotplug in the Kernel]

Latest revision as of 19:02, 11 April 2024

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release am62-yocto-kirkstone-6.1.46_09.01.00.08-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
VAR-SOM-AM62 Low Power Modes

Background

TI's AM62 contains numerous low power modes and features. Extensive documentation on the subject can be found by consulting TI's Low Power Modes article.

While this wiki article does not serve to duplicate information, it will highlight some of the key important modes and usages on Variscite's development platform.

Suspend to RAM (Deep Sleep)

Deep Sleep AKA Suspend-to-RAM is a low-power mode that allows an embedded device to retain its state in RAM while the processor is turned off. This can save a significant amount of power, especially in devices that are battery-powered.

In order to enter deep sleep, use the following command:

root@am62x-var-som:~# pm-suspend
[   26.430955] mmc2: card 0001 removed
[   26.668685] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[   26.716750] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[   26.875564] PM: suspend entry (deep)
[   26.880123] Filesystems sync: 0.000 seconds
[   26.904501] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
[   26.925158] Freezing user space processes
[   26.931899] Freezing user space processes completed (elapsed 0.002 seconds)
[   26.938937] OOM killer disabled.
[   26.942261] Freezing remaining freezable tasks
[   26.948416] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[   26.955832] printk: Suspending console(s) (use no_console_suspend to debug)

Wake up

Various wakeup sources are possible on the AM62. On Variscite's development platform, the touchscreen has been configured as a wakeup source using TI's "I/O Daisy Chain" method.

ft5x06_ts: ft5x06_ts@38 {
	compatible = "edt,edt-ft5206";
	reg = <0x38>;
	pinctrl-names = "default";
	pinctrl-0 = <&captouch_pins_default>;
	interrupts-extended = <&main_gpio1 16 IRQ_TYPE_EDGE_FALLING>,
                              <&main_pmx0 0x1B8>;
	interrupt-names = "irq", "wakeup";
	touchscreen-size-x = <800>;
	touchscreen-size-y = <480>;
	touchscreen-inverted-x;
	touchscreen-inverted-y;
	wakeup-source;
	status = "okay";
};

Touching the screen after the system has been suspended will wake the system.

For more information on available wake-up sources, please consult TI's Wakeup Sources article.

CPU Hotplug

See the Variscite Set the CPU freq. and number of active cores article for more information.