Skip to contentSkip to conversation

imx9: scmi: Update get mac from fuse for iMX952

PATCH New [email protected] 1 participant 1 message Jul 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx9: scmi: Update get mac from fuse for iMX952

From: Ye Li <[email protected]>

Since iMX952 only has 2 pf and 2 vf, update the imx_get_mac_from_fuse to adapt this layout.

---
 arch/arm/mach-imx/imx9/scmi/soc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/mach-imx/imx9/scmi/soc.c +12 -0
index 18d00355999..796c9e8b18d 100644
@@ -593,6 +593,18 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 			eth_addr_add(mac, 8); /* enetc1 */
 		if (dev_id == 2)
 			eth_addr_add(mac, 9); /* enetc2 */
+	} else if (is_imx952()) {
+		/*
+		 * i.MX952 uses the following mac address offset list:
+		 * | No. | Mac address user     |
+		 * |-----|----------------------|
+		 * | 0   | enetc mac pf0        |
+		 * | 1   | enetc mac vf0        |
+		 * | 2   | enetc mac pf1        |
+		 * | 3   | enetc mac vf1        |
+		 */
+		if (dev_id == 1)
+			eth_addr_add(mac, 2);
 	} else {
 		if (dev_id == 1)
 			eth_addr_add(mac, 3);
Signature · 1 line
2.50.1