Merge pull request #1859 from JackyBai/master

refact the imx8m common code and add the imx8mm support