Skip to content

Commit 778e8a1

Browse files
committed
fix(linux): pm: restore rtc_ddr doc page
Commit f1723aa ("Power Management: Move under Foundational_Components") moved the Power Management docs under a new header and updated the paths in only K3 devices. Then, during commit 7918014 ("fix(configs): Cleanup SITARA's toc tree") these were cleaned in the toc trees of legacy devices. But it misses correctly renaming the pm_rtc_ddr file in AM437X. This is the only SoC which is using this page. As a result, now this file shows up as an unreachable file. So, commit 5904b7a ("fix(unreachable): purge all unreachable files") removes this file. Restore the pm_rtc_ddr doc and correctly add it in AM437X's toc tree. This also rectifies some build warnings as this file is still being referenced in other AM437X docs. Signed-off-by: T Pratham <t-pratham@ti.com>
1 parent ab281b9 commit 778e8a1

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

configs/AM437X/AM437X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ linux/Foundational_Components/Power_Management/pm_overview
7777
linux/Foundational_Components/Power_Management/pm_dvfs
7878
linux/Foundational_Components/Power_Management/pm_cpuidle
7979
linux/Foundational_Components/Power_Management/pm_suspend_resume
80+
linux/Foundational_Components/Power_Management/pm_rtc_ddr
8081
linux/Foundational_Components_Filesystem
8182
linux/Foundational_Components_Tools
8283
linux/Foundational_Components/Tools/Development_Tools
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#########################
2+
RTC-Only and RTC+DDR Mode
3+
#########################
4+
5+
AM437x supports two RTC modes, RTC+DDR and RTC-Only mode. RTC+DDR Mode is similar to the
6+
Suspend/Resume above but only supports wake by the Power Button present
7+
on the board or from an RTC ALARM2 Event. RTC-Only mode supports the
8+
same wake sources, however DDR context is not maintained so a wake event
9+
causes a cold boot.
10+
11+
RTC-Only mode is supported on:
12+
13+
- AM437x GP EVM
14+
- AM437x SK EVM
15+
16+
RTC+DDR mode is supported on:
17+
18+
- AM437x GP EVM
19+
20+
.. rubric:: RTC+DDR Mode
21+
22+
The first step in using RTC+DDR mode is to enable off mode by typing the
23+
following at the command line:
24+
25+
.. code-block:: console
26+
27+
$ echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
28+
29+
With off-mode enabled, a command to enter DeepSleep0 will now enter
30+
RTC-Only mode:
31+
32+
.. code-block:: console
33+
34+
$ echo mem > /sys/power/state
35+
36+
This method of entry only supports Power button as the wake source.
37+
38+
To use the rtc as a wake source, after enabling off mode use the
39+
following command:
40+
41+
.. code-block:: console
42+
43+
$ rtcwake -s <NUMBER OF SECONDS TO SLEEP> -d /dev/rtc0 -m mem
44+
45+
Whether or not your board enters RTC-Only mode or RTC+DDR mode depends
46+
on the regulator configuration and whether or not the regulator that
47+
supplies the DDR is configured to remain on during suspend. This is
48+
supported by the TPS65218 in use of the AM437x boards but not the
49+
TPS65217 or TPS65910 present on AM335x boards.
50+
51+
.. code-block:: dts
52+
53+
tps65218: tps65218@24 {
54+
reg = <0x24>;
55+
compatible = "ti,tps65218";
56+
interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
57+
interrupt-parent = <&gic>;
58+
interrupt-controller;
59+
#interrupt-cells = <2>;
60+
61+
...
62+
63+
dcdc3: regulator-dcdc3 {
64+
compatible = "ti,tps65218-dcdc3";
65+
regulator-name = "vdcdc3";
66+
regulator-suspend-enable;
67+
regulator-min-microvolt = <1500000>;
68+
regulator-max-microvolt = <1500000>;
69+
regulator-boot-on;
70+
regulator-always-on;
71+
};
72+
73+
...
74+
75+
};
76+
77+
Another important thing to make sure of is that you are using the proper
78+
u-boot. A certain u-boot is required in order to support RTC+DDR mode
79+
otherwise the following message appears during boot of the kernel:
80+
81+
``PM: bootloader does not support rtc-only!``
82+
83+
When building u-boot, rather than using ``am43xx_evm_config`` you must
84+
use ``am43xx_evm_rtconly_config`` to support either RTC mode.
85+
86+
.. rubric:: RTC-Only Mode
87+
88+
RTC-Only mode does not maintain DDR context so placing a board into
89+
RTC-only mode allows for very low power consumption after which a
90+
supported wake source will cause a cold boot. RTC-Only mode is entered
91+
via the poweroff command.
92+
93+
To wakeup from RTC-Only mode via an RTC alarm, a separate tool must be
94+
used to program an RTC alarm prior to entering poweroff.

0 commit comments

Comments
 (0)