Skip to content

Commit d1f62cd

Browse files
lib: ram_pwrdwn: add support for nRF54L10 and nRF54L05
Add support for nRF54L10 and nRF54L05 and enable ram power down for these SoCs in Matter and OpenThread. Signed-off-by: Maciej Baczmanski <[email protected]>
1 parent 94e406b commit d1f62cd

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

lib/ram_pwrdn/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
menuconfig RAM_POWER_DOWN_LIBRARY
88
bool "Enable API for turning off unused RAM segments"
9-
depends on SOC_NRF52840 || SOC_NRF52833 || SOC_NRF5340_CPUAPP || SOC_NRF54L15_CPUAPP
9+
depends on SOC_NRF52840 || SOC_NRF52833 || SOC_NRF5340_CPUAPP || SOC_SERIES_NRF54LX
1010
# Powering down RAM blocks can only be done from the secure domain
1111
# for security reasons. If necessary, this limitation could be
1212
# addressed by a secure service in the future.

lib/ram_pwrdn/ram_pwrdn.c

+10-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <hal/nrf_power.h>
1414
#elif defined(CONFIG_SOC_NRF5340_CPUAPP)
1515
#include <hal/nrf_vmc.h>
16-
#elif defined(CONFIG_SOC_NRF54L15_CPUAPP)
16+
#elif defined(CONFIG_SOC_SERIES_NRF54LX)
1717
#include <hal/nrf_memconf.h>
1818
#else
1919
#error "RAM power-down library is not supported on the current platform"
@@ -47,6 +47,13 @@ static const struct ram_bank banks[] = {
4747
* the same bank.
4848
*/
4949
{ .start = 0x20000000UL, .section_count = 8, .section_size = 0x8000 },
50+
#elif defined(CONFIG_SOC_NRF54L10_CPUAPP)
51+
/* Section numbers for RAM00 are 0-3 and for RAM01 are 4-5 within
52+
* the same bank.
53+
*/
54+
{ .start = 0x20000000UL, .section_count = 6, .section_size = 0x8000 },
55+
#elif defined(CONFIG_SOC_NRF54L05_CPUAPP)
56+
{ .start = 0x20000000UL, .section_count = 3, .section_size = 0x8000 },
5057
#elif defined(CONFIG_SOC_NRF52840) || defined(CONFIG_SOC_NRF52833)
5158
{ .start = 0x20000000UL, .section_count = 2, .section_size = 0x1000 },
5259
{ .start = 0x20002000UL, .section_count = 2, .section_size = 0x1000 },
@@ -86,7 +93,7 @@ static void ram_bank_power_down(uint8_t bank_id, uint8_t first_section_id, uint8
8693
uint32_t mask = GENMASK(VMC_RAM_POWER_S0POWER_Pos + last_section_id,
8794
VMC_RAM_POWER_S0POWER_Pos + first_section_id);
8895
nrf_vmc_ram_block_power_clear(NRF_VMC, bank_id, mask);
89-
#elif defined(CONFIG_SOC_NRF54L15_CPUAPP)
96+
#elif defined(CONFIG_SOC_SERIES_NRF54LX)
9097
uint32_t mask = GENMASK(MEMCONF_POWER_CONTROL_MEM0_Pos + last_section_id,
9198
MEMCONF_POWER_CONTROL_MEM0_Pos + first_section_id);
9299
nrf_memconf_ramblock_control_mask_enable_set(NRF_MEMCONF, bank_id, mask, false);
@@ -106,7 +113,7 @@ static void ram_bank_power_up(uint8_t bank_id, uint8_t first_section_id, uint8_t
106113
uint32_t mask = GENMASK(VMC_RAM_POWER_S0POWER_Pos + last_section_id,
107114
VMC_RAM_POWER_S0POWER_Pos + first_section_id);
108115
nrf_vmc_ram_block_power_set(NRF_VMC, bank_id, mask);
109-
#elif defined(CONFIG_SOC_NRF54L15_CPUAPP)
116+
#elif defined(CONFIG_SOC_SERIES_NRF54LX)
110117
uint32_t mask = GENMASK(MEMCONF_POWER_CONTROL_MEM0_Pos + last_section_id,
111118
MEMCONF_POWER_CONTROL_MEM0_Pos + first_section_id);
112119
nrf_memconf_ramblock_control_mask_enable_set(NRF_MEMCONF, bank_id, mask, true);

samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l10_cpuapp.conf

-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ CONFIG_NVS=n
1919

2020
# Low Power mode
2121
CONFIG_POWEROFF=y
22-
23-
# Disabling of unused RAM blocks to reduce power consumption is not yet available for nRF54L10 SoC
24-
CONFIG_RAM_POWER_DOWN_LIBRARY=n

samples/matter/template/boards/nrf54l15dk_nrf54l10_cpuapp.conf

-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10
1717
# Workaround required as Zephyr L2 implies usage of NVS backend for settings.
1818
# It should be removed once the proper fix will be applied in Zephyr.
1919
CONFIG_NVS=n
20-
21-
# Disabling of unused RAM blocks to reduce power consumption is not yet available for nRF54L10 SoC
22-
CONFIG_RAM_POWER_DOWN_LIBRARY=n

samples/openthread/cli/README.rst

-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ The following snippets are available:
125125
* ``tcp`` - Enables experimental TCP support in this sample.
126126
* ``low_power`` - Enables low power consumption mode in this sample.
127127

128-
.. note::
129-
The ``low_power`` snippet does not support the ``nrf54l15dk/nrf54l10/cpuapp`` board target.
130-
131128
FEM support
132129
===========
133130

0 commit comments

Comments
 (0)