Using ATF is ARM preferred software structure, i.MX8 uses ATF BL31 to handle PSCI and TEE context switch. Please see https://github.com/ARM-software/arm-trusted-firmware/blob/master/readme.rst
ATF can not be removed, the right security level needs to be initialized properly, ATF is running at EL3, while U-boot and Linux OS run at EL2/EL1 normal world, secure OS runs at EL1 secure world.
ATF is first booted, then it loads the u-boot and secure OS.
Now many Kernel features depends on ATF, they implemented the functions in ATF. For example, multiple cores boot up, suspend/resume, system reboot, etc. You can also refer the ARM PSCI for these features.
For i.MX8QM/QXP, ATF takes 128KB in flash.bin, this could be optimized.
For the MX8MMini this task is not supported
We apologize for the inconvenience.