]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: get cpu id/type of i.MX8MP
authorPeng Fan <peng.fan@nxp.com>
Fri, 27 Dec 2019 02:14:02 +0000 (10:14 +0800)
committerStefano Babic <sbabic@denx.de>
Wed, 8 Jan 2020 12:20:08 +0000 (13:20 +0100)
Support get i.MX8MP cpu id and cpu type

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/include/asm/arch-imx/cpu.h
arch/arm/include/asm/mach-imx/sys_proto.h
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/imx8m/soc.c

index b0f4dd089f69a17314e911a8112a10fad38838c6..5ade63665ab03c43f147cc8662224327b6161403 100644 (file)
@@ -33,6 +33,7 @@
 #define MXC_CPU_IMX8MMS                0x89 /* dummy ID */
 #define MXC_CPU_IMX8MMSL       0x8a /* dummy ID */
 #define MXC_CPU_IMX8MN         0x8b /* dummy ID */
+#define MXC_CPU_IMX8MP         0x182/* dummy ID */
 #define MXC_CPU_IMX8QXP_A0     0x90 /* dummy ID */
 #define MXC_CPU_IMX8QM         0x91 /* dummy ID */
 #define MXC_CPU_IMX8QXP                0x92 /* dummy ID */
index fff48008087a0abc007d27dc0b3800d71afe0f7f..35b39b1f86c05c8618a81c004575a7ebbe8ce13c 100644 (file)
@@ -54,6 +54,7 @@
 #define is_imx8mms() (is_cpu_type(MXC_CPU_IMX8MMS))
 #define is_imx8mmsl() (is_cpu_type(MXC_CPU_IMX8MMSL))
 #define is_imx8mn() (is_cpu_type(MXC_CPU_IMX8MN))
+#define is_imx8mp() (is_cpu_type(MXC_CPU_IMX8MP))
 
 #define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP))
 
index 51c7c05f04dac385c1a678e0e3e04e9f7107d4ab..303f5bb4d6a79dff1cea0681cc7e2e98116761c8 100644 (file)
@@ -92,6 +92,8 @@ static char *get_reset_cause(void)
 const char *get_imx_type(u32 imxtype)
 {
        switch (imxtype) {
+       case MXC_CPU_IMX8MP:
+               return "8MP";   /* Quad-core version of the imx8mp */
        case MXC_CPU_IMX8MN:
                return "8MNano";/* Quad-core version of the imx8mn */
        case MXC_CPU_IMX8MM:
index 5ce5a180e80148556a11d5909537a831b4f235b1..9a039ce1275b271ea8bf12e3bbd0845e301eb8f2 100644 (file)
@@ -197,8 +197,11 @@ u32 get_cpu_rev(void)
 
        reg &= 0xff;
 
-       /* i.MX8MM */
-       if (major_low == 0x42) {
+       /* iMX8MP */
+       if (major_low == 0x43) {
+               return (MXC_CPU_IMX8MP << 12) | reg;
+       } else if (major_low == 0x42) {
+               /* iMX8MN */
                return (MXC_CPU_IMX8MN << 12) | reg;
        } else if (major_low == 0x41) {
                type = get_cpu_variant_type(MXC_CPU_IMX8MM);