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 D6F65C4332F for ; Wed, 23 Nov 2022 22:14:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64F0F85252; Wed, 23 Nov 2022 23:14:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=unsw.edu.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=unsw.edu.au header.i=@unsw.edu.au header.b="gFvPqPgg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 877BB8525C; Wed, 23 Nov 2022 23:14:16 +0100 (CET) Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01on20722.outbound.protection.outlook.com [IPv6:2a01:111:f403:7004::722]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 535738524C for ; Wed, 23 Nov 2022 23:14:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=unsw.edu.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=d.antliff@unsw.edu.au ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ihPDJK8cIyJ10fPBxaXJkENYVstWb0bDoLGXCBoZLwNJtwxti290crztqpkENc1TQ7rzTQrPZAMWMdOSqior4kM3ahyFrroWD+vtjo260GJ/LBgRwoWZqmCbpuLVY8SjuWQubpOgkzeyKFhXwi09G0+j9Qh3kRfscgohe1nvy5cQSJlivKGN11lzvZEgqwo5cJXmfcfFbeXMrFq9+9qggnGAZ7lL8iZDRaI07rR9vWQrr2CSJqU8T/WZhvd7rx1jOYklI/r1i3+lzN+Dm6agAoFuzlVz7vgVRS/mR8SIw2FQiRPBtupbTq5LsC4DBz+l/BxBgWPhqN2WG0y9KoHQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F/Pw1p5RoMJDeMCF18hMrXSa+BJzhrzGIBXkBFis9RM=; b=AVGC9BBoha/7nCX0c6Ub1r5P31DwZTTVkbtz9wVqZcwcFPMCSR4+t+nj74q4UUom63UkoUHApXrcGvnk7I7GIQz+qQtqgtPys0Wx2u/6h+XF8KAONJoJdHTkR0yOBXJNUBhXHemsFXf9KS2V1rx7qNjnQ+ttBKX5pIGsU2THP1NOahV5Lgza2G5Wmnw0IArgqZqrjBW+7TH0Th0+bed+nISMmujYV66OTVwtrka/nPtkADZ2QwETBytIUQ50Ewwij0ssY+5a/aCLPmFnry4N2olj4rGdcQQ0qgUWh7YO0Pk4QYd3uEL4JbNfv1HCiZh4ev2HwHNyN+cKSmCW2z3Guw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=unsw.edu.au; dmarc=pass action=none header.from=unsw.edu.au; dkim=pass header.d=unsw.edu.au; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unsw.edu.au; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F/Pw1p5RoMJDeMCF18hMrXSa+BJzhrzGIBXkBFis9RM=; b=gFvPqPgg7swuKyF4NQFhu7iK9qMPMH2zhXfj6L+uT9FUKGgeSsZswqeV2+nwDOWC71PXWOdLROe703bmLdNUui7fmdKMEaXsdVu3we4hbozJ1Mxhsr5et4/JwMHUS/gdoxywi2lyhgP7QzZqICRCsgO02hBSj3XO1ySDrpvBwb0= Received: from SY4PR01MB6797.ausprd01.prod.outlook.com (2603:10c6:10:136::13) by SYBPR01MB6221.ausprd01.prod.outlook.com (2603:10c6:10:103::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Wed, 23 Nov 2022 22:14:07 +0000 Received: from SY4PR01MB6797.ausprd01.prod.outlook.com ([fe80::95a7:a539:800b:1c18]) by SY4PR01MB6797.ausprd01.prod.outlook.com ([fe80::95a7:a539:800b:1c18%8]) with mapi id 15.20.5857.018; Wed, 23 Nov 2022 22:14:07 +0000 From: David Antliff To: Michal Simek , "u-boot@lists.denx.de" Subject: Re: Setting MAC address from I2C EEPROM - debug / commands? (Xilinx) Thread-Topic: Setting MAC address from I2C EEPROM - debug / commands? (Xilinx) Thread-Index: AQHY/tWe8sM51023SUG9YFE8iUUXcK5L1byAgABcg4CAAN002g== Date: Wed, 23 Nov 2022 22:14:07 +0000 Message-ID: References: <7b864725-2ed2-29b8-b5fd-9233434b8c80@gmail.com> <5381fce5-7227-9920-5956-4ce33e4d0070@monstr.eu> In-Reply-To: <5381fce5-7227-9920-5956-4ce33e4d0070@monstr.eu> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=unsw.edu.au; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SY4PR01MB6797:EE_|SYBPR01MB6221:EE_ x-ms-office365-filtering-correlation-id: a9fc7085-fc8e-4a53-8640-08dacda00a47 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RZt/oYssUqgNkNpPJNqq3zaLD2MSOHKGC62jHgIxcEVLFgiDX2dvqO8gSE6+IasL66dx/ie2/kI91vutKybSFGRL0VVb2edsIP1RYpZkHu02RmE6YjD8KU3bV5F1DM/JqjjMfZhWbeOdl0tsZDy0lu9QcH53Hx0a0y6FxrD1eheyau3bjASR6fyjtHNn/o9pONtcKKbffjrSwxu2bvfzJcDdsdqbTL9wGXimiLaX2v852zEUvm31Eaf6V5SZf5xwri08Hq8vgaRMZ2UGqMvRhiiRp/CjgE1L0r6E67zjVp77IFghTGcU0GBplKISPjckvVmJ+LJpl9TGWfM2tx3ZDR1ofc8o4KTWi68VzrmUwzF1BY+/2Oy5l841C/rRNn78ymaE440f5+sYTrITIFLV2rX7WcGOroP8xpfhu89hEfNAPXzN5ng0qYKrUSOfow13HC8+/eeTDyUzY+WreTSO0fZq7Fia1HEXMQM3xifEdJB4FMYm2zWa08FWiCnaW+5eGdvutSTRz+/zHVAvJBdOAPTge5py3PAjI5q02Ym9cxxXMI7aZk+KOAhclaCkHuTCmg1T1lIosYljt3sJGEExQUFVHWMXkOMIQsGFKtAOZts246CeFjohiuWR4JMPhXbrWyLR2K8lYT4v3hF1bqOj+j5E8jecmMXJXVgbSCMv0EndAnIyGevpqt5zxn4zMYpUJQ9udj5yOPXwvCe4cg6IZdzgWXYqJzcNVJ6Hcg6dQ48= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SY4PR01MB6797.ausprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(451199015)(2906002)(71200400001)(83380400001)(38070700005)(9686003)(26005)(41300700001)(76116006)(8676002)(64756008)(66446008)(66946007)(55016003)(66556008)(66476007)(33656002)(53546011)(6506007)(7696005)(5660300002)(8936002)(316002)(786003)(86362001)(41320700001)(52536014)(186003)(110136005)(478600001)(122000001)(38100700002)(473944003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?ZiuUES/trD749AJYxmCmydnhM5TjdYyMfc6QpTsL24uPqHRtdGHxxuPJTD?= =?iso-8859-1?Q?NFv2Mjph5V3FeUzsDfSokPYhisvTX1KoOuP47M5hm7SlrTznsD1vTWlGra?= =?iso-8859-1?Q?GxwYtiqLyAuSTQqLyYpo35juUOq+1hcWigcSFdHFqpFWNMGQ8WSseZ5Fx2?= =?iso-8859-1?Q?iyQwClkN/USOJj6E30aDQigcrcCPW45hSPEnxFU0zP/ABB6aGlAgzUAkFD?= =?iso-8859-1?Q?yNJmecTSQSwyZ5wipZhP+XHyLa7A/ztxi41WzvyerZaEl1frWgk5yRbgCd?= =?iso-8859-1?Q?OFX79qoVzBGpgKa4suWaKXIv7bd5kud0STLaTM+cxgT9g5tLMe6AfH8Lz5?= =?iso-8859-1?Q?meqPpK4yG3dXQCQmggOGCk3P0CTE2frP+JOGFFlGM4bNjqljXUlUFvYxeR?= =?iso-8859-1?Q?aatnJy5D+eojhFG/TPiYSSt5xKzNkRLpHDoo5nCYsZ3QHHj5+LQ1zacwm4?= =?iso-8859-1?Q?FftfNIwDcMbG9S+sG0Ig10d463aUt1C5LplqO66f7kQIocWsRHSnZEFtHU?= =?iso-8859-1?Q?CGtbZMqxYhEtWxndvhDrkeziRJ1n5wcGMXV9V+Il9Y4tE+lhRcssw1PgG/?= =?iso-8859-1?Q?FLrrhrZ1w9x9QTHWVKf0/fxG05yHTb9oVJSkN4KW08iwXQgrzEo5ihTAu1?= =?iso-8859-1?Q?KoeGVw4gDoIv4ET+WW8pDNZ2mVM50d9c4ihahTf5U6dYKV7fCkHu0tXFil?= =?iso-8859-1?Q?RfTW62/0RQmAaeANjO9gxuMapZSVD2NlOJ89sSGAVQ8z8Qjv8AM2ZuyhEg?= =?iso-8859-1?Q?9Nig2chqgEMt5eqeszOvrOeV/qSaKjQC6DR9PZ5pxSjfRDPf2iNXhaJ9bO?= =?iso-8859-1?Q?XDtosp059HKkGUT+tFihsW21O/iJzh6d+LVujT+L28cbjioxbTlgjqxTxm?= =?iso-8859-1?Q?NtMgEstcvIVPdCBmG2MfYa5tgwfepj1ELLMEuo/0MLm3JyErMypK78AeI1?= =?iso-8859-1?Q?4WiDBUehE3zM7f9WcFg7TY5FD/x19rtYFF69DA9D7RW5Qw7XhlpcIofr+7?= =?iso-8859-1?Q?PHEvNribltAwD0tdrUbnxItict/gdDHrIC38BRl4s6CcC04nqrsRo3QdfD?= =?iso-8859-1?Q?zGJ6vbHhoymp4usjKRA7tgtWJeYCc1EQykAITnL+g+zRkD8IDVC+yHw87v?= =?iso-8859-1?Q?n7MCdBojdn3DVNg1hamciLju2Njvdd/RP40Xrsj3hSTseVq5EL2mUWBdHd?= =?iso-8859-1?Q?ok+0xgNm4YQMFA88+2nCwALECFecur3BeFYuDO5LYJV7HBN8DOxV44Bmfd?= =?iso-8859-1?Q?g7tehOpkRRDPQ62sEVpBSpTbZ1TSOHCVbDKf7LSZ0ZLqotxThNo03qt9kM?= =?iso-8859-1?Q?cdMHwr34m11P051UrY60m7nPh0kVG2xGGIDN6Q6mDmVLsc2F4q/+aNG2y1?= =?iso-8859-1?Q?NWi8T8xUqPtLn2GDqa7Rd8O37tadNWFdmbXahWirktzImPyjT1p9ctNwdO?= =?iso-8859-1?Q?4dzXA/Qc/Eb4DYZ0HgLbq9ZMSUxc9nITcCI7yq1SZXKqrOoUT7kQAgZzoe?= =?iso-8859-1?Q?EkBJPp1e7frTNjsoyJZd2EPHsROZlLSuazfVjvvBamyr5p0Fgt6rMisTF5?= =?iso-8859-1?Q?g5S4A7HK2X7L461szn/NdTH7VRgxqf5r7Q/gYug0FnGFLnYVxL/5ebVpvY?= =?iso-8859-1?Q?S9jMaxIga9JFgELIiEwuYiP0lq8EGIZaYa?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: unsw.edu.au X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SY4PR01MB6797.ausprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9fc7085-fc8e-4a53-8640-08dacda00a47 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2022 22:14:07.7111 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3ff6cfa4-e715-48db-b8e1-0867b9f9fba3 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1ZYWhKO/5h4BFqJqkqfrhJDBirwEsdul1N8+4OcZYh++RC5IuYFnFJSEChJiGIDYdbqH+zTnRNeRrV/BmWrGNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYBPR01MB6221 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 Hi Michal,=0A= =0A= On 23 Nov 2022, Michal Simek wrote:=0A= >> On 11/23/22 04:14, Sean Anderson wrote:=0A= >>> On 11/22/22 20:23, David Antliff wrote:=0A= >>> Hi,=0A= >>>=0A= >>> I'm looking to extract the board's MAC address from serial I2C EEPROM a= t boot=0A= >>> time, so=0A= >>> I'm trying to work out how I can tell if U-Boot is actually able to=0A= >>> communicate with this=0A= >>> EEPROM, outside of manual i2c commands.=0A= >>>=0A= >>> I have set CONFIG_ZYNQ_MAC_IN_EEPROM and CONFIG_ZYNQ_MAC_IN_EEPROM=0A= >>> however I'm not completely sure that this is working with UltraScale+ Z= ynq MPSoC=0A= >>> boards - I'm using a ZCU208. There's no log message on the U-Boot conso= le to say=0A= >>> that there was an attempt to read the MAC address, and with ethaddr uns= et, this=0A= >>> variable is set by U-Boot to the value taken from the device tree rathe= r than=0A= >>> EEPROM:=0A= >=0A= > That was the old way how to this was achieve and based on DTS in the main= line it=0A= > is not used on any existing board because none defined xlnx,eeprom proper= ty.=0A= > =0A= > I just sent the patch to remove also Kconfig entries which we forget to c= lean up.=0A= >=0A= > But the way how it is working now is that eeprom is referenced by nvmem a= lias.=0A= > You can find conversion here=0A= > 531abcb71e60 ("xilinx: Convert xlnx,eeprom property to nvmem alias")=0A= >=0A= > Then you have nvmem link to eeprom which can be used.=0A= > =0A= > In board_init() you can see calling xilinx_read_eeprom() which reads this= link.=0A= >=0A= > This structure was added for FRU format decoding also with supporting leg= acy=0A= > format used on zcu1xx boards.=0A= >=0A= > IIRC zcu208 is not using legacy format used on zcu1xx boards=0A= > xilinx_read_eeprom_legacy() and there is one more legacy format which is = not=0A= > currently supported by this code.=0A= > But it shouldn't be that complicated to add support for it because it is = pretty=0A= > much just different layout.=0A= >=0A= >That's why I am suggesting you to create that nvmem0 link and take a look = at=0A= > that format to support.=0A= >=0A= > Then mac address is saved to environment variables and used by ethernet d= river.=0A= =0A= Thank you for your advice - if I were using a newer version of U-Boot I wou= ld certainly=0A= look into this. Please see my reply to Sean for what I ended up doing, whic= h is obviously=0A= prior to any nvmem-cells support, and uses the old Kconfig options and xlnx= ,eeprom.=0A= =0A= I'm using PetaLinux 2021.2, but I note that in the 2022.1 changelog there i= s this:=0A= =0A= U-Boot: Added support for reading MAC address from multi-record FRU dat= a in EEPROM=0A= =0A= Unfortunately until I have a chance to update my version of PetaLinux, I am= unable=0A= to test or contribute to the head of U-Boot. Thank you for your help though= . This all adds=0A= context to what I'm doing, and makes me think I really should figure out ho= w to update to a=0A= newer version of U-Boot sooner rather than later.=0A= =0A= -- David.=0A= =0A=