It doesn't matter M4 or M7. Let say A core side and M core side to cover all the i.MX8M family(i.MX8MQ, i.MX8MM, i.MX8MN, i.MX8MP).
If you check the i.MX8MN atf code, you can find it could say "the same".
rel_imx_5.4.47_2.2.0/imx-atf/tree/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
static const struct imx_rdc_cfg rdc[] = {
/* Master domain assignment */
RDC_MDAn(RDC_MDA_M7, DID1),
/* peripherals domain permission */
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
/* memory region */
RDC_MEM_REGIONn(16, 0x0, 0x0, 0xff),
RDC_MEM_REGIONn(17, 0x0, 0x0, 0xff),
RDC_MEM_REGIONn(18, 0x0, 0x0, 0xff),
/* Sentinel */
{0},
};
L5.4.24_2.1.0/imx-yocto-bsp/build-wayland-8mm/tmp/work/aarch64-mx8mm-poky-linux/imx-atf/2.2+gitAUTOINC+b0a00f22b0-r0/git/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
is in my yocto build.
If you don't have the atf, you could not generate the flash.bin. the bootloader.
As I said before, TroyKisky from boundarydevices in the loop, already answer the root cause. I also can check TroyKisky's reply.