From patchwork Fri Sep 25 07:54:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1371088 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=T2vaDNsA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4ByPMK1Wx3z9sS8 for ; Fri, 25 Sep 2020 17:54:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 27DAC82508; Fri, 25 Sep 2020 09:54:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="T2vaDNsA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CC10182517; Fri, 25 Sep 2020 09:54:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1474282503 for ; Fri, 25 Sep 2020 09:54:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68CE92084C; Fri, 25 Sep 2020 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601020467; bh=diHRBs+JsFh/Y3KZGZvEYG/zsPBD4D1l55/9tgl5AfU=; h=From:To:Cc:Subject:Date:From; b=T2vaDNsAQVVM8GcrBGqJtLbvESykFLMbhDez7IMKZYgHZbEKzfgweaGcrBcW3TIsv gBCae/r3LKkeLkMuJmLi9Ogr9GtVGNbG0a7Pt5ygzy7hphDiUoBiVSHfLctF97Rnz2 quHnLAxucJiL3GfINvTu6l2RCBOspLMZMir3oJT8= Received: by pali.im (Postfix) id C0F76E94; Fri, 25 Sep 2020 09:54:24 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Stefan Roese , Konstantin Porotchkin , Andre Heider Cc: u-boot@lists.denx.de Subject: [PATCH] arm: mvebu: Espressobin: Instructions for more MAC addresses in README.marvell Date: Fri, 25 Sep 2020 09:54:16 +0200 Message-Id: <20200925075416.16124-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Some Espressobin boards got assigned more than one MAC address. Update instructions how to correctly store and preserve all MAC addresses. Signed-off-by: Pali Rohár Reviewed-by: Andre Heider --- doc/README.marvell | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/README.marvell b/doc/README.marvell index 5416bc3035..6fc5ac8a40 100644 --- a/doc/README.marvell +++ b/doc/README.marvell @@ -27,7 +27,7 @@ Build Procedure - For the Armada-70x0/80x0 DB board use "mvebu_db_armada8k_defconfig" - For the Armada-80x0 MacchiatoBin use "make mvebu_mcbin-88f8040_defconfig" - For the Armada-3700 DB board use "make mvebu_db-88f3720_defconfig" - - For the Armada-3700 EsspressoBin use "make mvebu_espressobin-88f3720_defconfig" + - For the Armada-3700 EspressoBin use "make mvebu_espressobin-88f3720_defconfig" 5. Configure the device-tree and build the U-Boot image: @@ -62,11 +62,15 @@ Configuration update Permanent ethernet MAC address ------------------------------- Prior flashing new U-Boot version (as part of ATF image) it is suggested to backup - permanent ethernet MAC address as it is stored only in U-Boot env storage (SPI or eMMC). - Some boards like EspressoBin have MAC address printed on sticker. To print current MAC - address run: + permanent ethernet MAC addresses as they are stored only in U-Boot env storage (SPI or eMMC). + Some boards like EspressoBin have MAC addresses printed on sticker. Some boards got assigned + only one address other may also more than one. To print current MAC addresses run: # echo $ethaddr + # echo $eth1addr + # echo $eth2addr + # echo $eth3addr + # ... MAC addresses 00:51:82:11:22:00, 00:51:82:11:22:01, 00:51:82:11:22:02, 00:51:82:11:22:03 and F0:AD:4E:03:64:7F are default hardcoded values found in Marvell's and Armbian U-Boot @@ -75,13 +79,20 @@ Permanent ethernet MAC address suggested to generate new random one. After flashing new U-Boot version it is suggested to reset U-Boot env variables to default - and then set correct permanent ethernet MAC address. + and then set correct permanent ethernet MAC addresses. # env default -a # setenv ethaddr XX:XX:XX:XX:XX:XX + # setenv eth1addr XX:XX:XX:XX:XX:XX + # setenv eth2addr YY:YY:YY:YY:YY:YY + # setenv eth3addr ZZ:ZZ:ZZ:ZZ:ZZ:ZZ + # ... # saveenv - Where XX:XX:XX:XX:XX:XX is permanent ethernet MAC address. + Where value for ethaddr is required permanent ethernet MAC address and values for ethNaddr + are optional per-port MAC addresses. When optional ethNaddr variables are not defined then + they are inherited from required ethaddr variable. eth1addr contains MAC address for the + wan port, other for particular lan ports. Recent Linux kernel versions use correct permanent ethernet MAC address from U-Boot env as U-Boot will inject it into kernel's device-tree.