summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx8m.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2020-06-02 14:07:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-14 20:20:18 +0200
commit3c0d42752e9aa0cee0c6f33f237cf0409de529a7 (patch)
tree6d3ae04d658efc4af533cfe17a0ac826c96f916e /arch/arm/mach-imx/imx8m.c
parent03c65684522f1531500eb021721046d67962f626 (diff)
downloadbarebox-3c0d42752e9aa0cee0c6f33f237cf0409de529a7.tar.gz
barebox-3c0d42752e9aa0cee0c6f33f237cf0409de529a7.tar.xz
arm: imx: add initial imx8mp support
This adds base support for the i.MX8MP SoC. Not much to do here as this SoC is quite similar to the i.MX8M. This adds: - Kconfig symbols - bootsource detection - register base address defines - iomux defines Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/imx8m.c')
-rw-r--r--arch/arm/mach-imx/imx8m.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index d2ed7d52a9..b9e01a1d18 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -22,6 +22,7 @@
#include <mach/imx8m-ccm-regs.h>
#include <mach/reset-reason.h>
#include <mach/ocotp.h>
+#include <mach/imx8mp-regs.h>
#include <mach/imx8mq-regs.h>
#include <mach/imx8m-ccm-regs.h>
#include <soc/imx8m/clk-early.h>
@@ -105,6 +106,29 @@ int imx8mm_init(void)
return imx8m_init(cputypestr);
}
+int imx8mp_init(void)
+{
+ void __iomem *anatop = IOMEM(MX8MP_ANATOP_BASE_ADDR);
+ uint32_t type = FIELD_GET(DIGPROG_MAJOR,
+ readl(anatop + MX8MP_ANATOP_DIGPROG));
+ const char *cputypestr;
+
+ imx8mp_boot_save_loc();
+
+ switch (type) {
+ case IMX8M_CPUTYPE_IMX8MP:
+ cputypestr = "i.MX8MP";
+ break;
+ default:
+ cputypestr = "unknown i.MX8M";
+ break;
+ };
+
+ imx_set_silicon_revision(cputypestr, imx8mp_cpu_revision());
+
+ return imx8m_init(cputypestr);
+}
+
int imx8mq_init(void)
{
void __iomem *anatop = IOMEM(MX8M_ANATOP_BASE_ADDR);