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

Add imx91evk SoC and board support. #84009

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Zhiqiang-Hou
Copy link
Contributor

@Zhiqiang-Hou Zhiqiang-Hou commented Jan 15, 2025

Add imx91evk SoC and board support.

Depends on:

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 15, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@c15dd51 zephyrproject-rtos/hal_nxp#497 zephyrproject-rtos/hal_nxp#497/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_nxp DNM This PR should not be merged (Do Not Merge) labels Jan 15, 2025
west.yml Outdated
revision: b5f6470ec7ccd7f1c9a2c929fa93eae9fb001d9e
revision: pull/497/head
Copy link
Collaborator

Choose a reason for hiding this comment

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

manifest update must come before anything needing it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will make it the first patch. Thanks

#include <zephyr/sys/util.h>

static const struct arm_mmu_region mmu_regions[] = {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will remove it.

@@ -0,0 +1 @@
# SPDX-License-Identifier: Apache-2.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

empty file can go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will drop it

@@ -0,0 +1 @@
# SPDX-License-Identifier: Apache-2.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

empty file can go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will drop it.

# SPDX-License-Identifier: Apache-2.0

config BOARD_IMX91_EVK
select SOC_MIMX9131 if BOARD_IMX91_EVK_MIMX9131
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this board going to have other SoCs adding to it? If not, then

Suggested change
select SOC_MIMX9131 if BOARD_IMX91_EVK_MIMX9131
select SOC_MIMX9131

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No other SoC, will take your suggestion. Thanks

Supported Features
==================

The Zephyr imx91_evk board Cortex-A Core configuration supports the following
Copy link
Collaborator

Choose a reason for hiding this comment

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

`` around board name, or better yet use full name as supplied to west build and call it board target

Copy link
Contributor Author

Choose a reason for hiding this comment

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

make sense, will update. thanks

&lpuart1 {
status = "okay";
current-speed = <115200>;
/* clocks = <&ccm IMX_CCM_UART4_CLK 0x6c 24>; */
Copy link
Collaborator

Choose a reason for hiding this comment

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

can go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will remove this line.

Comment on lines 18 to 20
# Zephyr Kernel Configuration
CONFIG_XIP=n
CONFIG_KERNEL_DIRECT_MAP=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

why can't SoC select/defconfig these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better not select the XIP and DIRECT_MAP configs under SoC, these configs can be different in boards with the same SoC.

Copy link
Contributor

Choose a reason for hiding this comment

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

Currently there are some device drivers MMIO mapping uses direct map, so I also suggest to move it to SoC defconfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Zephyr device drivers should use the virtual address, so not depends on this config. This is for some freestanding applications that access the MMIO/RAM using physical address, such as the applications in our Real-time-edge.

Copy link
Contributor

Choose a reason for hiding this comment

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

So device driver are based on hal driver which need to use 1:1 mapping, so they are using K_MEM_DIRECT_MAP MMIP mapping flag, so depend on CONFIG_KERNEL_DIRECT_MAP.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already move it to SoC Kconfig and select it on condition HAS_MCUX.

@dleach02 dleach02 assigned JiafeiPan and unassigned mmahadevan108 Jan 16, 2025
@dleach02
Copy link
Member

@JiafeiPan I'm adding you as an assignee

@nashif nashif changed the title Develop/imx91 support Add imx91evk SoC and board support. Jan 16, 2025
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/imx91-support branch from d2ad03c to 79a0244 Compare January 16, 2025 16:08
boards/nxp/imx91_evk/imx91_evk_mimx9131_defconfig Outdated Show resolved Hide resolved
Comment on lines 18 to 20
# Zephyr Kernel Configuration
CONFIG_XIP=n
CONFIG_KERNEL_DIRECT_MAP=y
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently there are some device drivers MMIO mapping uses direct map, so I also suggest to move it to SoC defconfig.

soc/nxp/imx/imx9/imx91/mmu_regions.c Show resolved Hide resolved
@@ -203,7 +203,7 @@ manifest:
groups:
Copy link
Collaborator

@dbaluta dbaluta Jan 17, 2025

Choose a reason for hiding this comment

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

Please create a better description for this PR. When it will be merged there won't be any reference to PR497.

So please say something along the lines: update hal_nxp to pull support for imx91.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will update with the info, actually it will be updated to the hal_nxp SHA when that PR is merged.

Update the hal_nxp revison to the depended PR support for mimx9131.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add DTSi file for i.MX91.

Signed-off-by: Hou Zhiqiang <[email protected]>
The i.MX 91 SoC’s integrated EdgeLock® Secure Enclave provides
security features including lifecycle management, tamper detection,
secure boot and a simplified path to certifications. The i.MX 91
family features an Arm® Cortex®-A55 running at up to 1.4GHz,
support for modern LPDDR4 memory to enable platform longevity,
dual Gigabit Ethernet and dual USB ports, along with a rich set
of peripherals targeting medical, industrial and consumer IoT
market segments.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add clock driver support for MIMX9131.

Signed-off-by: Hou Zhiqiang <[email protected]>
Add pinctrl driver support for MIMX9131.

Signed-off-by: Hou Zhiqiang <[email protected]>
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/imx91-support branch from 79a0244 to 9b2cdc9 Compare January 17, 2025 15:34
@Zhiqiang-Hou
Copy link
Contributor Author

V2:

  • Rebased.
  • Removed some empty cmake files.
  • Moved the west.yml change patch to the first.
  • Refined the Kconfig.imx91_evk.
  • Refined the board doc.

V3:

  • Moved the selection of KERNEL_DIRECT_MAP to SoC Kconfig.
  • Reduced the MAX_XLAT_TABLES to 24.
  • Refined some change log.

@decsny decsny removed their request for review January 17, 2025 19:39
The i.MX 91 Evaluation Kit (MCIMX91-EVK board) is a platform designed
to display the most commonly used features of the i.MX 91 applications
processor. The MCIMX91-EVK board is an entry-level development board
with a small and low-cost package.

Signed-off-by: Hou Zhiqiang <[email protected]>
@Zhiqiang-Hou Zhiqiang-Hou force-pushed the develop/imx91-support branch from 9b2cdc9 to ebffa1a Compare January 21, 2025 13:44
@Zhiqiang-Hou
Copy link
Contributor Author

V4:

  • Change the memory region to the dram start address 0x80000000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM64 ARM (64-bit) Architecture area: Clock Control area: Pinctrl DNM This PR should not be merged (Do Not Merge) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers platform: NXP MPU
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants