imx: imx8mp: detect i.MX8MP UltraLite when get cpu rev
authorPeng Fan <peng.fan@nxp.com>
Thu, 7 Apr 2022 07:55:52 +0000 (15:55 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Apr 2022 17:10:43 +0000 (19:10 +0200)
Detect i.MX8MP UltraLite in get_cpu_variant_type

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

index 805e1a6fb7e847b751bec2aca410a4c219495957..560bfb22a0d81dd37e4af539443133c1f4044c53 100644 (file)
@@ -409,13 +409,27 @@ static u32 get_cpu_variant_type(u32 type)
 
                /* npu disabled*/
                if ((value & 0x8) == 0x8)
-                       flag |= (1 << 1);
+                       flag |= BIT(1);
 
                /* isp disabled */
                if ((value & 0x3) == 0x3)
-                       flag |= (1 << 2);
+                       flag |= BIT(2);
+
+               /* gpu disabled */
+               if ((value & 0xc0) == 0xc0)
+                       flag |= BIT(3);
+
+               /* lvds disabled */
+               if ((value & 0x180000) == 0x180000)
+                       flag |= BIT(4);
+
+               /* mipi dsi disabled */
+               if ((value & 0x60000) == 0x60000)
+                       flag |= BIT(5);
 
                switch (flag) {
+               case 0x3f:
+                       return MXC_CPU_IMX8MPUL;
                case 7:
                        return MXC_CPU_IMX8MPL;
                case 2: