Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3114355ybh; Mon, 5 Aug 2019 12:17:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDVFacv1Oyo7KQbJj8BayUvvCkD4rXRUpENYaRP8LqDBMA/lhVFxLMLuPAf+yJ4JbfC7Zm X-Received: by 2002:a17:902:b905:: with SMTP id bf5mr135935468plb.342.1565032666743; Mon, 05 Aug 2019 12:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565032666; cv=none; d=google.com; s=arc-20160816; b=xurGCnoPM+6MSiG4gG5NcQBFvTJ+9S9Kot6ONbhF6ux5l82mX5HcZvUReOIGU3vhYb qAfunojqF7KJV3SgthYWFAHhyBEDV2+46NgMdi1/6klsePMyDGekEPMaTGC5PJfmOiuE XuxZt/p0RUDy8arPaF7iYJ4CGs3ooYlAthfaMTPacEVNgJ9WDWEBPlO7emczgXN1W2zN fQANyr77WlXuPNHGZnuI/Avp71T6C9nSUaP7dnaOIp1SXMdJW/lyjbhhgZSXulgfXbzz 5keogKZWR0pWju4vxhHmyxx8WkHBEOHfUxMUz/DmeoyhFP/ysDCNPOoQYxKDzJalg/Ar gZ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SB9PCM35FSWuVi9z7hK4WLl0EufG465Q6bcQ2wNo7bY=; b=llyGeUos9VzyzrT+dW4VDlRYMtQG8ak4i5tia3yFV/Ri1aFBiMkxTFYfuoR4wcqX0m 2vCWzY96lCkzAgLdWIg0i8Uc6wL9VZI5krMmfRY+lRGKcsRBzAZoHPZ9Z2J7msIRuKzF uwwNJhtHVmFQykouQNOjm5xFFaPQQaOHl5igxV8Zu1h6cbgNerswd1/+Nrukb/zxIg8e 5f+5OoZGtRGU8nTSsYD5ClGbYcpl0S3avkdwSE40ugLZIxTE54D1ixZ+S1LK2LJIYiA1 L7mqvkmctLtSoMm9k5Jq9/d3rMsPNso/+fuwFm0zDPio0Dg2Vd3of7v89QSpHprSc72N oSeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="fPeG/D4H"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l184si42454293pge.286.2019.08.05.12.17.30; Mon, 05 Aug 2019 12:17:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="fPeG/D4H"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730326AbfHETQ0 (ORCPT + 99 others); Mon, 5 Aug 2019 15:16:26 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43972 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbfHETQ0 (ORCPT ); Mon, 5 Aug 2019 15:16:26 -0400 Received: by mail-oi1-f196.google.com with SMTP id w79so62980654oif.10 for ; Mon, 05 Aug 2019 12:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SB9PCM35FSWuVi9z7hK4WLl0EufG465Q6bcQ2wNo7bY=; b=fPeG/D4Hqu47BMZb3UOQ87U5iajC3QZ4ivfrPnXbDsQoUIxO0SgtXUdhkh5QfAblsp 0NXROtXwiO5QfX3dWJ5LtPE4SYREbzWPFv2HnQGbJ1WShc12rv5wtcnMFqDVeiLhcVcs Yy/BK/5cBrp1ZCVL1mQlZM5UCijWZEzZvrujG56PKPSeKUT507lxmVxNXSCNDJ2KYCvC Vw3dPfLw6HQX0X6GQz3F60VnbyousA9d0H49d0OdTgF1hv6M7SgNB+d+f6pUxPpSgi5K tGuAWJGFX67j+WG7qexUfiQc8rTs1qrcwADWRRiYXkLxTqP4Em8za0IEtQQwxzRR5+nZ z0yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SB9PCM35FSWuVi9z7hK4WLl0EufG465Q6bcQ2wNo7bY=; b=o3Pd6UXI9BnHLTHvxXqHa+ezhm5XnYviTrNA3jCgAkl5PFQt6kmhg7jYaZ+agnl/hb T0R4sWsPe/F98A6wqNKIVoFFWRhzhG3A6NiyBzS/mspGEJKgXn3mVrPPFhF366AXxq9w xlRJSFyWAqX7KHV+Ev+XDQ6/Me3FTqHHFRR/Jqbv8W8RJmL4sx9VlTiboFVwcULZfdf2 ANiJs+coxxw+hFwq8NR+Qk2kcrGeO090t5WaVHejdJrQeekPbKxxdW2x1mzYtUzRTbfY NQZWs2ka92vJ513JkJl/mmeZwf0qiJ7KC1xTUTqp1oMOFkPEe44faNErUX78hhqlHvaq Oyzg== X-Gm-Message-State: APjAAAWG7Gcbj9v9bV51oxzXCsP1wnVZ7dO4RaZp5w9ZywO6pZyFmJEU z07kdfv/hpEMndoJNpqWbF5QSveY/5TnI1wf0w4= X-Received: by 2002:aca:5c55:: with SMTP id q82mr12374312oib.15.1565032584908; Mon, 05 Aug 2019 12:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20190727194647.15355-1-martin.blumenstingl@googlemail.com> <20190727194647.15355-2-martin.blumenstingl@googlemail.com> <9814939f-8580-c8f6-5c2f-7e64db60e6ae@baylibre.com> In-Reply-To: From: Martin Blumenstingl Date: Mon, 5 Aug 2019 21:16:13 +0200 Message-ID: Subject: Re: [PATCH 1/2] ARM: dts: meson8b: add the nvmem cell with the board's MAC address To: Neil Armstrong , hexdump0815@googlemail.com Cc: linux-amlogic@lists.infradead.org, khilman@baylibre.com, linux.amoon@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ottuzzi@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 11:45 PM Martin Blumenstingl wrote: > > On Mon, Jul 29, 2019 at 9:11 AM Neil Armstrong wrote: > > > > Hi Martin, > > > > On 27/07/2019 21:46, Martin Blumenstingl wrote: > > > Amlogic's BSP kernel defines that all boards with a MAC address stored > > > in the eFuse have it at offset 0x1b4. It is up to the board to > > > decide whether to use this MAC address or not: > > > - Odroid-C1 uses the MAC address from the eFuse > > > - EC-100 seems to read the MAC address from eMMC > > > > > > Add the nvmem cell which describes the Ethernet MAC address. Don't > > > assign it to the Ethernet controller, because depending on the board the > > > actual MAC address may be read from somewhere else. > > > > > > Signed-off-by: Martin Blumenstingl > > > --- > > > arch/arm/boot/dts/meson8b.dtsi | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi > > > index 30fca9bb4bbe..c7de58b71d08 100644 > > > --- a/arch/arm/boot/dts/meson8b.dtsi > > > +++ b/arch/arm/boot/dts/meson8b.dtsi > > > @@ -402,6 +402,10 @@ > > > clocks = <&clkc CLKID_EFUSE>; > > > clock-names = "core"; > > > > > > + ethernet_mac_address: mac@1b4 { > > > + reg = <0x1b4 0x6>; > > > + }; > > > > Is this a fixed position for all boards ? if not, I'll suggest moving > > it to the odroid-c1 dt until you have more users. > the 0x1b4 offset is hardcoded in Amlogic's kernel sources > if some board uses another offset then the manufacturer had to patch > the kernel to make it work (like Endless did) > > +Cc hexdump0815 - can you please run the following command on your > Meson8b MXQ board: > $ hexdump -C /sys/bus/nvmem/devices/meson8b-efuse0/nvmem | grep > 000001b0 | cut -d' ' -f7,8,9,10,12,13 > > this should print the MAC address that is also used by the stock > firmware and/or printed on the board > if it is then I'm happy to provide a patch also for your MXQ board so > it also uses the correct MAC address hexdump got back to me on IRC (thank you!) with unfortunate news: the MXQ board doesn't seem to have the MAC address in the eFuse at all thus I'll go with Neil's suggestion and move this to meson8b-odroidc1.dts Martin