SPL_BINARY:pn-u-boot-imx = ""
 UBOOT_CONFIG:pn-u-boot-imx ??= " \
     sd-imx \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee-imx', '', d)} \
 "
 UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx"
 UBOOT_SUFFIX:pn-u-boot-imx = "imx"
                          'u-boot-fslc', 'imx-uboot-spl-bootpart.wks.in', \
                                         'imx-uboot-bootpart.wks.in', d)}"
 
+OPTEE_BIN_EXT = "6qpauto"
+
 SERIAL_CONSOLES = "115200;ttymxc3"
 
 MACHINE_FIRMWARE:append:mx6 = " linux-firmware-ath6k"
 
 SPL_BINARY:pn-u-boot-imx = ""
 UBOOT_CONFIG:pn-u-boot-imx ??= " \
     sd-imx \
+    ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee-imx', '', d)} \
 "
 UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx"
 UBOOT_SUFFIX:pn-u-boot-imx = "imx"
                          'u-boot-fslc', 'imx-uboot-spl-bootpart.wks.in', \
                                         'imx-uboot-bootpart.wks.in', d)}"
 
+OPTEE_BIN_EXT = "6qsdb"
+
 SERIAL_CONSOLES = "115200;ttymxc0"
 
 MACHINE_FIRMWARE:append:mx6 = " linux-firmware-ath6k"