boards/nxp/imx943_evk/doc/index.rst
.. zephyr:board:: imx943_evk
Overview
The IMX943LP5EVK-19 board is a design and evaluation platform based on the NXP i.MX 943 processor. The i.MX 943 processor integrates up to four Arm Cortex-A55 cores, along with two Arm Cortex-M33 cores and two Arm Cortex-M7 cores for functional safety. With PLCs, I/O controllers, V2X accelerators, ML acceleration, energy management, and advanced security, the i.MX 943 processor provides optimized performance and power efficiency for industrial, IoT, and automotive devices. The i.MX943 device on the board comes in a compact 19 x 19 mm/15 x 15 mm package.
Hardware
i.MX 943 automotive applications processor
DRAM memory: 8-Gbit LPDDR5 DRAM
XSPI interface: 64 MB octal SPI NOR flash memory
eMMC: 32 GB eMMC NAND flash memory
uSDHC interface: an SD card slot
USB interface: Two USB Type-C ports
Ethernet interface: seven Ethernet ports
PCIe interface: one M.2 slot and one PCIe x4 slot.
FlexCAN interface: four CAN controller with four CAN connector.
LPUART interface
LPSPI interface
LPI2C interface
SAI interface
MQS interface
MICFIL interface
LVDS interface
ADC interface
SINC interface
Debug interface
.. zephyr:board-supported-hw::
This board configuration uses a system clock frequency of 24 MHz for Cortex-A55. Cortex-A55 Core runs up to 1.7 GHz. Cortex-M33 Core runs up to 333MHz in which SYSTICK runs on same frequency.
This board configuration uses a single serial communication channel with the CPU's UART1 for Cortex-A55, and UART8 for Cortex-M33.
NETC driver supports to manage the Physical Station Interface (PSI), and TSN switch.
The ENET0, ENETC1, ENETC2 ports could be enabled for M33 by west build option
-DEXTRA_DTC_OVERLAY_FILE=enetc.overlay.
For A55 Core, ENET0, ENETC1, ENETC2 ports are enabled by default, so no overlay is needed, but NETC depends on GIC ITS, so need to make sure to allocate heap memory to be larger than 851968 byes by setting CONFIG_HEAP_MEM_POOL_SIZE.
On the EVK board, switch port0 and port2 are connected to both SGMII port (SGMII-swp0 and SGMII-swp1) and 100M port (swp0 and swp1), currently only 100M port (swp0 and swp1) is enabled, so could connect to 100M port for verify two switch ports.
The two switch ports could be verified via :zephyr:code-sample:dsa on M33 core
or on A55 Core, for example for A55 Core:
.. zephyr-app-commands:: :zephyr-app: samples/net/ethernet/dsa :host-os: unix :board: imx943_evk/mimx94398/a55 :goals: flash
Or for M33 Core:
.. zephyr-app-commands:: :zephyr-app: samples/net/ethernet/dsa :host-os: unix :board: imx943_evk/mimx94398/m33/ddr :goals: build
Programming and Debugging (A55)
.. zephyr:board-supported-runners::
There are multiple methods to program and debug Zephyr on the A55 core:
Need to disable all watchdog in U-Boot, otherwise, watchdog will reset the board after Zephyr start up from the same A55 Core.
The default runner for the board is JLink, connect the EVK board's JTAG connector to the host computer using a J-Link debugger, power up the board and stop the board at U-Boot command line.
Then use "west flash" or "west debug" command to load the zephyr.bin image from the host computer and start the Zephyr application on A55 core0.
Here is an example for the :zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :host-os: unix :board: imx943_evk/mimx94398/a55 :goals: flash
Then the following log could be found on UART1 console:
.. code-block:: console
*** Booting Zephyr OS build v4.1.0-3650-gdb71736adb68 ***
Hello World! imx943_evk/mimx94398/a55
Here is an example for the :zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :host-os: unix :board: imx943_evk/mimx94398/a55 :goals: debug
U-Boot "go" command can be used to start Zephyr on A55 Core0.
Need to disable all watchdog in U-Boot, otherwise, watchdog will reset the board after Zephyr start up from the same A55 Core.
Here is an example for the :zephyr:code-sample:hello_world application.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :host-os: unix :board: imx943_evk/mimx94398/a55 :goals: build
Firstly need to download Zephyr binary image into DDR memory, it can use tftp:
.. code-block:: console
tftp 0xd0000000 zephyr.bin
Or copy the Zephyr image zephyr.bin SD card and plug the card into the board, for example
if copy to the FAT partition of the SD card, use the following U-Boot command to load the image
into DDR memory (assuming the SD card is dev 1, fat partition ID is 1, they could be changed
based on actual setup):
.. code-block:: console
fatload mmc 1:1 0xd0000000 zephyr.bin;
Use the following command to boot Zephyr on the core0:
.. code-block:: console
dcache flush; icache flush; go 0xd0000000;
Then the following log could be found on UART1 console:
.. code-block:: console
*** Booting Zephyr OS build v4.1.0-3650-gdb71736adb68 ***
Hello World! imx943_evk/mimx94398/a55
The default SMP variant runs on all four Cortex-A Core, it could be changed by
disabling some A55 Core nodes in dts and change :kconfig:option:CONFIG_MP_MAX_NUM_CPUS
to the count of enabled A55 Cores in dts.
Building SMP kernel, for example, with the :zephyr:code-sample:synchronization sample:
.. zephyr-app-commands:: :zephyr-app: samples/synchronization :host-os: unix :board: imx943_evk/mimx94398/a55/smp :goals: build
For different booting method, need to make sure SMP Zephyr to be started from the first CPU Core listed in "cpus" dts node, so the first A55 Core in default SMP variant dts is Core0, it could be booted by U-Boot "go" command, J-Link runner or SPSDK runner.
SPSDK runner leverages SPSDK tools (https://spsdk.readthedocs.io), it builds an
bootable flash image flash.bin which includes all necessary firmware components,
such as ELE+V2X firmware, System Manager, DDR OEI, TF-A images etc. Using west flash
command will download the boot image flash.bin to DDR memory, or burn the boot image
to SD card or eMMC flash. By using flash.bin, as no U-Boot image is available, so TF-A
will boot up Zephyr on the first Cortex-A55 Core directly.
In order to use SPSDK runner, it requires fetching binary blobs, which can be achieved by running the following command:
.. code-block:: console
west blobs fetch hal_nxp
.. note::
It is recommended running the command above after :file:west update.
SPSDK runner is enabled by configure item :kconfig:option:CONFIG_BOARD_NXP_SPSDK_IMAGE, currently
it is not enabled by default for i.MX943 EVK board, so use this configuration to enable
it, for example, with the :zephyr:code-sample:synchronization sample:
.. zephyr-app-commands:: :zephyr-app: samples/synchronization :host-os: unix :board: imx943_evk/mimx94398/a55 :goals: build :gen-args: -DCONFIG_BOARD_NXP_SPSDK_IMAGE=y
If :kconfig:option:CONFIG_BOARD_NXP_SPSDK_IMAGE is available and enabled for the board variant,
flash.bin will be built automatically. The programming could be through below commands.
Before that, switch SW4[3:0] should be configured to 0b1001 for USB download mode
to boot, and USB1 and DBG ports should be connected to PC. There are 4 serial ports
enumerated (115200 8n1), and we use the third one for A55 Zephyr and the fourth for
M33 System Manager.
(The flasher is spsdk which already installed via scripts/requirements.txt.
On linux host, usb device permission should be configured per Installation Guide
of https://spsdk.readthedocs.io)
.. code-block:: none
$ west flash -r spsdk
$ west flash -r spsdk --bootdevice sd
$ west flash -r spsdk --bootdevice=emmc
Then Zephyr log could be found in the third serial port's Console.
Notes: the default boot image is for LPDDR5 EVK board, enable configure item
:kconfig:option:CONFIG_BOARD_NXP_LPDDR4 to build the boot image for LPDDR4 EVK board.
Programming and Debugging (M33 in NETC MIX, M7_0 in M7MIX0, M7_1 in M7MIX1)
Here is an example to build the :zephyr:code-sample:hello_world application.
For TCM target
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: imx943_evk/mimx94398/m33 :goals: build
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: imx943_evk/mimx94398/m7_0 :goals: build
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: imx943_evk/mimx94398/m7_1 :goals: build
For DDR target
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: imx943_evk/mimx94398/m33/ddr :goals: build
The imx-mkimage tool and some other firmware files from i.MX Linux BSP release_
are required to make a bootable firmware to program to SD/eMMC.
Below is an operations example on Linux host. (For more detail, refer to
i.MX Linux BSP release_ 6.12.3_1.0.0)
.. code-block:: console
git clone https://github.com/nxp-imx/imx-mkimage.git -b lf-6.12.3_1.0.0 git clone https://github.com/nxp-imx/imx-sm.git -b lf-6.12.3-imx943-er1 git clone https://github.com/nxp-imx/imx-oei.git -b lf-6.12.3-imx943-er1
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.27-5af0ceb.bin wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-2.0.1-0a66c34.bin
chmod 777 firmware-imx-8.27-5af0ceb.bin chmod 777 firmware-ele-imx-2.0.1-0a66c34.bin ./firmware-imx-8.27-5af0ceb.bin --auto-accept ./firmware-ele-imx-2.0.1-0a66c34.bin --auto-accept
export TOOLS=$ARMGCC_DIR export SM_CROSS_COMPILE=${TOOLS}/bin/arm-none-eabi- export OEI_CROSS_COMPILE=${TOOLS}/bin/arm-none-eabi-
make -C imx-oei board=mx943lp5-19 oei=ddr d=1 all make -C imx-sm config=mx94alt cfg make -C imx-sm config=mx94alt all
cp firmware-imx-8.27-5af0ceb/firmware/ddr/synopsys/lpddr5*v202409.bin imx-mkimage/iMX94/ cp firmware-ele-imx-2.0.1-0a66c34/mx943a0-ahab-container.img imx-mkimage/iMX94/ cp imx-sm/build/mx94alt/m33_image.bin imx-mkimage/iMX94/ cp imx-oei/build/mx943lp5-19/ddr/oei-m33-ddr.bin imx-mkimage/iMX94/ cp zephyr/build/zephyr/zephyr.bin imx-mkimage/iMX94/m33s_image.bin (m70_image.bin or m71_image.bin)
cd imx-mkimage make SOC=iMX94 OEI=YES flash_m33s # for TCM target make SOC=iMX94 OEI=YES flash_m33s_ddr # for DDR target or make SOC=iMX94 OEI=YES flash_m33s_m70_m71 # for TCM target
dd if=iMX94/flash.bin of=/dev/sdb bs=1k seek=32 && sync
Note: for this Linux BSP release version, we need to do some changes in imx-sm and imx-mkimage to support M33 boot and DDR target.
imx-sm changes:
.. code-block:: console
diff --git a/configs/mx94alt.cfg b/configs/mx94alt.cfg index 4613900..069992a 100755 --- a/configs/mx94alt.cfg +++ b/configs/mx94alt.cfg @@ -308,7 +308,7 @@ FAULT_SWNCF04 OWNER, reaction=sys_shutdown # Boot EENV # #==========================================================================#
-LM1 name="Boot", rpc=scmi, boot=2, skip=1, did=3, default +LM1 name="Boot", rpc=scmi, boot=2, skip=1, did=13, default
DFMT0: sa=secure
DFMT1: sa=secure, pa=privileged
@@ -322,10 +322,6 @@ DATA: perm=rw
PD_NETC stop=6
CPU_M33S start=1, stop=5
-PD_M70 stop=4 -CPU_M7P0 start=2, stop=3 -PD_M71 stop=2 -CPU_M7P1 start=3, stop=1
# Start/Stop (mSel=1)
imx-mkimage changes:
.. code-block:: console
diff --git a/iMX94/soc.mak b/iMX94/soc.mak
index 838d2a2..bc756f9 100644
--- a/iMX94/soc.mak
+++ b/iMX94/soc.mak
@@ -392,6 +392,11 @@ flash_m33s: $(MKIMG) $(AHAB_IMG) $(MCU_IMG) $(M33S_IMG) $(OEI_IMG_M33)
-m33 $(MCU_IMG) 0 $(MCU_TCM_ADDR)
-m33 $(M33S_IMG) 1 $(M33S_TCM_ADDR) $(M33S_TCM_ADDR_ALIAS) -out flash.bin
+flash_m33s_ddr: $(MKIMG) $(AHAB_IMG) $(MCU_IMG) $(M33S_IMG) $(OEI_IMG_M33)
./$(MKIMG) -soc IMX9 -cntr_version 2 -u 1 -append $(AHAB_IMG) -c $(OEI_OPT_M33) -msel $(MSEL) \
-m33 $(MCU_IMG) 0 $(MCU_TCM_ADDR) \
-m33 $(M33S_IMG) 1 0x86000000 0x86000000 -out flash.bin
flash_m33s_xspi: $(MKIMG) $(AHAB_IMG) $(MCU_IMG) $(M33S_IMG) $(OEI_IMG_M33)
./$(MKIMG) -soc IMX9 -cntr_version 2 -u 1 -append $(AHAB_IMG) -dev flexspi -c $(OEI_OPT_M33) -msel $(MSEL) \
-m33 $(MCU_IMG) 0 $(MCU_TCM_ADDR) \
Boot board from SD card. It will display the following console output.
For TCM target
.. code-block:: console
*** Booting Zephyr OS build v4.1.0-5264-g8654b4029d16 *** Hello World! imx943_evk/mimx94398/m33
.. code-block:: console
*** Booting Zephyr OS build v4.2.0-803-g5537e8d9b3f1 *** Hello World! imx943_evk/mimx94398/m7_0
.. code-block:: console
*** Booting Zephyr OS build v4.2.0-803-g2f145e66dce2 *** Hello World! imx943_evk/mimx94398/m7_1
For DDR target
.. code-block:: console
*** Booting Zephyr OS build v4.1.0-5264-g8654b4029d16 *** Hello World! imx943_evk/mimx94398/m33/ddr
Note:
a. Please connect two additional USB-to-Serial converters between the Host PC and the board's Arduino interface using Dupont cables. For M70 in M7MIX0 and M71 in M7MIX1, make the connections as shown below.
.. code-block:: text
+---------+ USB +-----------------+ +---------+ | Host PC |<----->| USB-to-Serial a |--TX-->RX(J48-2, M2_UART11_RXD)--| board | | | | |--RX<--TX(J48-4, M2_UART11_TXD)--| | | | | |--GND----------------GND(J47-14)-| | | | +-----------------+ | | | | | | | | USB +-----------------+ | | | |<----->| USB to Serial b |--TX-->RX(J44-2, M1_UART12_RXD)--| | | | | |--RX<--TX(j44-4, M1_UART12_TXD)--| | | | | |--GND----------------GND(J43-14)-| | +---------+ +-----------------+ +---------+
b. For debugging system via JTAG interface, please connect one additional USB-to-Serial converter between the Host PC and the board's Arduino interface using Dupont cables. For M33S in NETCMIX, (LPUART8's pads reused by JTAG's pads, so change to use another UART3, then UART3 and JTAG can be used at the same time.) make the connections as shown below,
.. code-block:: text
+---------+ USB +-----------------+ +---------+ | Host PC |<----->| USB-to-Serial c |--TX-->RX(J44-10, M1_LED_TP1, LPUART3_RX)--| board | | | | |--RX<--TX(J51-18, M1_PWM_CX, LPUART3_TX)---| | | | | |--GND--GND(J45-12)-------------------------| | | | +-----------------+ | | | | | | | | | | | | | | | | | | | | | | +---------+ +---------+
c. There will be 4 serial ports identified when connect USB cable to debug port.
The first serial port will be UART8 for M33. As there is multiplexing between JTAG
and UART8, below bcu (bcu 1.1.113 download_) configuration is needed to use UART8.
.. code-block:: console
bcu lsftdi bcu set_gpio fta_jtag_host_en 0 -board=imx943evk19b1 -id=1-1
.. _bcu 1.1.113 download: https://github.com/nxp-imx/bcu/releases/tag/bcu_1.1.113
.. _i.MX Linux BSP release: https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX
.. include:: ../../common/board-footer.rst.inc