Skip to content

Commit 20ffff8

Browse files
committed
tests: drivers: retained_mem: enable api test for esp32 platforms
Enables retained_mem api test using RTC RAM for the following platforms: - esp32_devkitc/esp32/procpu - esp32c3_devkitm - esp32c6_devkitc/esp32c6/hpcore - esp32h2_devkitm - esp32s2_saola - esp32s3_devkitm/esp32s3/procpu Signed-off-by: Marcio Ribeiro <[email protected]>
1 parent ab484e1 commit 20ffff8

File tree

7 files changed

+201
-0
lines changed

7 files changed

+201
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
retainedmemtestdevice = &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+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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_FAST_RAM_RETAINED_MEM";
12+
status = "okay";
13+
14+
retainedmem0: retainedmem {
15+
compatible = "zephyr,retained-ram";
16+
status = "okay";
17+
};
18+
};
19+
20+
aliases {
21+
retainedmemtestdevice = &retainedmem0;
22+
};
23+
};
24+
25+
&rtc_fast_ram {
26+
/* Shrink rtc_fast_ram size to avoid overlap with retained memory region:
27+
* 8KB - 256 = 0x1f00
28+
*/
29+
reg = <0x50000000 0x1f00>;
30+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 = "RTC_FAST_RAM_RETAINED_MEM";
12+
status = "okay";
13+
14+
retainedmem0: retainedmem {
15+
compatible = "zephyr,retained-ram";
16+
status = "okay";
17+
};
18+
};
19+
20+
aliases {
21+
retainedmemtestdevice = &retainedmem0;
22+
};
23+
};
24+
25+
&sramlp {
26+
/* Shrink sramlp size to avoid overlap with retained memory region:
27+
* 16KB - 256 = 0x3f00
28+
*/
29+
reg = <0x50000000 0x3f00>;
30+
};
31+
32+
&shmlp {
33+
/* Shift shmlp to keep it inside sramlp memory region:
34+
* 0x50003fe0 - 256 = 0x50003ee0
35+
*/
36+
reg = <0x50003ee0 0x10>;
37+
};
38+
39+
40+
&mbox0 {
41+
/*
42+
* 0x50003ff0 - 256 = 0x50003ef0
43+
*/
44+
reg = <0x50003ef0 0x8>;
45+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 = "RTC_FAST_RAM_RETAINED_MEM";
12+
status = "okay";
13+
14+
retainedmem0: retainedmem {
15+
compatible = "zephyr,retained-ram";
16+
status = "okay";
17+
};
18+
};
19+
20+
aliases {
21+
retainedmemtestdevice = &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+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
retainedmemtestdevice = &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+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
retainedmemtestdevice = &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+
};

tests/drivers/retained_mem/api/testcase.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ tests:
66
- retained_mem
77
drivers.retained_mem.api.ram:
88
platform_allow:
9+
- esp32_devkitc/esp32/procpu
10+
- esp32c3_devkitm
11+
- esp32c6_devkitc/esp32c6/hpcore
12+
- esp32h2_devkitm
13+
- esp32s2_saola
14+
- esp32s3_devkitm/esp32s3/procpu
915
- qemu_cortex_m3
1016
- nrf5340dk/nrf5340/cpuapp
1117
- nrf54h20dk/nrf54h20/cpuapp

0 commit comments

Comments
 (0)