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



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?

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

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


  reply	other threads:[~2022-11-23 15:11 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 [this message]
2022-11-23 15:26         ` Sean Anderson
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=7f3a1efd-2e44-70b3-2479-d7287dc1865f@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=d.antliff@unsw.edu.au \
    --cc=michael@walle.cc \
    --cc=seanga2@gmail.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 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.