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: add toradex verdin imx8m plus board #61713

Merged

Conversation

GabrielHAFs
Copy link

Add Verdin iMX8M Plus board with i.MX8MP SoC and ARM Cortex-M7 processor. Port and documentation are based on the NXP MIMX8MM EVK board. This code is intended to be used with the Cortex-M7.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello @GabrielHAFs, and thank you very much for your first pull request to the Zephyr project!

A project maintainer just triggered our CI pipeline to run it against your PR and ensure it's compliant and doesn't cause any issues. You might want to take this opportunity to review the project's Contributor Expectations and make any updates to your pull request if necessary. 😊

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

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

Hi @GabrielHAFs, thank you for the contribution. Could you please address the compliance failures?

CONFIG_PINCTRL=y

CONFIG_CODE_ITCM=y
CONFIG_CODE_DDR=n
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is CONFIG_CODE_DDR=n needed here? This symbol is a Kconfig choice.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure if this is the right approach, but I added both configs CONFIG_CODE_ITCM (enabled by default) and CONFIG_CODE_DDR (disabled by default) as options, as explained in the index.rst. If the user chooses to use the ITCM RAM, leave it as is. If it decides to use DDR RAM, enable the CONFIG_CODE_DDR=y and CONFIG_CODE_ITCM=n`.

Copy link
Author

Choose a reason for hiding this comment

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

Changed to two different targets, one for DDR and the other for TCM, as explained on #61713 (comment)

@GabrielHAFs GabrielHAFs force-pushed the add_toradex_verdin_imx8mp_board branch 3 times, most recently from c365641 to 14f5303 Compare September 1, 2023 11:30
@@ -0,0 +1,25 @@
#
# Copyright (c) 2017, NXP
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copyright needs to be updated

Copy link
Author

Choose a reason for hiding this comment

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

Resolved on the last commit.

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2017,2019 NXP
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copyright

Copy link
Author

Choose a reason for hiding this comment

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

Resolved on the last commit.

};

&uart1 {
status = "disabled";
Copy link
Collaborator

Choose a reason for hiding this comment

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

status = "disabled should not be needed here, the UART will be disabled at the SOC level

Copy link
Author

Choose a reason for hiding this comment

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

This was resolved. Thanks for the comment.

@@ -167,6 +167,14 @@
status = "disabled";
};

uart1: uart@30860000 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please split this change into another commit, and remove the comment in this file:

/*
 * For now only UART4 is supported and
 * tested with the serial driver
 */

Copy link
Author

Choose a reason for hiding this comment

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

This is resolved on the commit 0ffcb49.

zephyr,flash = &itcm;
zephyr,sram = &dtcm;
/* DDR */
/* zephyr,flash = &ddr_code; */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Something you could consider to enable running from DDR or TCM is to create two different board targets, this is something that has been done for some of the IMX boards: https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/arm/mimx8mp_evk

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion @danieldegrasse. I have changed the code to add two targets, such as NXP.

@mmahadevan108
Copy link
Collaborator

cc @Mani-Sadhasivam

@MaureenHelm
Copy link
Member

@GabrielHAFs can you please have a look at the review comments?

@danieldegrasse
Copy link
Collaborator

Thanks for the updates- a few things:

  • Please make sure the commit enabling the use of UART1 is the first commit in the series, before the one enabling the board itself
  • Please take a look at the CI failures, it looks like the board is failing to build a few tests.

Add support for UART1 usage by adding uart1 node and configuration
to the i.MX 8ML devicetree include.

Signed-off-by: Gabriel Freitas <gabriel.freitas@toradex.com>
@GabrielHAFs GabrielHAFs force-pushed the add_toradex_verdin_imx8mp_board branch from f627b6c to 23df587 Compare October 31, 2023 13:55
@GabrielHAFs
Copy link
Author

@danieldegrasse I have addressed the issues and changed the order of the commits, as requested.

- gnuarmemb
- xtools
testing:
ignore_tags:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question here- do we need ignore_tags set in order to pass CI on this board? Otherwise, I'd like to avoid defining it.

Copy link
Author

Choose a reason for hiding this comment

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

I tested locally and it seems to not be necessary. I'll remove the ignore_tags.

CONFIG_CLOCK_CONTROL=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is CONFIG_UART_INTERRUPT_DRIVEN needed as part of the minimal set of Kconfigs to enable this platform? If not, I would like to drop it here

Copy link
Author

Choose a reason for hiding this comment

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

It's not necessary. I am dropping it.

CONFIG_CLOCK_CONTROL=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here about CONFIG_UART_INTERRUPT_DRIVEN

Copy link
Author

Choose a reason for hiding this comment

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

Add Verdin iMX8M Plus board with i.MX8MP SoC and ARM Cortex-M7 processor.
Add two targets (DDR and ITCM) for the iMX8M Plus board.
Port and documentation are based on NXP MIMX8MM EVK board.
This code is intented to be used with the Cortex-M7.

Signed-off-by: Gabriel Freitas <gabriel.freitas@toradex.com>
@GabrielHAFs GabrielHAFs force-pushed the add_toradex_verdin_imx8mp_board branch from 23df587 to ea0b7cf Compare October 31, 2023 17:20
@carlescufi carlescufi merged commit eaec581 into zephyrproject-rtos:main Nov 16, 2023
20 checks passed
Copy link

Hi @GabrielHAFs!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

.. _verdin_imx8mp_m7:

Toradex Verdin iMX8M Plus SoM

Copy link
Collaborator

@kartben kartben Nov 17, 2023

Choose a reason for hiding this comment

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

FWIW, this improperly formatted heading is causing the page to not show up in the documentation. This, plus the fact that the "build hello world" instructions were basically broken (wrong board name) makes me think that the documentation for this page could have use a more thorough review (at a minimum testing the page properly shows up in the documentation ;-))

Just spent 30 minutes cleaning things up in #65420, please have a look so that we can get the table of contents for Arm boards back to a better state :)

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for pointing this out, and sorry for missing it initially.

@GabrielHAFs can you take a look at this? It looks like @kartben is already on it, thanks

Copy link
Collaborator

Choose a reason for hiding this comment

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

I obviously linked to the wrong PR -- #65420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants