Hello,
The DDR frequency is printed in Uboot SPL log. For the variable frequency, you need to get multiple ddr timing files like board/freescale/imx8mp_evk/lpddr4_timing.c. This is fixed once SPL finish the DDR training.
If you have different ddr frequency in your product, you can write the product id in fuse and then read it in SPL to load different ddr timing file.
Best Regards,
Zhiming