]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: soc: Change second Ethernet MAC fuse layout
authorYe Li <ye.li@nxp.com>
Thu, 19 Sep 2024 04:01:24 +0000 (12:01 +0800)
committerFabio Estevam <festevam@gmail.com>
Thu, 19 Sep 2024 03:12:41 +0000 (00:12 -0300)
The second Ethernet MAC (eQOS) fuse layout is changed since i.MX93 A1
following other i.MX platforms, for example i.MX8MP.

Order for A0:
MAC1_ADDR[15:0]
MAC1_ADDR[31:16]
MAC1_ADDR[47:32]
MAC2_ADDR[47:32]
MAC2_ADDR[15:0]
MAC2_ADDR[31:16]

Order since A1:
MAC1_ADDR[15:0]
MAC1_ADDR[31:16]
MAC1_ADDR[47:32]
MAC2_ADDR[15:0]
MAC2_ADDR[31:16]
MAC2_ADDR[47:32]

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

index 5699623027eec0d60b40d8ac1ec135efa9c0ea55..9494c73996973b302be81127a4eeeaa10a813ce4 100644 (file)
@@ -504,12 +504,21 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
                if (ret)
                        goto err;
 
-               mac[0] = val[1] >> 24;
-               mac[1] = val[1] >> 16;
-               mac[2] = val[0] >> 24;
-               mac[3] = val[0] >> 16;
-               mac[4] = val[0] >> 8;
-               mac[5] = val[0];
+               if (is_imx93() && is_soc_rev(CHIP_REV_1_0)) {
+                       mac[0] = val[1] >> 24;
+                       mac[1] = val[1] >> 16;
+                       mac[2] = val[0] >> 24;
+                       mac[3] = val[0] >> 16;
+                       mac[4] = val[0] >> 8;
+                       mac[5] = val[0];
+               } else {
+                       mac[0] = val[0] >> 24;
+                       mac[1] = val[0] >> 16;
+                       mac[2] = val[0] >> 8;
+                       mac[3] = val[0];
+                       mac[4] = val[1] >> 24;
+                       mac[5] = val[1] >> 16;
+               }
        }
 
        debug("%s: MAC%d: %02x.%02x.%02x.%02x.%02x.%02x\n",