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
Open
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/nxp/imx91_evk/Kconfig.imx91_evk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config BOARD_IMX91_EVK
select SOC_MIMX9131
select SOC_PART_NUMBER_MIMX9131CVVXJ
6 changes: 6 additions & 0 deletions boards/nxp/imx91_evk/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: imx91_evk
full_name: i.MX91 EVK
vendor: nxp
socs:
- name: mimx9131
128 changes: 128 additions & 0 deletions boards/nxp/imx91_evk/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.. zephyr:board:: imx91_evk

Overview
********

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. The board can be used by developers
to get familiar with the processor before investing a large amount of
resources in more specific designs.

The i.MX 91 applications processor features an Arm Cortex-A55 core
that can operate at speeds of up to 1.4 GHz.

- Board features:

- RAM: 2GB LPDDR4
- Storage:

- SanDisk 16GB eMMC5.1
- microSD Socket
- Wireless:

- Murata Type-2EL (SDIO+UART+SPI) module. It is based on NXP IW612 SoC,
which supports dual-band (2.4 GHz /5 GHz) 1x1 Wi-Fi 6, Bluetooth 5.2,
and 802.15.4
- USB:

- Two USB 2.0 Type C connectors
- Ethernet:

- ENET: 10/100/1000 Mbit/s RGMII Ethernet connected with external PHY
RTL8211
- ENET_QoS: 10/100/1000 Mbit/s RGMII Ethernet supporting TSN connected
with external PHY RTL8211
- PCIe:

- One M.2/NGFF Key E mini card 75-pin connector
- Connectors:

- 40-Pin Dual Row Header
- LEDs:

- 1x Power status LED
- 2x UART LED
- Debug:

- JTAG 20-pin connector
- MicroUSB for UART debug


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

The Zephyr ``imx91_evk/mimx9131`` board supports the following hardware features:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| GIC-v3 | on-chip | interrupt controller |
+-----------+------------+-------------------------------------+
| ARM TIMER | on-chip | system clock |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port |
+-----------+------------+-------------------------------------+

Devices
========
System Clock
------------

This board configuration uses a system clock frequency of 24 MHz.
Cortex-A55 Core runs up to 1.4 GHz.

Serial Port
-----------

This board configuration uses a single serial communication channel with the
CPU's UART1 for A55 core.

Programming and Debugging
*******************************

U-Boot "go" command is used to load and kick Zephyr to Cortex-A55 Core.

Copy the compiled ``zephyr.bin`` to the first FAT partition of the SD card and
plug the SD card into the board. Power it up and stop the u-boot execution at
prompt.

Use U-Boot to load and kick zephyr.bin to Cortex-A55 Core:

.. code-block:: console

fatload mmc 1:1 0x80000000 zephyr.bin; dcache flush; icache flush; go 0x80000000

Use this configuration to run basic Zephyr applications and kernel tests,
for example, with the :zephyr:code-sample:`synchronization` sample:

.. zephyr-app-commands::
:zephyr-app: samples/synchronization
:host-os: unix
:board: imx91_evk/mimx9131
:goals: build

This will build an image with the synchronization sample app, boot it and
display the following console output:

.. code-block:: console

*** Booting Zephyr OS build v4.0.0-3277-g69f43115c9a8 ***
thread_a: Hello World from cpu 0 on imx91_evk!
thread_b: Hello World from cpu 0 on imx91_evk!
thread_a: Hello World from cpu 0 on imx91_evk!
thread_b: Hello World from cpu 0 on imx91_evk!

References
==========

More information can refer to NXP official website:
`NXP website`_.

.. _NXP website:
https://www.nxp.com/products/i.MX91
29 changes: 29 additions & 0 deletions boards/nxp/imx91_evk/imx91_evk-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2025 NXP
* SPDX-License-Identifier: Apache-2.0
*
*/

#include <nxp/nxp_imx/mimx9131cvvxj-pinctrl.dtsi>

&pinctrl {
uart1_default: uart1_default {
group0 {
pinmux = <&iomuxc1_uart1_rxd_lpuart_rx_lpuart1_rx>,
<&iomuxc1_uart1_txd_lpuart_tx_lpuart1_tx>;
bias-pull-up;
slew-rate = "slightly_fast";
drive-strength = "x5";
};
};

uart2_default: uart2_default {
group0 {
pinmux = <&iomuxc1_uart2_rxd_lpuart_rx_lpuart2_rx>,
<&iomuxc1_uart2_txd_lpuart_tx_lpuart2_tx>;
bias-pull-up;
slew-rate = "slightly_fast";
drive-strength = "x5";
};
};
};
34 changes: 34 additions & 0 deletions boards/nxp/imx91_evk/imx91_evk_mimx9131.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <nxp/nxp_mimx91.dtsi>
#include "imx91_evk-pinctrl.dtsi"

/ {
model = "NXP i.MX91 A55";
compatible = "fsl,mimx91";

chosen {
zephyr,console = &lpuart1;
zephyr,shell-uart = &lpuart1;
/* sram node actually locates at DDR DRAM */
zephyr,sram = &dram;
};

dram: memory@80000000 {
reg = <0x80000000 DT_SIZE_M(1)>;
};

};

&lpuart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
17 changes: 17 additions & 0 deletions boards/nxp/imx91_evk/imx91_evk_mimx9131.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright 2025 NXP
#
# SPDX-License-Identifier: Apache-2.0
#

identifier: imx91_evk/mimx9131
name: NXP i.MX91 EVK
type: mcu
arch: arm64
toolchain:
- zephyr
- cross-compile
ram: 1024
supported:
- uart
vendor: nxp
30 changes: 30 additions & 0 deletions boards/nxp/imx91_evk/imx91_evk_mimx9131_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright 2025 NXP
#
# SPDX-License-Identifier: Apache-2.0

# ARM Options
CONFIG_AARCH64_IMAGE_HEADER=y
CONFIG_ARMV8_A_NS=y

# MMU Options
# Increase the value when encounter the assert on the MAX_XLAT_TABLES
CONFIG_MAX_XLAT_TABLES=24

# Cache Options
CONFIG_CACHE_MANAGEMENT=y
CONFIG_DCACHE_LINE_SIZE_DETECT=y
CONFIG_ICACHE_LINE_SIZE_DETECT=y

# Zephyr Kernel Configuration
CONFIG_XIP=n

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Enable Console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_CLOCK_CONTROL=y
4 changes: 2 additions & 2 deletions drivers/clock_control/clock_control_mcux_ccm_rev2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021,2024 NXP
* Copyright 2021,2024-2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -287,7 +287,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
default:
return -EINVAL;
}
#ifdef CONFIG_SOC_MIMX9352
#if defined(CONFIG_SOC_MIMX9352) || defined(CONFIG_SOC_MIMX9131)
*rate = CLOCK_GetIpFreq(clock_root);
#else
*rate = CLOCK_GetRootClockFreq(clock_root);
Expand Down
4 changes: 2 additions & 2 deletions drivers/pinctrl/pinctrl_imx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, 2024 NXP
* Copyright 2022, 2024-2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -33,7 +33,7 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
}
#endif

#ifdef CONFIG_SOC_MIMX9352
#if defined(CONFIG_SOC_MIMX9352) || defined(CONFIG_SOC_MIMX9131)
sys_write32(IOMUXC1_SW_MUX_CTL_PAD_MUX_MODE(mux_mode) |
IOMUXC1_SW_MUX_CTL_PAD_SION(MCUX_IMX_INPUT_ENABLE(pin_ctrl_flags)),
(mem_addr_t)mux_register);
Expand Down
95 changes: 95 additions & 0 deletions dts/arm64/nxp/nxp_mimx91.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>
#include <freq.h>
#include <arm64/armv8-a.dtsi>
#include <zephyr/dt-bindings/clock/imx_ccm_rev2.h>
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>

/ {
#address-cells = <1>;
#size-cells = <1>;

cpus {
#address-cells = <1>;
#size-cells = <0>;

cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a55";
reg = <0>;
};
};

arch_timer: timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL
IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 14 IRQ_TYPE_LEVEL
IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 11 IRQ_TYPE_LEVEL
IRQ_DEFAULT_PRIORITY>,
<GIC_PPI 10 IRQ_TYPE_LEVEL
IRQ_DEFAULT_PRIORITY>;
interrupt-parent = <&gic>;
};

psci: psci {
compatible = "arm,psci-1.1";
method = "smc";
};

gic: interrupt-controller@48000000 {
compatible = "arm,gic-v3", "arm,gic";
reg = <0x48000000 0x10000>, /* GIC Dist */
<0x48040000 0xc0000>; /* GICR (RD_base + SGI_base) */
interrupt-controller;
#interrupt-cells = <4>;
status = "okay";
};

iomuxc: iomuxc@443c0000 {
compatible = "nxp,imx-iomuxc";
reg = <0x443c0000 DT_SIZE_K(64)>;
status = "okay";
pinctrl: pinctrl {
status = "okay";
compatible = "nxp,imx93-pinctrl";
};
};

ana_pll: ana_pll@44480000 {
compatible = "nxp,imx-ana";
reg = <0x44480000 DT_SIZE_K(64)>;
};

ccm: ccm@44450000 {
compatible = "nxp,imx-ccm-rev2";
reg = <0x44450000 DT_SIZE_K(64)>;
#clock-cells = <3>;
};

lpuart1: serial@44380000 {
compatible = "nxp,imx-lpuart", "nxp,lpuart";
reg = <0x44380000 DT_SIZE_K(64)>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
interrupt-names = "irq_0";
interrupt-parent = <&gic>;
clocks = <&ccm IMX_CCM_LPUART1_CLK 0x6c 24>;
status = "disabled";
};

lpuart2: serial@44390000 {
compatible = "nxp,imx-lpuart", "nxp,lpuart";
reg = <0x44390000 DT_SIZE_K(64)>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL IRQ_DEFAULT_PRIORITY>;
interrupt-names = "irq_0";
interrupt-parent = <&gic>;
clocks = <&ccm IMX_CCM_LPUART2_CLK 0x6c 24>;
status = "disabled";
};
};
6 changes: 4 additions & 2 deletions soc/nxp/imx/imx9/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Copyright 2024 NXP
# Copyright 2024-2025 NXP
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_SOC_MIMX9352)
if(CONFIG_SOC_MIMX9131)
add_subdirectory(imx91)
elseif(CONFIG_SOC_MIMX9352)
add_subdirectory(imx93)
elseif(CONFIG_SOC_MIMX9596)
add_subdirectory(imx95)
Expand Down
Loading
Loading