File tree Expand file tree Collapse file tree 11 files changed +286
-11
lines changed
samples/boards/espressif/deep_sleep Expand file tree Collapse file tree 11 files changed +286
-11
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ memory@50001f00 {
9+ compatible = "zephyr,memory-region", "mmio-sram";
10+ reg = <0x50001f00 0x100>;
11+ zephyr,memory-region = "RTC_SLOW_RAM_RETAINED_MEM";
12+ status = "okay";
13+
14+ retainedmem0: retainedmem {
15+ compatible = "zephyr,retained-ram";
16+ status = "okay";
17+ };
18+ };
19+
20+ aliases {
21+ retainedmemdevice = &retainedmem0;
22+ };
23+ };
24+
25+ &rtc_slow_ram {
26+ /* Shrink rtc_slow_ram size to avoid overlap with retained memory region:
27+ * 8KB - 256 = 0x1f00
28+ */
29+ reg = <0x50000000 0x1f00>;
30+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ memory@50003f00 {
9+ compatible = "zephyr,memory-region", "mmio-sram";
10+ reg = <0x50003f00 0x100>;
11+ zephyr,memory-region = "SRAMLP_RETAINED_MEM";
12+ status = "okay";
13+
14+ retainedmem0: retainedmem {
15+ compatible = "zephyr,retained-ram";
16+ status = "okay";
17+ };
18+ };
19+
20+ aliases {
21+ retainedmemdevice = &retainedmem0;
22+ };
23+ };
24+
25+ /* Delete original shmlp node */
26+ /delete-node/ &shmlp;
27+
28+ &sramlp {
29+ /* Shrink sramlp size to avoid overlap with retained memory region:
30+ * 16KB - 256 = 0x3f00
31+ */
32+ reg = <0x50000000 0x3f00>;
33+
34+ /* Shift shmlp to keep it inside sramlp memory region:
35+ * 0x50003fe0 - 256 = 0x50003ee0
36+ */
37+ shmlp: memory@50003ee0 {
38+ reg = <0x50003ee0 0x10>;
39+ };
40+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ memory@50000f00 {
9+ compatible = "zephyr,memory-region", "mmio-sram";
10+ reg = <0x50000f00 0x100>;
11+ zephyr,memory-region = "SRAMLP_RETAINED_MEM";
12+ status = "okay";
13+
14+ retainedmem0: retainedmem {
15+ compatible = "zephyr,retained-ram";
16+ status = "okay";
17+ };
18+ };
19+
20+ aliases {
21+ retainedmemdevice = &retainedmem0;
22+ };
23+ };
24+
25+ &sramlp {
26+ /* Shrink sramlp size to avoid overlap with retained memory region:
27+ * 4KB - 256 = 0xf00
28+ */
29+ reg = <0x50000000 0xf00>;
30+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ memory@50001f00 {
9+ compatible = "zephyr,memory-region", "mmio-sram";
10+ reg = <0x50001f00 0x100>;
11+ zephyr,memory-region = "RTC_SLOW_RAM_RETAINED_MEM";
12+ status = "okay";
13+
14+ retainedmem0: retainedmem {
15+ compatible = "zephyr,retained-ram";
16+ status = "okay";
17+ };
18+ };
19+
20+ aliases {
21+ retainedmemdevice = &retainedmem0;
22+ };
23+ };
24+
25+ &rtc_slow_ram {
26+ /* Shrink rtc_slow_ram size to avoid overlap with retained memory region:
27+ * 8KB - 256 = 0x1f00
28+ */
29+ reg = <0x50000000 0x1f00>;
30+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ memory@50001f00 {
9+ compatible = "zephyr,memory-region", "mmio-sram";
10+ reg = <0x50001f00 0x100>;
11+ zephyr,memory-region = "RTC_SLOW_RAM_RETAINED_MEM";
12+ status = "okay";
13+
14+ retainedmem0: retainedmem {
15+ compatible = "zephyr,retained-ram";
16+ status = "okay";
17+ };
18+ };
19+
20+ aliases {
21+ retainedmemdevice = &retainedmem0;
22+ };
23+ };
24+
25+ &rtc_slow_ram {
26+ /* Shrink rtc_slow_ram size to avoid overlap with retained memory region:
27+ * 8KB - 256 = 0x1f00
28+ */
29+ reg = <0x50000000 0x1f00>;
30+ };
Original file line number Diff line number Diff line change 11CONFIG_POWEROFF=y
2+ CONFIG_RETAINED_MEM=y
Original file line number Diff line number Diff line change 66 build_only : true
77 platform_allow :
88 - esp32_devkitc/esp32/procpu
9- - esp32s3_devkitm/esp32s3/procpu
10- - esp32s2_devkitc
119 - esp32c3_devkitm
1210 - esp32c6_devkitc/esp32c6/hpcore
11+ - esp32s2_saola
12+ - esp32s3_devkitm/esp32s3/procpu
13+ - esp32h2_devkitm
1314 - esp8684_devkitm
1415 sample.esp32.deep_sleep.dut :
1516 extra_args :
@@ -19,10 +20,11 @@ tests:
1920 - CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y
2021 platform_allow :
2122 - esp32_devkitc/esp32/procpu
22- - esp32s3_devkitm/esp32s3/procpu
23- - esp32s2_devkitc
2423 - esp32c3_devkitm
2524 - esp32c6_devkitc/esp32c6/hpcore
25+ - esp32s2_saola
26+ - esp32s3_devkitm/esp32s3/procpu
27+ - esp32h2_devkitm
2628 - esp8684_devkitm
2729 tags : esp32
2830 harness : console
Original file line number Diff line number Diff line change 1+ CONFIG_RETAINED_MEM=n
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
2+ * Copyright (c) 2022-2025 Espressif Systems (Shanghai) Co., Ltd.
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
1010 * as wake-up sources
1111 */
1212 wakeup-button = &sample_button;
13+ retainedmemdevice = &retainedmem0;
1314 };
1415
1516 gpio_keys {
1819 gpios = <&gpio0 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1920 };
2021 };
22+
23+ memory@50001f00 {
24+ compatible = "zephyr,memory-region", "mmio-sram";
25+ reg = <0x50001f00 0x100>;
26+ zephyr,memory-region = "RTC_FAST_RAM_RETAINED_MEM";
27+ status = "okay";
28+
29+ retainedmem0: retainedmem {
30+ compatible = "zephyr,retained-ram";
31+ status = "okay";
32+ };
33+ };
34+ };
35+
36+ &rtc_fast_ram {
37+ /* Shrink rtc_fast_ram size to avoid overlap with retained memory region:
38+ * 8KB - 256 = 0x1f00
39+ */
40+ reg = <0x50000000 0x1f00>;
2141};
Original file line number Diff line number Diff line change 1010 * as wake-up sources
1111 */
1212 wakeup-button = &sample_button;
13+ retainedmemdevice = &retainedmem0;
1314 };
1415
1516 gpio_keys {
1819 gpios = <&gpio0 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
1920 };
2021 };
22+
23+ memory@50001f00 {
24+ compatible = "zephyr,memory-region", "mmio-sram";
25+ reg = <0x50001f00 0x100>;
26+ zephyr,memory-region = "RTC_FAST_RAM_RETAINED_MEM";
27+ status = "okay";
28+
29+ retainedmem0: retainedmem {
30+ compatible = "zephyr,retained-ram";
31+ status = "okay";
32+ };
33+ };
34+ };
35+
36+ &rtc_fast_ram {
37+ /* Shrink rtc_fast_ram size to avoid overlap with retained memory region:
38+ * 8KB - 256 = 0x1f00
39+ */
40+ reg = <0x50000000 0x1f00>;
2141};
You can’t perform that action at this time.
0 commit comments