diff --git a/boards/arm/nrf5340pdk_nrf5340/Kconfig.defconfig b/boards/arm/nrf5340pdk_nrf5340/Kconfig.defconfig index 117d7d24098d4..67980ca4080b1 100644 --- a/boards/arm/nrf5340pdk_nrf5340/Kconfig.defconfig +++ b/boards/arm/nrf5340pdk_nrf5340/Kconfig.defconfig @@ -26,8 +26,8 @@ config BOARD # If the secure firmware is to be combined with a non-secure image # (TRUSTED_EXECUTION_SECURE=y), the secure FW image SRAM shall always # be restricted to the secure image SRAM partition (sram-secure-partition). -# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole sram0 may be -# used by the image. +# Otherwise (if TRUSTED_EXECUTION_SECURE is not set) the whole zephyr,sram +# may be used by the image. # # For the non-secure version of the board, the firmware image SRAM is # always restricted to the allocated non-secure SRAM partition. diff --git a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts index e64584c71d909..3c3175f0e96d7 100644 --- a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts +++ b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts @@ -10,9 +10,10 @@ / { chosen { - zephyr,sram = &sram0; + zephyr,sram = &sram0_image; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; zephyr,sram-secure-partition = &sram0_s; + zephyr,sram-non-secure-partition = &sram0_ns; }; }; diff --git a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_common.dts b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_common.dts index 41164f004d749..c3994230cb748 100644 --- a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_common.dts +++ b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_common.dts @@ -164,21 +164,23 @@ }; }; -&sram0 { +/ { - partitions { - compatible = "fixed-partitions"; + reserved-memory { #address-cells = <1>; #size-cells = <1>; + ranges; + + sram0_image: image@20000000 { + /* Zephyr image(s) memory */ + }; - /* SRAM allocated to the Secure image */ - sram0_s: memory@20000000 { - label = "secure_sram_partition"; + sram0_s: image_s@20000000 { + /* Secure image memory */ }; - /* SRAM allocated to the Non-Secure image */ - sram0_ns: memory@20010000 { - label = "non_secure_sram_partition"; + sram0_ns: image_ns@20010000 { + /* Non-Secure image memory */ }; }; }; diff --git a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_partition_conf.dts b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_partition_conf.dts index f42697e6e68c7..73c200f1c09a4 100644 --- a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_partition_conf.dts +++ b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp_partition_conf.dts @@ -44,7 +44,7 @@ * - Upper 64 kB SRAM allocated as Shared memory (sram0_shared) * (see nrf5340pdk_nrf5340_shared_sram_planning_conf.dts) */ -&sram0 { +&sram0_image { reg = <0x20000000 DT_SIZE_K(448)>; }; diff --git a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_shared_sram_planning_conf.dts b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_shared_sram_planning_conf.dts index e0a2feece2038..b08bb94f6a578 100644 --- a/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_shared_sram_planning_conf.dts +++ b/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_shared_sram_planning_conf.dts @@ -8,7 +8,7 @@ * This file is included by both nRF5340 CPUAPP (Application MCU) * and nRF5340 CPUNET (Network MCU). * - 64 kB SRAM allocated as Shared memory (sram0_shared) - * - Region defined after the secure SRAM partition of CPUAPP + * - Region defined after the image SRAM of Application MCU */ / { @@ -17,10 +17,14 @@ zephyr,ipc_shm = &sram0_shared; }; - /* SRAM allocated to shared memory */ - sram0_shared: memory@20070000 { - device_type = "memory"; - compatible = "mmio-sram"; - reg = <0x20070000 DT_SIZE_K(64)>; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram0_shared: memory@20070000 { + /* SRAM allocated to shared memory */ + reg = <0x20070000 0x10000>; + }; }; }; diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts index 1cfb957261412..bdb79b85d88b0 100644 --- a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts @@ -10,8 +10,10 @@ / { chosen { - zephyr,sram = &sram0; + zephyr,sram = &sram0_s; zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; + zephyr,sram-secure-partition = &sram0_s; + zephyr,sram-non-secure-partition = &sram0_ns; }; }; diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts index ba5623ff1840e..afaf1678d7a5c 100644 --- a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts @@ -180,14 +180,23 @@ }; / { - /* SRAM allocated and used by the BSD library */ - sram0_bsd: memory@20010000 { - compatible = "mmio-sram"; - }; - /* SRAM allocated to the Non-Secure image */ - sram0_ns: memory@20020000 { - compatible = "mmio-sram"; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram0_s: image_s@20000000 { + /* Secure image memory */ + }; + + sram0_bsd: image_bsd@20010000 { + /* BSD (shared) memory */ + }; + + sram0_ns: image_ns@20020000 { + /* Non-Secure image memory */ + }; }; }; diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_partition_conf.dts b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_partition_conf.dts index 80b40bb785f60..4b97632cf6f08 100644 --- a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_partition_conf.dts +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_partition_conf.dts @@ -39,13 +39,13 @@ /* Default SRAM planning when building for nRF9160 with * ARM TrustZone-M support - * - Lowest 64 kB SRAM allocated to Secure image (sram0). + * - Lowest 64 kB SRAM allocated to Secure image (sram0_s). * - 64 kB SRAM reserved for and used by the BSD socket - * library. + * library (sram0_bsd). * - Upper 128 kB allocated to Non-Secure image (sram0_ns). */ -&sram0 { +&sram0_s { reg = <0x20000000 DT_SIZE_K(64)>; };