iMX93 FSPI boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX93 FSPI boot

1,391 Views
jasonSilc
Contributor I

Hello

I tried to boot our iMX93 product from SPI nor flash.But I can not get it work.Please advise me .Below it the details.

Our yocto environment:

NOTE: Your conf/bblayers.conf has been automatically updated.
Loading cache: 100% | | ETA: --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |####################################################################################################################################################################################################################################################| Time: 0:00:51
Parsing of 3464 .bb files complete (0 cached, 3464 parsed). 5338 targets, 621 skipped, 19 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.4.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx93evk"
DISTRO = "fsl-imx-wayland"
DISTRO_VERSION = "6.1-mickledore"
TUNE_FEATURES = "aarch64 armv8a crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:a57506c46d92bf0767060102d2139be06d46f575"
meta-oe
meta-multimedia
meta-python = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-freescale = "HEAD:7327e03c61823268a5a957fe090c4cc5e1735b34"
meta-freescale-3rdparty = "HEAD:bccd93f1ceece608e69799b6fc8f79e8a519f89e"
meta-freescale-distro = "HEAD:7956a0ab407a33c40fdc6eb4fabdcb7dc54fd359"
meta-bsp
meta-sdk
meta-ml
meta-v2x = "HEAD:c842613830da0a5473513cdbc2dce015b0ca9a5d"
meta-nxp-demo-experience = "HEAD:b8c0a9af3e3ca5400b9aff6436fbb654d3108cb4"
meta-arm
meta-arm-toolchain = "HEAD:c6380674f59489b327c5047d803cc35b68642cd4"
meta-chromium = "HEAD:e232c2e21b96dc092d9af8bea4b3a528e7a46dd6"
meta-clang = "HEAD:af4dcba009ba98250315520f3003fde4ee164cce"
meta-gnome
meta-networking
meta-filesystems = "HEAD:922f41b39f364e5b6be596b4b51e0fb37ffe1971"
meta-qt6 = "HEAD:1406d0a85525a71fe5d7892d7f915404290a78ad"
meta-parsec
meta-tpm = "HEAD:d7db0a3bd1a8639df7570483f003ce00cbe274a2"
meta-virtualization = "HEAD:38e6b3e2fe0219c773f4637a09221ca5d15bf6fc"

 

Our uboot config setting.

# default is:
# UBOOT_CONFIG = "sd"
#
# this fspi variant is for booting from SPI flash
UBOOT_CONFIG = "fspi"
IMXBOOT_TARGETS_BASENAME = "flash_singleboot"
UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_fspi_defconfig"
IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_BASENAME}_flexspi', '${IMXBOOT_TARGETS_BASENAME}', d)}"

 

After compiling it.We got the image imx-xxx-fspi-fspi.bin-flash_singleboot_flexspi .And I burn it with " ./uuu -b qspi   imx-xxx-fspi-fspi.bin-flash_singleboot_flexspi ".

I got below output from console.But after changing the boot mode to spi nor boot mode.I don't see any output from console.

U-Boot SPL 2023.04-lf_v2023.04+g968627c674 (Apr 19 2024 - 02:49:39 +0000)
SOC: 0xa1009300
LC: 0x2040010
PMIC: Over Drive Voltage Mode

U-Boot SPL 2023.04-lf_v2023.04+g968627c674 (Apr 19 2024 - 02:49:39 +0000)
SOC: 0xa1009300
LC: 0x2040010
PMIC: Over Drive Voltage Mode
DDR: 3733MTS
M33 prepare ok
Normal Boot
Trying to boot from BOOTROM
Boot Stage: USB boot
Find img info 0x88000800, size 416
Download 1585152, Total size 1586176
NOTICE: BL31: v2.8(release):lf-6.1.55-2.2.0-0-g08e9d4eef
NOTICE: BL31: Built : 06:43:30, Nov 21 2023


U-Boot 2023.04-lf_v2023.04+g968627c674 (Apr 19 2024 - 02:49:39 +0000)

