From 33ded99d3e706a82b966d281d3facce76a0dc05f Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 29 Nov 2024 13:00:43 +0100 Subject: [PATCH] benchmarks: system_off: align to new RAM retention in system_off sample Zephyr system_off sample changed how RAM retention is handled. Signed-off-by: Nikodem Kastelik --- .../boards/nrf52840dk_nrf52840.overlay | 22 ++++++++++ .../boards/nrf52dk_nrf52832.overlay | 22 ++++++++++ .../boards/nrf54l15dk_nrf54l05_cpuapp.overlay | 25 +++++++++++ .../boards/nrf54l15dk_nrf54l10_cpuapp.overlay | 25 +++++++++++ ...lay => nrf54l15dk_nrf54l15_cpuapp.overlay} | 0 .../system_off/testcase.yaml | 43 ++++++++----------- 6 files changed, 111 insertions(+), 26 deletions(-) create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay rename tests/benchmarks/current_consumption/system_off/boards/{nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay => nrf54l15dk_nrf54l15_cpuapp.overlay} (100%) diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 000000000000..c203d90a0a14 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,22 @@ +/ { + sram0@2003f000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2003f000 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + }; + }; + + aliases { + retainedmemdevice = &retainedmem0; + }; +}; + +&sram0 { + /* Shrink SRAM size to avoid overlap with retained memory region */ + reg = <0x20000000 DT_SIZE_K(252)>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay new file mode 100644 index 000000000000..13e2e99ddf28 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay @@ -0,0 +1,22 @@ +/ { + sram0@20007000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20007000 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + }; + }; + + aliases { + retainedmemdevice = &retainedmem0; + }; +}; + +&sram0 { + /* Shrink SRAM size to avoid overlap with retained memory region */ + reg = <0x20000000 DT_SIZE_K(28)>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay new file mode 100644 index 000000000000..6f4a9be80f9b --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay @@ -0,0 +1,25 @@ +/ { + cpuapp_sram@20017000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20017000 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + }; + }; + + aliases { + retainedmemdevice = &retainedmem0; + }; +}; + +&cpuapp_sram { + /* Shrink SRAM size to avoid overlap with retained memory region: + * 96 - 4 = 92KB = 0x17000 + */ + reg = <0x20000000 0x17000>; + ranges = <0x0 0x20000000 0x17000>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay new file mode 100644 index 000000000000..9705cf335a7f --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -0,0 +1,25 @@ +/ { + cpuapp_sram@2002f000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2002f000 DT_SIZE_K(4)>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + }; + }; + + aliases { + retainedmemdevice = &retainedmem0; + }; +}; + +&cpuapp_sram { + /* Shrink SRAM size to avoid overlap with retained memory region: + * 192 - 4 = 188KB = 0x2f000 + */ + reg = <0x20000000 0x2f000>; + ranges = <0x0 0x20000000 0x2f000>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp.overlay similarity index 100% rename from tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay rename to tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp.overlay diff --git a/tests/benchmarks/current_consumption/system_off/testcase.yaml b/tests/benchmarks/current_consumption/system_off/testcase.yaml index 717052bf0d98..ad781fd87f38 100644 --- a/tests/benchmarks/current_consumption/system_off/testcase.yaml +++ b/tests/benchmarks/current_consumption/system_off/testcase.yaml @@ -6,6 +6,8 @@ tests: benchmarks.current_consumption.systemoff.gpio_wakeup: platform_allow: - nrf54l15dk/nrf54l15/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp extra_args: DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay" @@ -15,18 +17,16 @@ tests: pytest_root: - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_wakeups" timeout: 80 - benchmarks.current_consumption.systemoff.gpio_wakeup_retained_mem: + benchmarks.current_consumption.systemoff.gpio_wakeup.retained_mem: platform_allow: - nrf54l15dk/nrf54l15/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp - extra_args: - - "DTC_OVERLAY_FILE= - boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay; - boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay" + extra_args: EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay" extra_configs: - CONFIG_APP_USE_RETAINED_MEM=y - - CONFIG_RETAINED_MEM=y harness: pytest harness_config: fixture: ppk_power_measure @@ -36,6 +36,8 @@ tests: benchmarks.current_consumption.systemoff.grtc_wakeup: platform_allow: - nrf54l15dk/nrf54l15/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf54l15dk/nrf54l15/cpuapp extra_configs: @@ -48,15 +50,17 @@ tests: timeout: 80 benchmarks.current_consumption.sample.boards.nrf.system_off: platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - integration_platforms: - nrf54l15dk/nrf54l15/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l05/cpuapp + integration_platforms: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp tags: ppk_power_measure harness: pytest harness_config: @@ -64,34 +68,21 @@ tests: pytest_root: - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_systemoff" timeout: 90 - benchmarks.current_consumption.sample.boards.nrf.system_off.nrf_retained: + benchmarks.current_consumption.sample.boards.nrf.system_off.retained_mem: platform_allow: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l15/cpuapp + - nrf54l15dk/nrf54l10/cpuapp + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - - nrf5340dk/nrf5340/cpuapp - extra_configs: - - CONFIG_APP_USE_NRF_RETENTION=y - tags: ppk_power_measure - harness: pytest - harness_config: - fixture: ppk_power_measure - pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_systemoff" - timeout: 90 - benchmarks.current_consumption.sample.boards.nrf.system_off.retained_mem: - platform_allow: - - nrf54l15dk/nrf54l15/cpuapp - integration_platforms: - nrf54l15dk/nrf54l15/cpuapp extra_args: - - "DTC_OVERLAY_FILE=boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay" + - "-DBOARD_ROOT=${ZEPHYR_BASE}/samples/boards/nordic/system_off" extra_configs: - CONFIG_APP_USE_RETAINED_MEM=y - - CONFIG_RETAINED_MEM=y tags: ppk_power_measure harness: pytest harness_config: