From a0148220aa973d74bd9c593724cdfce3714e1113 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 15 Jun 2017 14:25:47 -0400 Subject: [PATCH] [LTD fromlist] arm: nxp: k6x: Add default partition table. Recent changes (69255043, 91f67a13, 84628e8b, fa4a3932) add support for a partition table in the flash. Add support for this to the nxp k6x dtsi file. By default, code will occupy the entire flash. By setting a chosen node in an application, the code can be linked into one of the partitions. For example, and app could create a 'frdm_k64f.overlay' file at the top of their project with: / { chosen { zephyr,code-partition = &slot0_partition; }; }; to place an application in slot 0. Signed-off-by: David Brown --- dts/arm/nxp/nxp_k6x.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dts/arm/nxp/nxp_k6x.dtsi b/dts/arm/nxp/nxp_k6x.dtsi index c22a9249c284..8b04a06d4855 100644 --- a/dts/arm/nxp/nxp_k6x.dtsi +++ b/dts/arm/nxp/nxp_k6x.dtsi @@ -65,6 +65,34 @@ flash0: flash@0 { reg = <0 0x100000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x00010000>; + read-only; + }; + app_state_partition: partition@10000 { + label = "application-state"; + reg = <0x00010000 0x00010000>; + }; + slot0_partition: partition@20000 { + label = "image-0"; + reg = <0x00020000 0x00060000>; + }; + slot1_partition: partition@60000 { + label = "image-1"; + reg = <0x00080000 0x00060000>; + }; + scratch_partition: partition@e0000 { + label = "image-scratch"; + reg = <0x000e0000 0x00020000>; + }; + }; }; };