From: Ye Li Date: Thu, 19 Sep 2024 04:01:24 +0000 (+0800) Subject: imx9: soc: Change second Ethernet MAC fuse layout X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=44541def314621d345a80c5b71c0ec5b44dbaa9c;p=u-boot.git imx9: soc: Change second Ethernet MAC fuse layout 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 Signed-off-by: Peng Fan --- diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 5699623027..9494c73996 100644 --- a/arch/arm/mach-imx/imx9/soc.c +++ b/arch/arm/mach-imx/imx9/soc.c @@ -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",