CPU: i.MX93(52) rev1.1 1700 MHz (running at 1692 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 35C
Reset cause: CSU (0x200)
Model: Silicom i.MX93 eBoot Pro
DRAM: 992 MiB
Core: 205 devices, 28 uclasses, devicetree: separate
MMC: FSL_SDHC: 0
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial

BuildInfo:
- ELE firmware version 0.1.0-44880904

MMC Device 1 not found
no mmc device at slot 1
UID: 0x3e47ad41 0xcc457c9e 0xe0bde582 0x7c85fa6d
Detect USB boot. Will enter fastboot mode!
Net:
Warning: ethernet@428a0000 (eth1) using random MAC address - 4a:e9:ca:9f:8b:e6

Warning: ethernet@42890000 (eth0) using random MAC address - d2:d1:65:40:8a:20
eth0: ethernet@42890000, eth1: ethernet@428a0000 [PRIME]
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot auto; fi;
Hit any key to stop autoboot: 0

## Checking Image at 83800000 ...
Unknown image format!
Run fastboot ...
auto usb 0
Failed to configure default pinctrl
UID: 0x3e47ad41 0xcc457c9e 0xe0bde582 0x7c85fa6d
Detect USB boot. Will enter fastboot mode!
Starting download of 1897512 bytes
..............
downloading of 1897512 bytes finished
Detect USB boot. Will enter fastboot mode!
SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Found boot config header in memory
tag = 42464346
version = 56010000
readSampleClksrc=0
dataHoldTime = 3
dataSetupTime = 3
columnAddressWidth = 0
deviceModeCfgEnable = 0
deviceModeSeq = 0000
deviceModeArg = 0000
configCmdEnable = 0
configCmdSeqs[00] = 00000000
configCmdSeqs[01] = 00000000
configCmdSeqs[02] = 00000000
configCmdSeqs[03] = 00000000
configCmdArgs[00] = 00000000
configCmdArgs[01] = 00000000
configCmdArgs[02] = 00000000
configCmdArgs[03] = 00000000
controllerMiscOption = 0000
deviceType = 1
sflashPadType = 1
serialClkFreq = 2
lutCustomSeqEnable = 0
sflashA1Size = 10000000
sflashA2Size = 0000
sflashB1Size = 0000
sflashB2Size = 0000
csPadSettingOverride = 0000
sclkPadSettingOverride = 0000
dataPadSettingOverride = 0000
dqsPadSettingOverride = 0000
timeoutInMs = 0000
commandInterval = 0000
dataValidTime[00] = 00000000
dataValidTime[01] = 00000000
busyOffset = 00
busyBitPolarity = 00
lookupTable[00] = 0818040b
lookupTable[01] = 24043008
lookupTable[02] = 00000000
lookupTable[03] = 00000000
lookupTable[04] = 00000000
lookupTable[05] = 00000000
lookupTable[06] = 00000000
lookupTable[07] = 00000000
lookupTable[08] = 00000000
lookupTable[09] = 00000000
lookupTable[10] = 00000000
lookupTable[11] = 00000000
lookupTable[12] = 00000000
lookupTable[13] = 00000000
lookupTable[14] = 00000000
lookupTable[15] = 00000000
lookupTable[16] = 00000000
lookupTable[17] = 00000000
lookupTable[18] = 00000000
lookupTable[19] = 00000000
lookupTable[20] = 00000000
lookupTable[21] = 00000000
lookupTable[22] = 00000000
lookupTable[23] = 00000000
lookupTable[24] = 00000000
lookupTable[25] = 00000000
lookupTable[26] = 00000000
lookupTable[27] = 00000000
lookupTable[28] = 00000000
lookupTable[29] = 00000000
lookupTable[30] = 00000000
lookupTable[31] = 00000000
lookupTable[32] = 00000000
lookupTable[33] = 00000000
lookupTable[34] = 00000000
lookupTable[35] = 00000000
lookupTable[36] = 00000000
lookupTable[37] = 00000000
lookupTable[38] = 00000000
lookupTable[39] = 00000000
lookupTable[40] = 00000000
lookupTable[41] = 00000000
lookupTable[42] = 00000000
lookupTable[43] = 00000000
lookupTable[44] = 00000000
lookupTable[45] = 00000000
lookupTable[46] = 00000000
lookupTable[47] = 00000000
lookupTable[48] = 00000000
lookupTable[49] = 00000000
lookupTable[50] = 00000000
lookupTable[51] = 00000000
lookupTable[52] = 00000000
lookupTable[53] = 00000000
lookupTable[54] = 00000000
lookupTable[55] = 00000000
lookupTable[56] = 00000000
lookupTable[57] = 00000000
lookupTable[58] = 00000000
lookupTable[59] = 00000000
lookupTable[60] = 00000000
lookupTable[61] = 00000000
lookupTable[62] = 00000000
lookupTable[63] = 00000000
lutCustomSeq[00] = 00000000
lutCustomSeq[01] = 00000000
lutCustomSeq[02] = 00000000
lutCustomSeq[03] = 00000000
lutCustomSeq[04] = 00000000
lutCustomSeq[05] = 00000000
lutCustomSeq[06] = 00000000
lutCustomSeq[07] = 00000000
lutCustomSeq[08] = 00000000
lutCustomSeq[09] = 00000000
lutCustomSeq[10] = 00000000
lutCustomSeq[11] = 00000000
pageSize = 0100
sectorSize = 10000
Detect USB boot. Will enter fastboot mode!
SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Erase 0x1d0000 bytes @ 0x0 OK
Write 0x1cf428 bytes @ 0x0 OK
Detect USB boot. Will enter fastboot mode!
Detect USB boot. Will enter fastboot mode!
Detect USB boot. Will enter fastboot mode!
Detect USB boot. Will enter fastboot mode!

 

Thanks,

Jason

Tags (1)
0 Kudos
Reply
8 Replies

1,317 Views
jasonSilc
Contributor I

Hi Salas

 

Could it be a FCB configure issue?We are using W25Q128FW as flash device.I checked the document IMX93RM .But I am still not clear if the FCB is correct and if not correct how to figure it out?

Thanks,

Jason

0 Kudos
Reply

1,271 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @jasonSilc 

 

Could you please change the UBOOT_CONFIG from "fspi" to "sd fspi" as in reference manual:

Alejandro_Salas_0-1713979043089.png

 

Best regards.

 

0 Kudos
Reply

1,254 Views
jasonSilc
Contributor I

Hi Salas

 

 I have changed the UBOOT_CONFIG in my local.conf ,but I got a error when running "bitbake core-image-base".Please see the error log below in red.

$ cat conf/local.conf
MACHINE ??= 'eboot-pro-fspi'
DISTRO ?= 'fsl-imx-xwayland'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
UBOOT_CONFIG = "sd fspi"

 

 

Initialising tasks: 100% |#################################################################################################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 10 Local 0 Mirrors 0 Missed 10 Current 2498 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: imx-boot-1.0-r0 do_compile: ExecutionError('/home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/run.do_compile.4190031', 1, None, None)
ERROR: Logfile of failure stored in: /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/log.do_compile.4190031
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: i.MX 93 boot binary build
| NOTE: Copy ddr_firmware: lpddr4_dmem_1d_v202201.bin from /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/deploy/images/eboot-pro-fspi -> /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9
| NOTE: Copy ddr_firmware: lpddr4_dmem_2d_v202201.bin from /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/deploy/images/eboot-pro-fspi -> /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9
| NOTE: Copy ddr_firmware: lpddr4_imem_1d_v202201.bin from /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/deploy/images/eboot-pro-fspi -> /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9
| NOTE: Copy ddr_firmware: lpddr4_imem_2d_v202201.bin from /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/deploy/images/eboot-pro-fspi -> /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9
| cp: target '/home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9/u-boot.bin' is not a directory
| WARNING: /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/run.do_compile.4190031:210 exit 1 from 'cp /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/deploy/images/eboot-pro-fspi/u-boot-eboot-pro-fspi.bin-sd fspi /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/git/iMX9/u-boot.bin'
| WARNING: Backtrace (BB generated script):
| #1: compile_mx93, /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/run.do_compile.4190031, line 210
| #2: do_compile, /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/run.do_compile.4190031, line 165
| #3: main, /home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/ebootpro_fspi_build/tmp/work/eboot_pro_fspi-poky-linux/imx-boot/1.0-r0/temp/run.do_compile.4190031, line 218
ERROR: Task (/home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_1.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5040 tasks of which 5039 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/jason_zhang/data2/eboot/ebootPro/nxp-imx/imx-yocto-bsp-secure/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_1.0.bb:do_compile
Summary: There was 1 WARNING message.
Summary: There was 1 ERROR message, returning a non-zero exit code.

Is it SDK bug or my config file issue ?

 

Thanks,

Jason

0 Kudos
Reply

1,248 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @jasonSilc ,

Please try uboot_config_imx93evk="sd fspi" instead of UBOOT_CONFIG.

e.g:

MACHINE ??= 'imx93evk'
DISTRO ?= 'fsl-imx-wayland'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
uboot_config_imx93evk="sd fspi"

 

That configuration worked for me.

 

Best regards.

 

Salas.

0 Kudos
Reply

1,212 Views
jasonSilc
Contributor I

Hi SalaS

 

Thanks for you help.

I just tried it ,I have not saw the error again .But I can not got the fspi boot image .Only saw sd boot image with the config.It seems "uboot_config_eboot-pro-fspi" not work really in my workspace.

 

Do you generate the fspi boot image ?

Can you let me know which yocto release do you use ?

MACHINE ??= 'eboot-pro-fspi'
DISTRO ?= 'fsl-imx-xwayland'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
#UBOOT_CONFIG = "sd fspi"
uboot_config_eboot-pro-fspi="sd fspi"

Thanks,

Jason

0 Kudos
Reply

1,325 Views
jasonSilc
Contributor I

Hi Salas

 

Yes ,I have done that .

The eMMC image work well but NOR flash boot not.Do you have any idea?Should I check the uboot config file ?

 

Thanks

Jason

0 Kudos
Reply

1,335 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @jasonSilc 

 

Have you tried to set the board in Serial Download mode, then set the command: 

uuu -b qspi imx-xxx-fspi-fspi.bin-flash_singleboot_flexspi

As in https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf (Chapter 4.2.2).

 

Then put the boot switches in FlexSPI boot, and turn on the board.

 

Best regards.

 

Salas.

0 Kudos
Reply

1,277 Views
jasonSilc
Contributor I

Can you help me ?

 

Thanks,

Jason

0 Kudos
Reply