]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: imx9: Update i.MX91 part number detection
authorYe Li <ye.li@nxp.com>
Mon, 11 May 2026 07:47:39 +0000 (15:47 +0800)
committerFabio Estevam <festevam@gmail.com>
Fri, 15 May 2026 20:31:40 +0000 (17:31 -0300)
Change to not use NXP_RECOG fuse, but detect part number according
to feature disable fuses and SPEED fuse.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx9/soc.c

index 44b3e0f53101a81d616b0a0cc56f75a642b8de37..ec0cb18e9545961fb7094b6a00f6398f4f4c80dd 100644 (file)
@@ -198,26 +198,15 @@ static u32 get_cpu_variant_type(u32 type)
        bool npu_disable = !!(val & BIT(13));
        bool core1_disable = !!(val & BIT(15));
        u32 pack_9x9_fused = BIT(4) | BIT(5) | BIT(17) | BIT(19) | BIT(24);
-       u32 nxp_recog = (val & GENMASK(23, 16)) >> 16;
+       u32 speed = (val & GENMASK(11, 6)) >> 6;
 
        /* For iMX91 */
        if (type == MXC_CPU_IMX91) {
-               switch (nxp_recog) {
-               case 0x9:
-               case 0xA:
+               if ((val2 & pack_9x9_fused) == pack_9x9_fused)
                        type = MXC_CPU_IMX9111;
-                       break;
-               case 0xD:
-               case 0xE:
-                       type = MXC_CPU_IMX9121;
-                       break;
-               case 0xF:
-               case 0x10:
-                       type = MXC_CPU_IMX9101;
-                       break;
-               default:
-                       break;  /* 9131 as default */
-               }
+
+               if (speed == 0xf) /* 800Mhz arm */
+                       type += 1;
 
                return type;
        }