Commit b211e1b3 authored by Jacob Winther's avatar Jacob Winther Committed by Anas Nashif
Browse files

boards: nrf52840 common partition dtsi



Add common default flash partition layout for nrf52840 as many boards
have used identical flash layouts.

The default flash layout was updated to remove scrach in 2022 (9a842588)
but almost all boards were still using the previous layout, so this
updates them to the new layout with allows for larger applications.

This commit also incorporates feeedback from @nordicjm in PR #77791 to
change slot0 to 0x00077000 and slot1 to 0x00075000: "If you use swap
using move, you need a sector for the data to be moved up by, and you
need space for the swap status fields, which is about a sector, so by
making the changes here you get the full 0x65000 for an image, without
these changes you get 0x64000.

Signed-off-by: default avatarJacob Winther <jacob@9.nz>
parent db22e1a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@

/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
#include "adafruit_feather_nrf52840_flash.dtsi"
#include <nordic/nrf52840_partition.dtsi>

/ {
	model = "Adafruit Feather nRF52840 Express";
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
/ {

	chosen {
		zephyr,sram = &sram0;
		zephyr,ieee802154 = &ieee802154;
	};

+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

/ {
	chosen {
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &code_partition;
	};
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
#include "adafruit_feather_nrf52840_flash.dtsi"
#include <nordic/nrf52840_partition.dtsi>

/ {
	model = "Adafruit Feather nRF52840 Sense";
+1 −43
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <nordic/nrf52840_partition.dtsi>
#include "contextualelectronics_abc-pinctrl.dtsi"

/ {
@@ -15,9 +16,6 @@
	chosen {
		zephyr,console = &uart0;
		zephyr,shell-uart = &uart0;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot0_partition;
	};

	aliases {
@@ -95,43 +93,3 @@ arduino_i2c: &i2c0 {
	pinctrl-1 = <&spi2_sleep>;
	pinctrl-names = "default", "sleep";
};

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0x0000C000>;
		};
		slot0_partition: partition@c000 {
			label = "image-0";
			reg = <0x0000C000 0x00067000>;
		};
		slot1_partition: partition@73000 {
			label = "image-1";
			reg = <0x00073000 0x00067000>;
		};
		scratch_partition: partition@da000 {
			label = "image-scratch";
			reg = <0x000da000 0x0001e000>;
		};

		/*
		 * The flash starting at 0x000f8000 and ending at
		 * 0x000fffff is reserved for use by the application.
		 */

		/*
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@f8000 {
			label = "storage";
			reg = <0x000f8000 0x00008000>;
		};
	};
};
Loading