From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC690C433FE for ; Wed, 23 Nov 2022 13:27:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D6198447C; Wed, 23 Nov 2022 14:27:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="1opk6ion"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53199844BD; Wed, 23 Nov 2022 14:27:39 +0100 (CET) Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D93B6843A1 for ; Wed, 23 Nov 2022 14:27:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 5F80A27A7; Wed, 23 Nov 2022 14:27:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1669210056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zluUI2z4Tl7zrbbPBYk21VRUmxHUSkXBUkJuT8XNIrA=; b=1opk6ionqOG6jzyCQVOkn0NHDYwzQxbeOa6bXpd+4UvMpW0frKgkfzhAg+ZSEgn3xZ4py3 zJoxaMVLAfLt+sbsK1oGB+/f5lRcgkRBoxWYH2wb/NQh9r55r0DrUeo35tTjkf9FoMNCmT VizUU89ML97WlJ2tEQytF5GPMi2QjKcFqYhwEGF0llW8SdLuS+7t4OGkE8UeHgmkSR/RSw dVT2aqZQz+qGdVYwuJCl9+S5IPNmNIP/9RKcv6VR0ugSvN8QP5T4IJDRN1MWGL7papwUYr oG+kVkipbBzB7ftslQFhBQLeeI/ZBEXyGyCsLrmKCBdLwjQw6VSn9ekQaPjaGA== From: Michael Walle To: monstr@monstr.eu Cc: d.antliff@unsw.edu.au, seanga2@gmail.com, u-boot@lists.denx.de, Michael Walle Subject: Re: Setting MAC address from I2C EEPROM - debug / commands? (Xilinx) Date: Wed, 23 Nov 2022 14:27:30 +0100 Message-Id: <20221123132730.2083267-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <5381fce5-7227-9920-5956-4ce33e4d0070@monstr.eu> References: <5381fce5-7227-9920-5956-4ce33e4d0070@monstr.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean >> 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