toradex: common: handle third MAC address for SMARC i.MX95
PATCH 1/1 toradex: common: handle third MAC address for SMARC i.MX95
From: Max Krummenacher <[email protected]>
The toradex_smarc_imx95 board exposes three Ethernet ports. Set the third MAC address equal to the second MAC address.
Signed-off-by Max Krummenacher <[email protected]>
---
board/toradex/common/tdx-common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
board/toradex/common/tdx-common.c +12 -0
@@ -179,6 +179,18 @@ static int settings_r(void)eth_env_set_enetaddr ("eth1addr" , ethaddr); } +if (IS_ENABLED (CONFIG_TARGET_TORADEX_SMARC_IMX95 ) && + !eth_env_get_enetaddr ("eth2addr" , ethaddr)) { +/* +* Third MAC address is allocated from block +* 0x100000 higher then the first MAC address. +* The same as the default for the secondary MAC. +*/ +memcpy (ethaddr, &tdx_eth_addr,6 ); + ethaddr[3 ] +=0x10 ; +eth_env_set_enetaddr ("eth2addr" , ethaddr); + } +return 0 ; }EVENT_SPY_SIMPLE (EVT_SETTINGS_R , settings_r);
Signature · 1 line
2.42.0
Quoted 6 lines · On Tue, Jan 13, 2026 at 01:58:23PM +0100, [email protected] wrote:
From: Max Krummenacher <[email protected]>
The
toradex_smarc_imx95board exposes three Ethernet ports. Set the third MAC address equal to the second MAC address.Signed-off-by Max Krummenacher <[email protected]>
Reviewed-by Francesco Dolcini <[email protected]>
Fabio Estevam
AppliedQuoted 7 lines · On Tue, Jan 13, 2026 at 10:05 AM <[email protected]> wrote:
From: Max Krummenacher <[email protected]>
The
toradex_smarc_imx95board exposes three Ethernet ports. Set the third MAC address equal to the second MAC address.Signed-off-by Max Krummenacher <[email protected]>
Applied, thanks.