Re: [PATCH V2] board: dhelectronics: imx: Use second Ethernet MAC also from fuse

Marek Vasut
2026-04-03T04:43:51Z

On 4/2/26 4:37 PM, Christoph Niedermaier wrote:
> Currently, the board specific code evaluates only the first Ethernet
> MAC address fuse, regardless of whether the first or second MAC
> address is requested. When the function for determine the second
> Ethernet MAC address is looking for the fused MAC address, it only
> reads the first MAC address fuse and increment it by one to set
> the second Ethernet MAC address. That is not the expected behavior
> when two MAC addresses are fused, because this causes the second
> fused MAC address to be ignored. Change this so that the second
> fused MAC address will be used.
>
> In addition, the handling of the MAC address for early prototypes
> will be removed, as such SoMs were not used by customers.

This ^ should be kept.

> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

RB goes above SoB line

[...]

> @@ -84,19 +84,8 @@ static int dh_imx8_setup_eth1addr(struct eeprom_id_page *eip)
> if (!dh_get_mac_from_eeprom(enetaddr, "eeprom1"))
> goto out;
>
> - /*
> - * Populate second ethernet MAC from first ethernet EEPROM with MAC
> - * address LSByte incremented by 1. This is only used on SoMs without
> - * second ethernet EEPROM, i.e. early prototypes.
> - */
> - if (!dh_get_mac_from_eeprom(enetaddr, "eeprom0"))
> - goto increment_out;
> -
> return -ENXIO;
>
> -increment_out:
> - enetaddr[5]++;
> -
> out:
> return eth_env_set_enetaddr("eth1addr", enetaddr);
> }

Please keep this ^ hunk, the rest is fine, thank you.