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

Conversation

MaureenHelm
Copy link
Member

Enables mcuboot on mimxrt1060_evk and mimxrt1064_evk boards by adding flash partitions and chosen nodes to the device tree.

This is an alternative to #34428 suggested by @galak that avoids modifying the dts register definition of a spi controller.

Tested Device Firmware Upgrade over the shell transport on both boards.

Adds flash partitions and chosen nodes to the mimxrt1064_evk device tree
to support mcuboot on the internal QSPI flash. This flash is rated for
100K minimum program-erase cycles per sector, therefore this partition
configuration supports approximately 100K / (1984/64) = 3225 upgrades.

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

Signed-off-by: Maureen Helm <[email protected]>
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 <[email protected]>
Documents QSPI flash driver support on mimxrt1060_evk and mimxrt1064_evk
boards.

Signed-off-by: Maureen Helm <[email protected]>
Adds mimxrt1060_evk and mimxrt1064_evk boards to the platform_allow list
for the smp_svr sample application.

Signed-off-by: Maureen Helm <[email protected]>
Adds the mimxrt1060_evk board to the platform_allow list for the
littlefs sample application.

Signed-off-by: Maureen Helm <[email protected]>
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.

Copy link
Collaborator

@aunsbjerg aunsbjerg left a comment

Choose a reason for hiding this comment

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

Verified smp_svr serial and udp sample work on mimxrt1064_evk. I did need to build the bootloader with CONFIG_BOOT_MAX_IMG_SECTORS=512, this wasn't immediately apparent to me - should this be documented somewhere?

@nashif nashif merged commit 05a68b1 into zephyrproject-rtos:master May 5, 2021
@MaureenHelm
Copy link
Member Author

Verified smp_svr serial and udp sample work on mimxrt1064_evk. I did need to build the bootloader with CONFIG_BOOT_MAX_IMG_SECTORS=512, this wasn't immediately apparent to me - should this be documented somewhere?

Thanks for testing. I can send a PR to make this the default in mcuboot for these boards, but wanted to see if there was feedback on the partition layout first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants