Skip to content

Commit

Permalink
boards: nxp: add imx93_evk M33 support
Browse files Browse the repository at this point in the history
Added basic board support for imx93_evk M33.

(cherry picked from commit 71fa64c)

Original-Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
GitOrigin-RevId: 71fa64c
Cr-Build-Id: 8738910416953667585
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8738910416953667585
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: If3d67a45900643493a3bd0025f1fd1e6a33376d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5806812
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Tested-by: Eric Yilun Lin <yllin@google.com>
  • Loading branch information
yangbolu1991 authored and Chromeos LUCI committed Aug 22, 2024
1 parent dbf2795 commit 2d6dfb5
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 6 deletions.
1 change: 1 addition & 0 deletions boards/nxp/imx93_evk/Kconfig.imx93_evk
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

config BOARD_IMX93_EVK
select SOC_MIMX9352_A55 if BOARD_IMX93_EVK_MIMX9352_A55
select SOC_MIMX9352_M33 if BOARD_IMX93_EVK_MIMX9352_M33
select SOC_PART_NUMBER_MIMX9352DVVXM
71 changes: 65 additions & 6 deletions boards/nxp/imx93_evk/doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _imx93_evk:

NXP i.MX93 EVK (Cortex-A55)
############################
NXP i.MX93 EVK
##############

Overview
********
Expand Down Expand Up @@ -71,19 +71,39 @@ hardware features:
| ENET | on-chip | ethernet port |
+-----------+------------+-------------------------------------+

The Zephyr imx93_evk board Cortex-M33 configuration supports the following
hardware features:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | GPIO |
+-----------+------------+-------------------------------------+

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

This board configuration uses a system clock frequency of 24 MHz.
Cortex-A55 Core runs up to 1.7 GHz.
Cortex-M33 Core runs up to 200MHz in which SYSTICK runs on same frequency.

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

This board configuration uses a single serial communication channel with the
CPU's UART4.
CPU's UART2 for A55 core and M33 core.

Board MUX Control
-----------------
Expand Down Expand Up @@ -114,8 +134,8 @@ over dts config. For instance, if ``CONFIG_CAN`` is enabled, MUX A is selected
even if ``mux="B";`` is configured in dts, and an warning would be reported in
the log.

Programming and Debugging
*************************
Programming and Debugging (A55)
*******************************

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
Expand Down Expand Up @@ -145,7 +165,7 @@ for example, with the :zephyr:code-sample:`synchronization` sample:
:goals: run

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

.. code-block:: console
Expand All @@ -155,6 +175,45 @@ display the following ram console output:
thread_a: Hello World from cpu 0 on mimx93_evk_a55!
thread_b: Hello World from cpu 0 on mimx93_evk_a55!
Programming and Debugging (M33)
*******************************

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-M33 Core:

.. code-block:: console
load mmc 1:1 0x80000000 zephyr.bin;cp.b 0x80000000 0x201e0000 0x30000;bootaux 0x1ffe0000 0
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: imx93_evk/mimx9352/m33
:goals: run

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 v3.7.0-684-g71a7d05ba60a ***
thread_a: Hello World from cpu 0 on imx93_evk!
thread_b: Hello World from cpu 0 on imx93_evk!
thread_a: Hello World from cpu 0 on imx93_evk!
thread_b: Hello World from cpu 0 on imx93_evk!
To make a container image flash.bin with ``zephyr.bin`` for SD/eMMC programming and booting
from BootROM. Refer to user manual of i.MX93 `MCUX SDK release`_.

.. _MCUX SDK release:
https://mcuxpresso.nxp.com/

References
==========

Expand Down
83 changes: 83 additions & 0 deletions boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <nxp/nxp_imx93_m33.dtsi>
#include "imx93_evk-pinctrl.dtsi"

/ {
model = "NXP i.MX93 EVK board";
compatible = "nxp,imx93_evk";

chosen {
/* TCM */
zephyr,flash = &itcm;
zephyr,sram = &dtcm;

zephyr,console = &lpuart2;
zephyr,shell-uart = &lpuart2;
};

aliases {
led0 = &led_r;
led1 = &led_g;
sw0 = &btn_1;
};

leds {
compatible = "gpio-leds";
led_r: led_r {
label = "LED_R";
gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
};
led_g: led_g {
label = "LED_G";
gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
};
led_b: led_b {
label = "LED_B";
gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
};
};

keys {
compatible = "gpio-keys";

btn_1: btn_1{
label = "BTN1";
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
};

btn_2: btn_2{
label = "BTN2";
gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
};
};
};

&lpuart2 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart2_default>;
pinctrl-names = "default";
};

&gpio1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&gpio3 {
status = "okay";
};

&gpio4 {
status = "okay";
};
16 changes: 16 additions & 0 deletions boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

identifier: imx93_evk/mimx9352/m33
name: NXP i.MX93 EVK M33
type: mcu
arch: arm
toolchain:
- zephyr
- cross-compile
ram: 128
flash: 128
supported:
- gpio
- uart
vendor: nxp
10 changes: 10 additions & 0 deletions boards/nxp/imx93_evk/imx93_evk_mimx9352_m33_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

CONFIG_CLOCK_CONTROL=y
CONFIG_PINCTRL=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_CONSOLE=y
CONFIG_XIP=y

0 comments on commit 2d6dfb5

Please sign in to comment.