From 9f6f623f66d022d56da5dc527d86064f01dc26e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20G=C5=82=C4=85b?= Date: Thu, 12 Dec 2024 12:56:23 +0100 Subject: [PATCH] [nrf fromtree] tests: drivers: retained_mem: Run test on nrf54l20pdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add overlays to execute retained_mem test on nrf54l20pdk. Signed-off-by: Sebastian Głąb (cherry picked from commit eaf999288965ea1e3d8acb18501033e9028f4336) --- .../boards/nrf54l20pdk_nrf54l20_cpuapp.conf | 1 + .../nrf54l20pdk_nrf54l20_cpuapp.overlay | 25 +++++++++++++++++++ tests/drivers/retained_mem/api/testcase.yaml | 1 + 3 files changed, 27 insertions(+) create mode 100644 tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.conf create mode 100644 tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay diff --git a/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.conf b/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.conf new file mode 100644 index 00000000000..c15ba3ed96d --- /dev/null +++ b/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.conf @@ -0,0 +1 @@ +CONFIG_POWEROFF=y diff --git a/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay b/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay new file mode 100644 index 00000000000..dc81069eca5 --- /dev/null +++ b/tests/drivers/retained_mem/api/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay @@ -0,0 +1,25 @@ +/ { + cpuapp_sram@2007ec00 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2007ec00 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + }; + }; + + aliases { + retainedmemtestdevice = &retainedmem0; + }; +}; + +&cpuapp_sram { + /* Shrink SRAM size to avoid overlap with retained memory region: + * 511 - 4 = 507KB = 0x7ec00 + */ + reg = <0x20000000 DT_SIZE_K(507)>; + ranges = <0x0 0x20000000 0x7ec00>; +}; diff --git a/tests/drivers/retained_mem/api/testcase.yaml b/tests/drivers/retained_mem/api/testcase.yaml index 1f2e228ee01..ba7633bb86e 100644 --- a/tests/drivers/retained_mem/api/testcase.yaml +++ b/tests/drivers/retained_mem/api/testcase.yaml @@ -12,6 +12,7 @@ tests: - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp + - nrf54l20pdk/nrf54l20/cpuapp tags: - drivers - retained_mem