public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: Marek Vasut <marex@nabladev.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
	Peng Fan <peng.fan@nxp.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Tom Rini <trini@konsulko.com>, u-boot <u-boot@dh-electronics.com>
Subject: RE: [PATCH] board: dhelectronics: imx: Use second Ethernet MAC also from fuse
Date: Fri, 27 Mar 2026 22:02:41 +0000	[thread overview]
Message-ID: <3a8724ffe4fa44808ac8a278e4a702f7@dh-electronics.com> (raw)
In-Reply-To: <2dca42bf-a247-4190-9439-14e14f65aec3@nabladev.com>

From: Marek Vasut <marex@nabladev.com>
Sent: Monday, March 23, 2026 6:21 PM
> On 3/23/26 5:49 PM, Christoph Niedermaier wrote:
> 
> [...]
> 
>>> As for the rest, it really boils down to the ordering of fallbacks, it
>>> is either:
>>>
>>> A)
>>> fuse1
>>> eeprom1
>>> fuse0+1
>>> eeprom0+1
>>>
>>> or
>>>
>>> B)
>>> fuse1
>>> fuse0+1
>>> eeprom1
>>> eeprom0+1
>>>
>>> The following ordering, which is the ordering introduced by this patch,
>>> is confusing:
>>>
>>> fuse1
>>> eeprom1
>>> eeprom0+1
>>> fuse0+1
>>>
>>> So please pick either A) or B) above. I do not see any particular
>>> advantage of either of the other, except maybe B) improves boot time in
>>> case both fuse blocks are blown, because it avoids the EEPROM I2C access.
>>
>> The prevention of I2C access is only a one time effect, because then the
>> MAC addresses will provided by the environment.
> 
> Which increases the system boot time, which is undesired.

If a customer sequentially fuse only the first MAC address from a MAC address
pool. Then the second MAC address of the SoM is the same MAC address as the MAC
address from the next SoM's first MAC address. That is very bad. With the A)
it can be avoided, because the second MAC address then is taken from the EEPROM.
If I had to choose between reducing the boot time once and preventing potential
duplicate MAC addresses, I would say that preventing potential duplicate MAC
addresses is the better option. Furthermore, the issue of duplicate MAC addresses
in the system is not a hypothetical scenario, it has already occurred in practice.

>> If I remove the eeprom0+1, because it was for prototype configurations,
>> my preferred order would be:
>>
>> fuse1
>> eeprom1
>> fuse0+1
> eeprom0 can not be removed, that breaks backward compatibility. And the
> ordering of fuse-eeprom-fuse is confusing and has the boot time increase
> downside of A).

For which SoM should backward compatibility be maintained here. There is
no SoM at the customer's site where it is required. For rev.200 the EEPROM
ID page is used, for rev.100 only some internal SoM prototypes with two
Ethernet interfaces had only the first EEPROM populated. It's not worth
keeping that code.

> I would say B) is the way to go, it should also cover your requirements,
> keeps the boot time low if both fuse banks are fused (which can be fixed
> even on existing hardware, simply read out eeprom content and fuse it
> into fuse bank 1), and it retains the priority ordering (env, fuse,
> eeprom) without mixing it up.

The case that only the first MAC address is fused and not the second one is
a special case, but if this happens, with the order A) above you can prevent
duplicate MAC addresses from appearing in the system. In addition, if you want
to fix it, it's dangerous to fuse the second MAC address at the customer's
location, because if something goes wrong during the fusing, the device must
be replaced on-site. This can also be avoided with order A).


Regards
Christoph

  reply	other threads:[~2026-03-27 22:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 10:29 [PATCH] board: dhelectronics: imx: Use second Ethernet MAC also from fuse Christoph Niedermaier
2026-03-20 13:41 ` Peng Fan (OSS)
2026-03-20 14:41   ` Christoph Niedermaier
2026-03-20 15:00 ` Peng Fan
2026-03-20 18:22 ` Marek Vasut
2026-03-21 20:55   ` Christoph Niedermaier
2026-03-21 23:40     ` Marek Vasut
2026-03-23 10:07       ` Christoph Niedermaier
2026-03-23 14:58         ` Marek Vasut
2026-03-23 16:49           ` Christoph Niedermaier
2026-03-23 17:20             ` Marek Vasut
2026-03-27 22:02               ` Christoph Niedermaier [this message]
2026-03-27 23:11                 ` Marek Vasut
2026-03-31  9:19                   ` Christoph Niedermaier
2026-03-23 17:34 ` Marek Vasut
2026-03-26 13:34   ` Christoph Niedermaier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a8724ffe4fa44808ac8a278e4a702f7@dh-electronics.com \
    --to=cniedermaier@dh-electronics.com \
    --cc=marex@nabladev.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=peng.fan@nxp.com \
    --cc=semen.protsenko@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@dh-electronics.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox