Setting MAC address from I2C EEPROM - debug / commands? (Xilinx)

Michael Walle michael at walle.cc
Wed Nov 23 14:27:30 CET 2022


>> 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/

-michael


More information about the U-Boot mailing list