Commit f8787814c36ec50c2981f836767ce52bdae5e34b
1 parent
db588bf76b
Exists in
smarc_8mq_lf_v2020.04
and in
4 other branches
MLK-19526-1 imx8mq: Add CPU ID for iMX8MD and iMX8MQLite
iMX8MQ has two variant versions: iMX8MD and iMX8MQLite. Add dummy CPU ID for these two, and check the fuses to get correct versions. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 58b77b541311d4b1d7db787cc769a7ad23ecbc79) (cherry picked from commit a01c2144b5b97b62cb07be01487600116150af9d)
Showing 4 changed files with 19 additions and 3 deletions Side-by-side Diff
arch/arm/include/asm/arch-imx/cpu.h
... | ... | @@ -26,6 +26,8 @@ |
26 | 26 | #define MXC_CPU_MX7S 0x71 /* dummy ID */ |
27 | 27 | #define MXC_CPU_MX7D 0x72 |
28 | 28 | #define MXC_CPU_IMX8MQ 0x82 |
29 | +#define MXC_CPU_IMX8MD 0x83 /* dummy ID */ | |
30 | +#define MXC_CPU_IMX8MQL 0x84 /* dummy ID */ | |
29 | 31 | #define MXC_CPU_IMX8MM 0x85 /* dummy ID */ |
30 | 32 | #define MXC_CPU_IMX8MML 0x86 /* dummy ID */ |
31 | 33 | #define MXC_CPU_IMX8MMD 0x87 /* dummy ID */ |
arch/arm/include/asm/mach-imx/sys_proto.h
... | ... | @@ -43,7 +43,9 @@ |
43 | 43 | |
44 | 44 | #define is_mx7ulp() (is_cpu_type(MXC_CPU_MX7ULP)) |
45 | 45 | |
46 | -#define is_imx8mq() (is_cpu_type(MXC_CPU_IMX8MQ)) | |
46 | +#define is_imx8mq() (is_cpu_type(MXC_CPU_IMX8MQ) || is_cpu_type(MXC_CPU_IMX8MD) || is_cpu_type(MXC_CPU_IMX8MQL)) | |
47 | +#define is_imx8md() (is_cpu_type(MXC_CPU_IMX8MD)) | |
48 | +#define is_imx8mql() (is_cpu_type(MXC_CPU_IMX8MQL)) | |
47 | 49 | #define is_imx8qm() (is_cpu_type(MXC_CPU_IMX8QM)) |
48 | 50 | #define is_imx8mm() (is_cpu_type(MXC_CPU_IMX8MM) || is_cpu_type(MXC_CPU_IMX8MML) ||\ |
49 | 51 | is_cpu_type(MXC_CPU_IMX8MMD) || is_cpu_type(MXC_CPU_IMX8MMDL) || \ |
arch/arm/mach-imx/cpu.c
... | ... | @@ -109,7 +109,11 @@ |
109 | 109 | case MXC_CPU_IMX8MMSL: |
110 | 110 | return "8MMSL"; /* Single-core Lite version of the imx8mm */ |
111 | 111 | case MXC_CPU_IMX8MQ: |
112 | - return "8MQ"; /* Quad-core version of the imx8m */ | |
112 | + return "8MQ"; /* Quad-core version of the imx8mq */ | |
113 | + case MXC_CPU_IMX8MQL: | |
114 | + return "8MQLite"; /* Quad-core Lite version of the imx8mq */ | |
115 | + case MXC_CPU_IMX8MD: | |
116 | + return "8MD"; /* Dual-core version of the imx8mq */ | |
113 | 117 | case MXC_CPU_MX7S: |
114 | 118 | return "7S"; /* Single-core version of the mx7 */ |
115 | 119 | case MXC_CPU_MX7D: |
arch/arm/mach-imx/imx8m/soc.c
... | ... | @@ -169,7 +169,13 @@ |
169 | 169 | |
170 | 170 | u32 value = readl(&fuse->tester4); |
171 | 171 | |
172 | - if (type == MXC_CPU_IMX8MM) { | |
172 | + if (type == MXC_CPU_IMX8MQ) { | |
173 | + if ((value & 0x3) == 0x2) | |
174 | + return MXC_CPU_IMX8MD; | |
175 | + else if (value & 0x200000) | |
176 | + return MXC_CPU_IMX8MQL; | |
177 | + | |
178 | + } else if (type == MXC_CPU_IMX8MM) { | |
173 | 179 | switch (value & 0x3) { |
174 | 180 | case 2: |
175 | 181 | if (value & 0x1c0000) |
... | ... | @@ -230,6 +236,8 @@ |
230 | 236 | } |
231 | 237 | } |
232 | 238 | } |
239 | + | |
240 | + type = get_cpu_variant_type(type); | |
233 | 241 | } |
234 | 242 | |
235 | 243 | return (type << 12) | reg; |