From e12e126f3262ffcac90572a6be4dffe12f17a30f Mon Sep 17 00:00:00 2001 From: Mikkel Jakobsen Date: Tue, 31 Aug 2021 20:06:27 +0200 Subject: [PATCH] boards: arm: Add mcuboot flash partitions to mimxrt1024_evk Adds flash partitions and chosen nodes to the mimxrt1024_evk device tree to support mcuboot on the internal QSPI flash. Also adds missing zephyr,itcm chosen node. Also enables FlexSPI flash driver XIP mode support on this board to support mcuboot. Signed-off-by: Mikkel Jakobsen --- boards/arm/mimxrt1024_evk/Kconfig.defconfig | 6 ++++ boards/arm/mimxrt1024_evk/mimxrt1024_evk.dts | 33 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/boards/arm/mimxrt1024_evk/Kconfig.defconfig b/boards/arm/mimxrt1024_evk/Kconfig.defconfig index 8bb25ab156a..010660facf1 100644 --- a/boards/arm/mimxrt1024_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1024_evk/Kconfig.defconfig @@ -12,4 +12,10 @@ choice CODE_LOCATION default CODE_FLEXSPI endchoice +config FLASH_MCUX_FLEXSPI_NOR + default y if FLASH + +config FLASH_MCUX_FLEXSPI_XIP + default y if FLASH + endif # BOARD_MIMXRT1024_EVK diff --git a/boards/arm/mimxrt1024_evk/mimxrt1024_evk.dts b/boards/arm/mimxrt1024_evk/mimxrt1024_evk.dts index 0b888295d03..f1ba0875233 100644 --- a/boards/arm/mimxrt1024_evk/mimxrt1024_evk.dts +++ b/boards/arm/mimxrt1024_evk/mimxrt1024_evk.dts @@ -18,7 +18,11 @@ }; chosen { + zephyr,flash-controller = &flexspi; + zephyr,flash = &is25wp032; + zephyr,code-partition = &slot0_partition; zephyr,sram = &sdram0; + zephyr,itcm = &itcm; zephyr,dtcm = &dtcm; zephyr,console = &lpuart1; zephyr,shell-uart = &lpuart1; @@ -47,6 +51,35 @@ }; }; +&is25wp032 { + status = "okay"; + 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_K(1984)>; + }; + + slot1_partition: partition@200000 { + label = "image-1"; + reg = <0x00200000 DT_SIZE_K(1984)>; + }; + + scratch_partition: partition@3f0000 { + label = "image-scratch"; + reg = <0x003f0000 DT_SIZE_K(64)>; + }; + }; +}; + &lpuart1 { status = "okay"; current-speed = <115200>;