diff --git a/boards/nxp/imx93_evk/Kconfig.imx93_evk b/boards/nxp/imx93_evk/Kconfig.imx93_evk index f9c39a7f516..412da581ac6 100644 --- a/boards/nxp/imx93_evk/Kconfig.imx93_evk +++ b/boards/nxp/imx93_evk/Kconfig.imx93_evk @@ -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 diff --git a/boards/nxp/imx93_evk/doc/index.rst b/boards/nxp/imx93_evk/doc/index.rst index 1c937c288d8..6e6d453ba2c 100644 --- a/boards/nxp/imx93_evk/doc/index.rst +++ b/boards/nxp/imx93_evk/doc/index.rst @@ -1,7 +1,7 @@ .. _imx93_evk: -NXP i.MX93 EVK (Cortex-A55) -############################ +NXP i.MX93 EVK +############## Overview ******** @@ -71,6 +71,25 @@ 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 @@ -78,12 +97,13 @@ 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 ----------------- @@ -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 @@ -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 @@ -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 ========== diff --git a/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.dts b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.dts new file mode 100644 index 00000000000..5c75e10ccc9 --- /dev/null +++ b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.dts @@ -0,0 +1,83 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include +#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"; +}; diff --git a/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.yaml b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.yaml new file mode 100644 index 00000000000..b450925b272 --- /dev/null +++ b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33.yaml @@ -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 diff --git a/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33_defconfig b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33_defconfig new file mode 100644 index 00000000000..028b1fc71d1 --- /dev/null +++ b/boards/nxp/imx93_evk/imx93_evk_mimx9352_m33_defconfig @@ -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