OPTEE on i.MX8MP

Fabio Estevam festevam at gmail.com
Tue Mar 17 18:06:16 CET 2026


Hi Yannic and Peng,

Thanks for your replies.

On Tue, Mar 17, 2026 at 3:41 AM Yannic Moog <Y.Moog at phytec.de> wrote:

> My guess is that you copied tee.bin, not tee-raw.bin [1] to the U-Boot directory.
> We need tee-raw.bin.

Yes, besides that, I had to pass the BL32_BASE option to TF-A and the
CFG_TZDRAM_START option to Optee-os:

TF-A (Mainline 2.14)
make -j12  SPD=opteed PLAT=imx8mp BL32_BASE=0x56000000
cp build/imx8mp/release/bl31.bin <u-boot-dir>

Optee-os (Mainline 4.9.0)
make -j12 CROSS_COMPILE=aarch64-linux-gnu- O=out/arm
PLATFORM=imx-mx8mpevk CFG_TZDRAM_START=0x56000000
cp out/arm/core/tee-raw.bin <u-boot-dir>/tee.bin

U-Boot:

--- a/configs/imx8mp_evk_defconfig
+++ b/configs/imx8mp_evk_defconfig
@@ -9,6 +9,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_ENV_OFFSET=0x200000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="freescale/imx8mp-evk"
+CONFIG_IMX8M_OPTEE_LOAD_ADDR=0x56000000
 CONFIG_TARGET_IMX8MP_EVK=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_SPL_MMC=y

With that, Linux registers the optee device successfully on kernel 6.18:

# dmesg | grep optee
[    0.000000] OF: reserved mem:
0x0000000057c00000..0x0000000057ffffff (4096 KiB) nomap non-reusable
optee_shm at 57c00000
[    0.000000] OF: reserved mem:
0x0000000056000000..0x0000000057bfffff (28672 KiB) nomap non-reusable
optee_core at 56000000
[    0.501959] optee: probing for conduit method.
[    0.502012] optee: revision 4.9 (c2b0684fcd899299)
[    0.522839] optee: dynamic shared memory is enabled
[    0.523251] optee: initialized driver
# ls /dev/tee*
/dev/tee0      /dev/teepriv0

I'll submit the patch for the imx8mp_evk_defconfig change and will
also add an Optee entry in doc/board/nxp/imx8mp_evk.rst

Thanks,

Fabio Estevam


More information about the U-Boot mailing list