All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Michal Simek <monstr@monstr.eu>, Michael Walle <michael@walle.cc>
Cc: d.antliff@unsw.edu.au, u-boot@lists.denx.de
Subject: Re: Setting MAC address from I2C EEPROM - debug / commands? (Xilinx)
Date: Wed, 23 Nov 2022 10:26:40 -0500	[thread overview]
Message-ID: <db256162-2253-8cd1-1a47-f0fb5e35e334@gmail.com> (raw)
In-Reply-To: <7f3a1efd-2e44-70b3-2479-d7287dc1865f@monstr.eu>

On 11/23/22 10:11, Michal Simek wrote:
> 
> 
> On 11/23/22 14:27, Michael Walle wrote:
>>>> ethernet {
>>>>       nvmem-cells = <&mac_address>;
>>>>       nvmem-cell-names = "mac-address";
>>>> };
>>>>
>>>> You'll need 2022.07 for this I think. This is the same method which
>>>> Linux uses. I added this specificly to be able to load MAC addresses
>>>> from EEPROMs without needing to hard code stuff into Kconfig.
>>>
>>> This looks good and I see Sean wired it in the U-Boot already. It should work
>>> fine with all Xilinx formats but on boards just for MAC address. (FRU format is
>>> also designed in a way that the same boards have MAC address at the same location).
>>> The code I described above is also checking in FRU format that checksums are
>>> correct and also reading more information from it for other use cases.
>>
>> You might also be interested in the new NVMEM layout patch series:
>> https://lore.kernel.org/lkml/20221118185118.1190044-1-michael@walle.cc/
> 
> This is interesting. But how can you use the nvmem-cell description for mac address reading which Sean mentioned above?

Hasn't been implemented yet. I personally don't have such a layout, so
I haven't added it.

--Sean

> Also DT description is saying that you are particular format but it doesn't mean that data is correct. I see that pretty much you can in add_cells refuse to create description if CRCs fails but maybe any format autodetection would be good to have. AFAIK Xilinx is using 3 formats now where 2 are legacy and FRU which is very similar to onie-tlv.
> 
> Thanks,
> Michal
> 


  reply	other threads:[~2022-11-23 15:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23  1:23 Setting MAC address from I2C EEPROM - debug / commands? (Xilinx) David Antliff
2022-11-23  3:14 ` Sean Anderson
2022-11-23  8:45   ` Michal Simek
2022-11-23 13:27     ` Michael Walle
2022-11-23 15:11       ` Michal Simek
2022-11-23 15:26         ` Sean Anderson [this message]
2022-11-23 22:14     ` David Antliff
2022-11-23 21:56   ` David Antliff
2023-06-12  3:25   ` David Antliff
2023-06-12  4:01     ` Sean Anderson
2023-06-12  4:16       ` David Antliff
2023-06-12  5:32         ` David Antliff

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=db256162-2253-8cd1-1a47-f0fb5e35e334@gmail.com \
    --to=seanga2@gmail.com \
    --cc=d.antliff@unsw.edu.au \
    --cc=michael@walle.cc \
    --cc=monstr@monstr.eu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.