boards: arm: Add mcuboot and flash storage partitions to mimxrt1060_evk

Adds flash partitions and chosen nodes to the mimxrt1060_evk device tree
to support mcuboot and storage on the external QSPI flash. This flash is
rated for 100K minimum program-erase cycles per sector, therefore this
partition configuration supports approximately 100K / (3072/128) = 4167
upgrades.

Also enables FlexSPI flash driver XIP mode support on this board to
support mcuboot.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2021-05-04 19:50:15 -05:00 committed by Anas Nashif
commit 62e3298bed
3 changed files with 51 additions and 0 deletions

View file

@ -16,6 +16,12 @@ endchoice
config DISK_DRIVER_SDMMC config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS default y if DISK_DRIVERS
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH && BOARD_MIMXRT1060_EVK
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH && BOARD_MIMXRT1060_EVK
config I2C config I2C
default y if KSCAN default y if KSCAN

View file

@ -20,6 +20,9 @@
}; };
chosen { chosen {
zephyr,flash-controller = &flexspi;
zephyr,flash = &is25wp064;
zephyr,code-partition = &slot0_partition;
zephyr,sram = &sdram0; zephyr,sram = &sdram0;
zephyr,itcm = &itcm; zephyr,itcm = &itcm;
zephyr,dtcm = &dtcm; zephyr,dtcm = &dtcm;
@ -92,6 +95,10 @@
arduino_serial: &lpuart3 {}; arduino_serial: &lpuart3 {};
&flexspi { &flexspi {
status = "okay";
ahb-prefetch;
ahb-read-addr-opt;
rx-clock-source = <1>;
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>; reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>;
is25wp064: is25wp064@0 { is25wp064: is25wp064@0 {
compatible = "nxp,imx-flexspi-nor"; compatible = "nxp,imx-flexspi-nor";
@ -101,6 +108,35 @@ arduino_serial: &lpuart3 {};
spi-max-frequency = <133000000>; spi-max-frequency = <133000000>;
status = "okay"; status = "okay";
jedec-id = [9d 70 17]; jedec-id = [9d 70 17];
erase-block-size = <4096>;
write-block-size = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_M(3)>;
};
slot1_partition: partition@310000 {
label = "image-1";
reg = <0x00310000 DT_SIZE_M(3)>;
};
scratch_partition: partition@610000 {
label = "image-scratch";
reg = <0x00610000 DT_SIZE_K(128)>;
};
storage_partition: partition@630000 {
label = "storage";
reg = <0x00630000 DT_SIZE_K(1856)>;
};
};
}; };
}; };

View file

@ -7,6 +7,15 @@
#include "mimxrt1060_evk.dts" #include "mimxrt1060_evk.dts"
/delete-node/ &is25wp064; /delete-node/ &is25wp064;
/ {
chosen {
/delete-property/ zephyr,flash-controller;
/delete-property/ zephyr,flash;
/delete-property/ zephyr,code-partition;
};
};
&flexspi { &flexspi {
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(64)>; reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(64)>;
s26ks512s0: s26ks512s@0 { s26ks512s0: s26ks512s@0 {