Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: arm: Enable mcuboot on mimxrt106x_evk (v2) #34845

Merged
merged 5 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions boards/arm/mimxrt1060_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ endchoice
config DISK_DRIVER_SDMMC
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
default y if KSCAN

Expand Down
2 changes: 2 additions & 0 deletions boards/arm/mimxrt1060_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ features:
+-----------+------------+-------------------------------------+
| DISPLAY | on-chip | display |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | QSPI flash |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
Expand Down
36 changes: 36 additions & 0 deletions boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
};

chosen {
zephyr,flash-controller = &flexspi;
zephyr,flash = &is25wp064;
zephyr,code-partition = &slot0_partition;
zephyr,sram = &sdram0;
zephyr,itcm = &itcm;
zephyr,dtcm = &dtcm;
Expand Down Expand Up @@ -92,6 +95,10 @@
arduino_serial: &lpuart3 {};

&flexspi {
status = "okay";
ahb-prefetch;
ahb-read-addr-opt;
rx-clock-source = <1>;
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we declare the size property if there are multiple memory devices connected to the same controller? As the sum?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know yet. Since we're close to closing the 2.6 merge window, I wanted to get initial support for mcuboot in now and revisit multiple device support in the 2.7 release cycle. Do you have multiple memory devices on the same bus on your custom board?

Maybe we can do something like this?

reg =	<0x402a8000 0x4000>,		/* FlexSPI peripheral registers */
	<0x60000000 DT_SIZE_M(8)>,	/* device 0 */
	<0x60800000 DT_SIZE_M(8)>,	/* device 1 */
	<0x61000000 DT_SIZE_M(8)>,	/* device 2 */
	<0x61800000 DT_SIZE_M(8)>;	/* device 3 */

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have it on any of my devices, it was a general question.

Your proposal seems reasonable, however it still feels like there is a big disconnect between the controller and devices, especially if they are scattered across dts/dtsi files.

is25wp064: is25wp064@0 {
compatible = "nxp,imx-flexspi-nor";
Expand All @@ -101,6 +108,35 @@ arduino_serial: &lpuart3 {};
spi-max-frequency = <133000000>;
status = "okay";
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)>;
};
};
};
};

Expand Down
9 changes: 9 additions & 0 deletions boards/arm/mimxrt1060_evk/mimxrt1060_evk_hyperflash.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
#include "mimxrt1060_evk.dts"

/delete-node/ &is25wp064;

/ {
chosen {
/delete-property/ zephyr,flash-controller;
/delete-property/ zephyr,flash;
/delete-property/ zephyr,code-partition;
};
};

&flexspi {
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(64)>;
s26ks512s0: s26ks512s@0 {
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/mimxrt1064_evk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ config DISK_DRIVER_SDMMC
config FLASH_MCUX_FLEXSPI_NOR
default y if FLASH

config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH

config I2C
default y if KSCAN

Expand Down
2 changes: 2 additions & 0 deletions boards/arm/mimxrt1064_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ features:
+-----------+------------+-------------------------------------+
| DISPLAY | on-chip | display |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | QSPI flash |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| SDHC | on-chip | disk access |
Expand Down
32 changes: 32 additions & 0 deletions boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
};

chosen {
zephyr,flash-controller = &flexspi2;
zephyr,flash = &w25q32jvwj0;
zephyr,code-partition = &slot0_partition;
zephyr,sram = &sdram0;
zephyr,itcm = &itcm;
zephyr,dtcm = &dtcm;
Expand Down Expand Up @@ -160,6 +163,35 @@ arduino_i2c: &lpi2c1 {};
};
};

&flexspi2 {
status = "okay";
};

&w25q32jvwj0 {
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>;
Expand Down
2 changes: 1 addition & 1 deletion samples/subsys/fs/littlefs/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ tests:
sample.filesystem.littlefs:
build_only: true
platform_allow: nrf52840dk_nrf52840 particle_xenon disco_l475_iot1
mimxrt1064_evk qemu_x86 native_posix
mimxrt1060_evk mimxrt1064_evk qemu_x86 native_posix
tags: filesystem
2 changes: 1 addition & 1 deletion samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tests:
platform_allow: nrf52840dk_nrf52840
sample.mcumg.smp_svr.shell:
extra_args: OVERLAY_CONFIG="overlay-shell.conf"
platform_allow: nrf52840dk_nrf52840
platform_allow: nrf52840dk_nrf52840 mimxrt1060_evk mimxrt1064_evk
sample.mcumg.smp_svr.shell_mgmt:
extra_args: OVERLAY_CONFIG="overlay-shell-mgmt.conf"
platform_allow: nrf52840dk_nrf52840
Expand Down