Skip to content

MSC SM2S IMX93

Board Identification

Identifiers:

  • SOM: SM2S-IMX93-DC-15N02E1I
  • Mother board: SM2S-MB-EP5-002

Yocto MACHINE: sm2s-imx93-mbep5

Documentation:

  • MSC SM2S-IMX93 User Manual, 27.03.2024, Rev. 0.2
  • MSC SM2S-MB-EP5 Revision DV3 User Manual, 2022-MAR-17, Version 0.12

Features:

  • SoC: i.MX 9352, dual core ARM Cortex-A55 64-bit @ 1.7 GHz + ARM Cortex M33
  • RAM: 2GB SDRAM
  • Storage: 32GB eMMC + microSD
  • RJ45 Ethernet
  • 4 USB ports
  • BT/WLAN
  • LVDS, MIPI CSI-2 Camera input
  • PCIe Mini Card slot
  • SATA, SPI, I2C, UART, CAN, GPIO

Boot Sequence

  • The ROM code loads imx-boot from eMMC at offset 32 KiB.
  • The following components of imx-boot get executed:
    • U-Boot SPL
    • tee.bin
    • lpddr4_pmu_*.bin
    • ...
    • U-Boot
  • U-Boot starts the kernel
  • The kernel mounts the initial ram file system (initramfs) and starts Init

First Installation

Start imx-boot on eMMC with uuu

This procedure shows how to upload an imx-boot image onto the board (in RAM) and have it executed, so that it can be later used for fuse or eMMC provisioning.

  • Connect the micro USB connector X0803 of the board to you host PC.

  • Set the boot switches to boot from eMMC: 4. TEST# = OFF

Note: the FORCE_RECOV# line must also be pulled low (=ON on the EP1 mother board). Some mother boards do this permanently by default.

  • Execute UUU and power on the board

uuu can generally be installed as a package of your Linux distribution.

Note: UUU of version 1.4.193 doesn't work with iMX93. Tested ok on UUU version 1.5.21-0.

Ref: Avnet Embedded, Using NXP Mfgtools / "uuu" with MSC Boards - Application Note #035 (App_Note_035_Using_NXP_Mfgtool+uuu.pdf)

$ sudo uuu tmp/deploy/images/sm2s-imx93-mbep5/imx-boot
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.21-0-g1f42172
Success 1    Failure 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
3:4      2/ 2 [Done                                  ] SDPS: done     

On /dev/ttyUSB0, imx-boot can be seen starting.

------------------------------
company .......... msc
form factor ...... sm2s
platform ......... imx93
processor ........ imx93
feature .......... 15N02E1I
serial ........... 1019460559
revision (MES) ... B0
boot count ....... 293
------------------------------
...
Hit any key to stop autoboot:  0 
=> 

Press any key with the /dev/ttyUSB0 terminal active before the autoboot countdown reaches 0 to enter the u-boot command line.

Provision board with built image

  1. On your PC:

    • Copy the .wic.gz file to the TFTP server directory
  2. In U-Boot, download the .wic.gz by TFTP. Example:

    u-boot=> setenv ipaddr 169.254.142.1
    u-boot=> setenv serverip 169.254.142.224
    u-boot=> tftp welma-image-minimal-dev-sm2s-imx93-mbep5.wic.gz
    Using ethernet@42890000 device
    TFTP from server 169.254.157.80; our IP address is 169.254.157.1
    Filename 'welma-image-minimal-dev-sm2s-imx93.wic.gz'.
    Load address: 0x80400000
    Loading: #################################################################
             #################################################################
             #################################################################
             ...
             ##############################
             4.6 MiB/s
    done
    Bytes transferred = 133937669 (7fbba05 hex)
    

  3. In U-Boot, flash to eMMC:

    u-boot=> gzwrite mmc 0 $loadaddr $filesize
    
    865075200/866546688
            866546688 bytes, crc 0xa2277e1f
    

  4. In U-Boot, set BOOT_PARTITION_ENABLE to zero:

    u-boot=> mmc partconf 0 0 0 0
    

Note: This switches where the bootloader is searched in and disables looking through hardware boot partitions. The bootloader will be searched in User Data partitions instead.

Expected result after the above command:

u-boot=> mmc partconf 0
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x0
BOOT_PARTITION_ENABLE: 0x0
PARTITION_ACCESS: 0x0

Regular boot

The regular boot is done from eMMC, as follows:

  • Set the boot switch to boot from eMMC: 4. TEST# = OFF
  • Start the board.

Appendix

Boot Selection

  • To boot from eMMC:

    4. TEST#      = OFF
    

  • To boot from the SD card or from USB X0803 (uuu):

    4. TEST#      = ON
    

Note that booting from an SD card also requires some modifications in the image:

  • replace mmcblk0 by mmcblk1 in meta-welma-sm2s-imx9/files/partitions-sm2s-imx93-mbep5.conf
  • set bootdev=1 in meta-welma-sm2s-imx9/recipes-bsp/u-boot/u-boot-imx/distro-bootcmd.env

Connect to the debug serial port

Connect your PC to the SER0 RS232 interface on connector X1102 (compatible 1.8 V). Bit rate: 115200 baud.

Flash imx-boot on SD card from PC

Example for flashing imx-boot image on SD card:

$ sudo dd if=tmp/deploy/images/sm2s-imx93-mbep5/imx-boot \
          of=/dev/mmcblk0 \
          bs=1024 seek=32

Flash imx-boot on eMMC from a running U-Boot

u-boot=> setenv serverip 169.254.157.80
u-boot=> setenv ipaddr 169.254.157.1
u-boot=> ping $serverip
u-boot=> tftp imx-boot
# Assuming block size is 512 (0x200)
u-boot=> setexpr nblocks $filesize / 200
u-boot=> setexpr nblocks $nblocks + 1
# mmc dev: 0=emmc 1=sd 
u-boot=> mmc dev 0
u-boot=> mmc write ${loadaddr} 40 $nblocks
MMC write: dev # 0, block # 64, count 2512 ... 2512 blocks written: OK

X0803 Connector

Notes on Unsupported Peripherals

The SM2S-IMX93 User Guide lists the currently supported peripherals. Note that WiFi and Bluetooth are currently unsupported. HDMI support also seems not implemented yet (according to i.MX 93 Applications Processor Reference Manual Rev. 5 05/2024).

Hardware Watchdog

Welma uses the 3rd watchdog of the IMX93 SoC (wdog3).

  • Started by U-Boot (timeout 60 s)
  • Serviced by the Linux kernel
  • Then serviced by systemd
/sys/class/watchdog/watchdog0 -> ../../devices/platform/soc@0/42000000.bus/42490000.wdog/watchdog/watchdog0