imx8mn: support get_cpu_rev

Add a dummy cpu type and support get_cpu_rev for i.MX8MN

Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Peng Fan 2019-06-27 17:23:49 +08:00 committed by Stefano Babic
parent 66ec590c49
commit 2434131a7b
4 changed files with 8 additions and 1 deletions

View File

@ -32,6 +32,7 @@
#define MXC_CPU_IMX8MMDL 0x88 /* dummy ID */ #define MXC_CPU_IMX8MMDL 0x88 /* dummy ID */
#define MXC_CPU_IMX8MMS 0x89 /* dummy ID */ #define MXC_CPU_IMX8MMS 0x89 /* dummy ID */
#define MXC_CPU_IMX8MMSL 0x8a /* dummy ID */ #define MXC_CPU_IMX8MMSL 0x8a /* dummy ID */
#define MXC_CPU_IMX8MN 0x8b /* dummy ID */
#define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */ #define MXC_CPU_IMX8QXP_A0 0x90 /* dummy ID */
#define MXC_CPU_IMX8QM 0x91 /* dummy ID */ #define MXC_CPU_IMX8QM 0x91 /* dummy ID */
#define MXC_CPU_IMX8QXP 0x92 /* dummy ID */ #define MXC_CPU_IMX8QXP 0x92 /* dummy ID */

View File

@ -53,6 +53,8 @@
#define is_imx8mmdl() (is_cpu_type(MXC_CPU_IMX8MMDL)) #define is_imx8mmdl() (is_cpu_type(MXC_CPU_IMX8MMDL))
#define is_imx8mms() (is_cpu_type(MXC_CPU_IMX8MMS)) #define is_imx8mms() (is_cpu_type(MXC_CPU_IMX8MMS))
#define is_imx8mmsl() (is_cpu_type(MXC_CPU_IMX8MMSL)) #define is_imx8mmsl() (is_cpu_type(MXC_CPU_IMX8MMSL))
#define is_imx8mn() (is_cpu_type(MXC_CPU_IMX8MN))
#define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP)) #define is_imx8qxp() (is_cpu_type(MXC_CPU_IMX8QXP))
#ifdef CONFIG_MX6 #ifdef CONFIG_MX6

View File

@ -92,6 +92,8 @@ static char *get_reset_cause(void)
const char *get_imx_type(u32 imxtype) const char *get_imx_type(u32 imxtype)
{ {
switch (imxtype) { switch (imxtype) {
case MXC_CPU_IMX8MN:
return "8MNano";/* Quad-core version of the imx8mn */
case MXC_CPU_IMX8MM: case MXC_CPU_IMX8MM:
return "8MMQ"; /* Quad-core version of the imx8mm */ return "8MMQ"; /* Quad-core version of the imx8mm */
case MXC_CPU_IMX8MML: case MXC_CPU_IMX8MML:

View File

@ -197,7 +197,9 @@ u32 get_cpu_rev(void)
reg &= 0xff; reg &= 0xff;
/* i.MX8MM */ /* i.MX8MM */
if (major_low == 0x41) { if (major_low == 0x42) {
return (MXC_CPU_IMX8MN << 12) | reg;
} else if (major_low == 0x41) {
type = get_cpu_variant_type(MXC_CPU_IMX8MM); type = get_cpu_variant_type(MXC_CPU_IMX8MM);
} else { } else {
if (reg == CHIP_REV_1_0) { if (reg == CHIP_REV_1_0) {