From 24cec7b267cb033a81c7d7dfe4e7347b2cccea8c Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 17 Oct 2025 12:16:00 +0100 Subject: [PATCH 1/3] [nrf fromlist] dts: arm: nordic: Add ranges and address/size cells to SRAM nodes Allows these nodes to be partitioned Upstream PR #: 97785 Signed-off-by: Jamie McCrae --- dts/arm/nordic/nrf51822.dtsi | 2 ++ dts/arm/nordic/nrf51822_qfaa.dtsi | 1 + dts/arm/nordic/nrf51822_qfab.dtsi | 1 + dts/arm/nordic/nrf51822_qfac.dtsi | 1 + dts/arm/nordic/nrf52805.dtsi | 2 ++ dts/arm/nordic/nrf52805_caaa.dtsi | 1 + dts/arm/nordic/nrf52810.dtsi | 2 ++ dts/arm/nordic/nrf52810_qfaa.dtsi | 1 + dts/arm/nordic/nrf52811.dtsi | 2 ++ dts/arm/nordic/nrf52811_qfaa.dtsi | 1 + dts/arm/nordic/nrf52820.dtsi | 2 ++ dts/arm/nordic/nrf52820_qdaa.dtsi | 1 + dts/arm/nordic/nrf52832.dtsi | 2 ++ dts/arm/nordic/nrf52832_ciaa.dtsi | 1 + dts/arm/nordic/nrf52832_qfaa.dtsi | 1 + dts/arm/nordic/nrf52832_qfab.dtsi | 1 + dts/arm/nordic/nrf52833.dtsi | 2 ++ dts/arm/nordic/nrf52833_qdaa.dtsi | 1 + dts/arm/nordic/nrf52833_qiaa.dtsi | 1 + dts/arm/nordic/nrf52840.dtsi | 2 ++ dts/arm/nordic/nrf52840_qfaa.dtsi | 1 + dts/arm/nordic/nrf52840_qiaa.dtsi | 1 + dts/arm/nordic/nrf5340_cpuapp.dtsi | 2 ++ dts/arm/nordic/nrf5340_cpuapp_qkaa.dtsi | 1 + dts/arm/nordic/nrf5340_cpuappns.dtsi | 2 ++ dts/arm/nordic/nrf5340_cpuappns_qkaa.dtsi | 1 + dts/arm/nordic/nrf5340_cpunet.dtsi | 4 ++++ dts/arm/nordic/nrf5340_cpunet_qkaa.dtsi | 2 ++ dts/arm/nordic/nrf91.dtsi | 2 ++ dts/arm/nordic/nrf9131_laca.dtsi | 1 + dts/arm/nordic/nrf9131ns_laca.dtsi | 1 + dts/arm/nordic/nrf9151_laca.dtsi | 1 + dts/arm/nordic/nrf9151ns_laca.dtsi | 1 + dts/arm/nordic/nrf9160_sica.dtsi | 1 + dts/arm/nordic/nrf9160ns_sica.dtsi | 1 + dts/arm/nordic/nrf9161_laca.dtsi | 1 + dts/arm/nordic/nrf9161ns_laca.dtsi | 1 + dts/arm/nordic/nrf91ns.dtsi | 2 ++ 38 files changed, 54 insertions(+) diff --git a/dts/arm/nordic/nrf51822.dtsi b/dts/arm/nordic/nrf51822.dtsi index cbfef90faa5..b2b4907e1ab 100644 --- a/dts/arm/nordic/nrf51822.dtsi +++ b/dts/arm/nordic/nrf51822.dtsi @@ -47,6 +47,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; power: power@40000000 { diff --git a/dts/arm/nordic/nrf51822_qfaa.dtsi b/dts/arm/nordic/nrf51822_qfaa.dtsi index 2aeec68fd85..b2ce647684e 100644 --- a/dts/arm/nordic/nrf51822_qfaa.dtsi +++ b/dts/arm/nordic/nrf51822_qfaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(16)>; + ranges = <0x0 0x20000000 DT_SIZE_K(16)>; }; / { diff --git a/dts/arm/nordic/nrf51822_qfab.dtsi b/dts/arm/nordic/nrf51822_qfab.dtsi index 6f6818ac460..d4327bb2b75 100644 --- a/dts/arm/nordic/nrf51822_qfab.dtsi +++ b/dts/arm/nordic/nrf51822_qfab.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(16)>; + ranges = <0x0 0x20000000 DT_SIZE_K(16)>; }; / { diff --git a/dts/arm/nordic/nrf51822_qfac.dtsi b/dts/arm/nordic/nrf51822_qfac.dtsi index eae879189c0..f41890945e4 100644 --- a/dts/arm/nordic/nrf51822_qfac.dtsi +++ b/dts/arm/nordic/nrf51822_qfac.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(32)>; + ranges = <0x0 0x20000000 DT_SIZE_K(32)>; }; / { diff --git a/dts/arm/nordic/nrf52805.dtsi b/dts/arm/nordic/nrf52805.dtsi index 2134605c9f8..a8677434dbc 100644 --- a/dts/arm/nordic/nrf52805.dtsi +++ b/dts/arm/nordic/nrf52805.dtsi @@ -52,6 +52,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52805_caaa.dtsi b/dts/arm/nordic/nrf52805_caaa.dtsi index 285d2144059..38daaff88d0 100644 --- a/dts/arm/nordic/nrf52805_caaa.dtsi +++ b/dts/arm/nordic/nrf52805_caaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(24)>; + ranges = <0x0 0x20000000 DT_SIZE_K(24)>; }; / { diff --git a/dts/arm/nordic/nrf52810.dtsi b/dts/arm/nordic/nrf52810.dtsi index 6e09220e78b..1f3a6827c97 100644 --- a/dts/arm/nordic/nrf52810.dtsi +++ b/dts/arm/nordic/nrf52810.dtsi @@ -56,6 +56,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52810_qfaa.dtsi b/dts/arm/nordic/nrf52810_qfaa.dtsi index bbc76ab7597..344eca772f3 100644 --- a/dts/arm/nordic/nrf52810_qfaa.dtsi +++ b/dts/arm/nordic/nrf52810_qfaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(24)>; + ranges = <0x0 0x20000000 DT_SIZE_K(24)>; }; / { diff --git a/dts/arm/nordic/nrf52811.dtsi b/dts/arm/nordic/nrf52811.dtsi index 12d0a0ea4d6..e105b1195e0 100644 --- a/dts/arm/nordic/nrf52811.dtsi +++ b/dts/arm/nordic/nrf52811.dtsi @@ -60,6 +60,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52811_qfaa.dtsi b/dts/arm/nordic/nrf52811_qfaa.dtsi index 17b387919dc..18eacff0623 100644 --- a/dts/arm/nordic/nrf52811_qfaa.dtsi +++ b/dts/arm/nordic/nrf52811_qfaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(24)>; + ranges = <0x0 0x20000000 DT_SIZE_K(24)>; }; / { diff --git a/dts/arm/nordic/nrf52820.dtsi b/dts/arm/nordic/nrf52820.dtsi index d15fbb2ae4e..7d5c3dcfcc7 100644 --- a/dts/arm/nordic/nrf52820.dtsi +++ b/dts/arm/nordic/nrf52820.dtsi @@ -60,6 +60,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52820_qdaa.dtsi b/dts/arm/nordic/nrf52820_qdaa.dtsi index a683ddcd2e6..585926d1a16 100644 --- a/dts/arm/nordic/nrf52820_qdaa.dtsi +++ b/dts/arm/nordic/nrf52820_qdaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(32)>; + ranges = <0x0 0x20000000 DT_SIZE_K(32)>; }; / { diff --git a/dts/arm/nordic/nrf52832.dtsi b/dts/arm/nordic/nrf52832.dtsi index eef2297c43b..0da6377556c 100644 --- a/dts/arm/nordic/nrf52832.dtsi +++ b/dts/arm/nordic/nrf52832.dtsi @@ -56,6 +56,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52832_ciaa.dtsi b/dts/arm/nordic/nrf52832_ciaa.dtsi index 81bed18daf2..28848a4d121 100644 --- a/dts/arm/nordic/nrf52832_ciaa.dtsi +++ b/dts/arm/nordic/nrf52832_ciaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(64)>; + ranges = <0x0 0x20000000 DT_SIZE_K(64)>; }; / { diff --git a/dts/arm/nordic/nrf52832_qfaa.dtsi b/dts/arm/nordic/nrf52832_qfaa.dtsi index 81bed18daf2..28848a4d121 100644 --- a/dts/arm/nordic/nrf52832_qfaa.dtsi +++ b/dts/arm/nordic/nrf52832_qfaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(64)>; + ranges = <0x0 0x20000000 DT_SIZE_K(64)>; }; / { diff --git a/dts/arm/nordic/nrf52832_qfab.dtsi b/dts/arm/nordic/nrf52832_qfab.dtsi index faecc765efd..5c0d3dd8abd 100644 --- a/dts/arm/nordic/nrf52832_qfab.dtsi +++ b/dts/arm/nordic/nrf52832_qfab.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(32)>; + ranges = <0x0 0x20000000 DT_SIZE_K(32)>; }; / { diff --git a/dts/arm/nordic/nrf52833.dtsi b/dts/arm/nordic/nrf52833.dtsi index 1b3620aa01c..444f23dd1e0 100644 --- a/dts/arm/nordic/nrf52833.dtsi +++ b/dts/arm/nordic/nrf52833.dtsi @@ -60,6 +60,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52833_qdaa.dtsi b/dts/arm/nordic/nrf52833_qdaa.dtsi index 64462d29269..2c4ebaa0014 100644 --- a/dts/arm/nordic/nrf52833_qdaa.dtsi +++ b/dts/arm/nordic/nrf52833_qdaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(128)>; + ranges = <0x0 0x20000000 DT_SIZE_K(128)>; }; / { diff --git a/dts/arm/nordic/nrf52833_qiaa.dtsi b/dts/arm/nordic/nrf52833_qiaa.dtsi index 6ab9a4f1e6e..2b15451b330 100644 --- a/dts/arm/nordic/nrf52833_qiaa.dtsi +++ b/dts/arm/nordic/nrf52833_qiaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(128)>; + ranges = <0x0 0x20000000 DT_SIZE_K(128)>; }; / { diff --git a/dts/arm/nordic/nrf52840.dtsi b/dts/arm/nordic/nrf52840.dtsi index f19383ba7e7..084f579d3b4 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -56,6 +56,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@40000000 { diff --git a/dts/arm/nordic/nrf52840_qfaa.dtsi b/dts/arm/nordic/nrf52840_qfaa.dtsi index 85acf5ab468..1f33a0ac0f2 100644 --- a/dts/arm/nordic/nrf52840_qfaa.dtsi +++ b/dts/arm/nordic/nrf52840_qfaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf52840_qiaa.dtsi b/dts/arm/nordic/nrf52840_qiaa.dtsi index 7986ab41fd6..3ad3537a05d 100644 --- a/dts/arm/nordic/nrf52840_qiaa.dtsi +++ b/dts/arm/nordic/nrf52840_qiaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; &power { diff --git a/dts/arm/nordic/nrf5340_cpuapp.dtsi b/dts/arm/nordic/nrf5340_cpuapp.dtsi index b4c077ea2bf..c12ac3f4a51 100644 --- a/dts/arm/nordic/nrf5340_cpuapp.dtsi +++ b/dts/arm/nordic/nrf5340_cpuapp.dtsi @@ -54,6 +54,8 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; peripheral@50000000 { diff --git a/dts/arm/nordic/nrf5340_cpuapp_qkaa.dtsi b/dts/arm/nordic/nrf5340_cpuapp_qkaa.dtsi index 76a2af38662..cd9983d949e 100644 --- a/dts/arm/nordic/nrf5340_cpuapp_qkaa.dtsi +++ b/dts/arm/nordic/nrf5340_cpuapp_qkaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 DT_SIZE_K(512)>; }; / { diff --git a/dts/arm/nordic/nrf5340_cpuappns.dtsi b/dts/arm/nordic/nrf5340_cpuappns.dtsi index 763e9ca7839..8e4aa44aa26 100644 --- a/dts/arm/nordic/nrf5340_cpuappns.dtsi +++ b/dts/arm/nordic/nrf5340_cpuappns.dtsi @@ -37,6 +37,8 @@ soc { sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; peripheral@40000000 { diff --git a/dts/arm/nordic/nrf5340_cpuappns_qkaa.dtsi b/dts/arm/nordic/nrf5340_cpuappns_qkaa.dtsi index 37d6a605556..6e18f646977 100644 --- a/dts/arm/nordic/nrf5340_cpuappns_qkaa.dtsi +++ b/dts/arm/nordic/nrf5340_cpuappns_qkaa.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 DT_SIZE_K(512)>; }; / { diff --git a/dts/arm/nordic/nrf5340_cpunet.dtsi b/dts/arm/nordic/nrf5340_cpunet.dtsi index be0fad16d66..6e67b91b0ce 100644 --- a/dts/arm/nordic/nrf5340_cpunet.dtsi +++ b/dts/arm/nordic/nrf5340_cpunet.dtsi @@ -48,11 +48,15 @@ sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; sram1: memory@21000000 { compatible = "zephyr,memory-region", "mmio-sram"; zephyr,memory-region = "SRAM1"; + #address-cells = <1>; + #size-cells = <1>; }; clock: clock@41005000 { diff --git a/dts/arm/nordic/nrf5340_cpunet_qkaa.dtsi b/dts/arm/nordic/nrf5340_cpunet_qkaa.dtsi index e9948125ba8..be16eedfc52 100644 --- a/dts/arm/nordic/nrf5340_cpunet_qkaa.dtsi +++ b/dts/arm/nordic/nrf5340_cpunet_qkaa.dtsi @@ -13,10 +13,12 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(512)>; + ranges = <0x0 0x20000000 DT_SIZE_K(512)>; }; &sram1 { reg = <0x21000000 DT_SIZE_K(64)>; + ranges = <0x0 0x21000000 DT_SIZE_K(64)>; }; / { diff --git a/dts/arm/nordic/nrf91.dtsi b/dts/arm/nordic/nrf91.dtsi index 7b7d4891651..de3e1f4d4b8 100644 --- a/dts/arm/nordic/nrf91.dtsi +++ b/dts/arm/nordic/nrf91.dtsi @@ -35,6 +35,8 @@ soc { sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; peripheral@50000000 { diff --git a/dts/arm/nordic/nrf9131_laca.dtsi b/dts/arm/nordic/nrf9131_laca.dtsi index 77fe73c22af..30c526af5d3 100644 --- a/dts/arm/nordic/nrf9131_laca.dtsi +++ b/dts/arm/nordic/nrf9131_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9131ns_laca.dtsi b/dts/arm/nordic/nrf9131ns_laca.dtsi index 6ab80a842a3..8426efcde26 100644 --- a/dts/arm/nordic/nrf9131ns_laca.dtsi +++ b/dts/arm/nordic/nrf9131ns_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9151_laca.dtsi b/dts/arm/nordic/nrf9151_laca.dtsi index 77fe73c22af..30c526af5d3 100644 --- a/dts/arm/nordic/nrf9151_laca.dtsi +++ b/dts/arm/nordic/nrf9151_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9151ns_laca.dtsi b/dts/arm/nordic/nrf9151ns_laca.dtsi index 6ab80a842a3..8426efcde26 100644 --- a/dts/arm/nordic/nrf9151ns_laca.dtsi +++ b/dts/arm/nordic/nrf9151ns_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9160_sica.dtsi b/dts/arm/nordic/nrf9160_sica.dtsi index 6bbe048277c..e00d03fb5af 100644 --- a/dts/arm/nordic/nrf9160_sica.dtsi +++ b/dts/arm/nordic/nrf9160_sica.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9160ns_sica.dtsi b/dts/arm/nordic/nrf9160ns_sica.dtsi index 12ec1fcbc8e..a10a5df325c 100644 --- a/dts/arm/nordic/nrf9160ns_sica.dtsi +++ b/dts/arm/nordic/nrf9160ns_sica.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9161_laca.dtsi b/dts/arm/nordic/nrf9161_laca.dtsi index 77fe73c22af..30c526af5d3 100644 --- a/dts/arm/nordic/nrf9161_laca.dtsi +++ b/dts/arm/nordic/nrf9161_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf9161ns_laca.dtsi b/dts/arm/nordic/nrf9161ns_laca.dtsi index 6ab80a842a3..8426efcde26 100644 --- a/dts/arm/nordic/nrf9161ns_laca.dtsi +++ b/dts/arm/nordic/nrf9161ns_laca.dtsi @@ -13,6 +13,7 @@ &sram0 { reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 DT_SIZE_K(256)>; }; / { diff --git a/dts/arm/nordic/nrf91ns.dtsi b/dts/arm/nordic/nrf91ns.dtsi index e44bbcde0a4..f4d88a6e635 100644 --- a/dts/arm/nordic/nrf91ns.dtsi +++ b/dts/arm/nordic/nrf91ns.dtsi @@ -35,6 +35,8 @@ soc { sram0: memory@20000000 { compatible = "mmio-sram"; + #address-cells = <1>; + #size-cells = <1>; }; peripheral@40000000 { From ab9e89f03a1a4e4a47806bcc2d75793c585de99e Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 17 Oct 2025 12:17:30 +0100 Subject: [PATCH 2/3] [nrf fromlist] dts: vendor: nordic: nrf91: Fix SRAM partitioning Uses the correct way to partition memory as per the linux binding, also fixes names which were not compliant with the zephyr devicetree guidelines Upstream PR #: 97785 Signed-off-by: Jamie McCrae --- dts/vendor/nordic/nrf91xx_partition.dtsi | 31 +++++++++++------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/dts/vendor/nordic/nrf91xx_partition.dtsi b/dts/vendor/nordic/nrf91xx_partition.dtsi index dd98ce62f8e..89bc968a67d 100644 --- a/dts/vendor/nordic/nrf91xx_partition.dtsi +++ b/dts/vendor/nordic/nrf91xx_partition.dtsi @@ -94,7 +94,7 @@ }; }; -/ { +&sram0 { /* * Default SRAM planning when building for nRF91xx with * ARM TrustZone-M support @@ -104,29 +104,26 @@ * - 40 kB SRAM reserved for and used by the modem library (sram0_ns_modem). * - 128 kB allocated to the application (sram0_ns_app). */ - reserved-memory { + sram0_s: sram@0 { + /* Secure image memory */ + reg = <0x0 DT_SIZE_K(88)>; + }; + + sram0_ns: sram@16000 { + /* Non-Secure image memory */ + reg = <0x16000 DT_SIZE_K(168)>; #address-cells = <1>; #size-cells = <1>; - ranges; - - sram0_s: image_s@20000000 { - /* Secure image memory */ - reg = <0x20000000 DT_SIZE_K(88)>; - }; - - sram0_ns: image_ns@20016000 { - /* Non-Secure image memory */ - reg = <0x20016000 DT_SIZE_K(168)>; - }; + ranges = <0x0 0x16000 DT_SIZE_K(168)>; - sram0_ns_modem: image_ns_modem@20016000 { + sram0_ns_modem: sram@0 { /* Modem (shared) memory */ - reg = <0x20016000 DT_SIZE_K(40)>; + reg = <0x0 DT_SIZE_K(40)>; }; - sram0_ns_app: image_ns_app@20020000 { + sram0_ns_app: sram@a000 { /* Non-Secure application memory */ - reg = <0x20020000 DT_SIZE_K(128)>; + reg = <0xa000 DT_SIZE_K(128)>; }; }; }; From 8c869a019f2ee00430272c263f2301e095bfb269 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 17 Oct 2025 12:21:00 +0100 Subject: [PATCH 3/3] [nrf fromlist] dts: vendor: nordic: nrf5340: Fix SRAM partitioning Uses the correct way to partition memory as per the linux binding, also fixes names which were not compliant with the zephyr devicetree guidelines Upstream PR #: 97785 Signed-off-by: Jamie McCrae --- .../nordic/nrf5340_shared_sram_partition.dtsi | 14 +++---- dts/vendor/nordic/nrf5340_sram_partition.dtsi | 38 ++++++++----------- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/dts/vendor/nordic/nrf5340_shared_sram_partition.dtsi b/dts/vendor/nordic/nrf5340_shared_sram_partition.dtsi index a5dc3489e89..980a6a0f3b7 100644 --- a/dts/vendor/nordic/nrf5340_shared_sram_partition.dtsi +++ b/dts/vendor/nordic/nrf5340_shared_sram_partition.dtsi @@ -21,15 +21,11 @@ chosen { zephyr,ipc_shm = &sram0_shared; }; +}; - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sram0_shared: memory@20070000 { - /* Last 64 kB of sram0 */ - reg = <0x20070000 0x10000>; - }; +&sram0 { + sram0_shared: sram@70000 { + /* Last 64 kB of sram0 */ + reg = <0x70000 0x10000>; }; }; diff --git a/dts/vendor/nordic/nrf5340_sram_partition.dtsi b/dts/vendor/nordic/nrf5340_sram_partition.dtsi index db1d9dd4f16..f844e07498c 100644 --- a/dts/vendor/nordic/nrf5340_sram_partition.dtsi +++ b/dts/vendor/nordic/nrf5340_sram_partition.dtsi @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -/ { +&sram0 { /* Default SRAM planning when building for nRF5340 with ARM TF-M support * - Lowest 256 kB SRAM allocated to Secure image (sram0_s) * - Upper 256 kB allocated to Non-Secure image (sram0_ns) @@ -13,29 +13,23 @@ * - 64 kB allocated to shared memory (sram0_shared). * (See nrf5340_shared_sram_partition.dtsi) */ - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sram0_image: image@20000000 { - /* Zephyr image(s) memory */ - reg = <0x20000000 DT_SIZE_K(448)>; - }; + sram0_image: sram@0 { + /* Zephyr image(s) memory */ + reg = <0x20000000 DT_SIZE_K(448)>; + }; - sram0_s: image_s@20000000 { - /* Secure image memory */ - reg = <0x20000000 0x40000>; - }; + sram0_s: sram@20000000 { + /* Secure image memory */ + reg = <0x20000000 0x40000>; + }; - sram0_ns: image_ns@20040000 { - /* Non-Secure image memory */ - reg = <0x20040000 0x40000>; - }; + sram0_ns: sram@20040000 { + /* Non-Secure image memory */ + reg = <0x20040000 0x40000>; + }; - sram0_ns_app: image_ns_app@20040000 { - /* Non-Secure image memory */ - reg = <0x20040000 0x30000>; - }; + sram0_ns_app: sram@20040000 { + /* Non-Secure image memory */ + reg = <0x20040000 0x30000>; }; };