Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4396780ybi; Tue, 30 Jul 2019 01:16:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4W4OSOU4j6GBPBNDbGP2+T7bdvQJy2eY+lRcReKwMBS/z9YhoDWkuFMDRSLre+WkV29tq X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr116485702pje.129.1564474609278; Tue, 30 Jul 2019 01:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564474609; cv=none; d=google.com; s=arc-20160816; b=coEYhQg88V8oGMgA/fv5ttGjQFJDfOCKeRcDwghOMtRQl5UGURZPF+053eF691Dih8 qAvHi335jS/QnlMaijLeDm0GxCZc11npT6Ve3laipo8vwPiIvuUrjxP18zihJfar3RJ7 v2JLbBmIFnzHabMY+poPj3jpIK3waJVUcVHkvUBUmVlpwS+lZXR26OZ+JGfj77UYE1/H AbMIOGuejQVDrpamCVJQwU8p+/qx3o7biAFzRXHaOW1bn6xifoikOmKRQ4aGn2u0+lxD k34RcXjyYB9kljCqkNM22UwinpJDO734P58zYCldG7cO+b65lrICy/yrTOnzCMBg4b38 MPsQ== 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=N3q7xJdwh8PFVLuqry097P3Xvdg3K97aXzT+h+VJXcs=; b=MdFbUWrwn/3ljkNs/mGbigKlrD9WoFuSPj32uq4A0YORydnO5AHPwdRIvsS+J1u23N ggtaCiCKuUeDy3KJVYKKyui5kjVkJAm284jAj2F9+BsSOZoBOgjCq7wjWSIfAcLIN8Vd 2wy3aHp116tUbFEpu6RKZ3STReKUrYjFH0NWg0ZCFqOGgkWvAZ6GaE2FxiBI49jdNmhs 4zfz6a8A1TEFfIaGEYSnq9mlUQG4+yt/Z94/U3ixHhvoAIWgdr0YqhnribovofB4yTqy 1XnRjaPSOZUgGN8D0k92afKeap01rfaFjzhJryVXcxXTqFldJKsnX6OdwKC0pw0RJ6nL Ekow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=Sxm6JuVI; 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 f18si28708915pfq.169.2019.07.30.01.16.34; Tue, 30 Jul 2019 01:16:49 -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=Sxm6JuVI; 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 S1730124AbfG2VqE (ORCPT + 99 others); Mon, 29 Jul 2019 17:46:04 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:35711 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfG2VqD (ORCPT ); Mon, 29 Jul 2019 17:46:03 -0400 Received: by mail-oi1-f193.google.com with SMTP id a127so46370739oii.2 for ; Mon, 29 Jul 2019 14:46:03 -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=N3q7xJdwh8PFVLuqry097P3Xvdg3K97aXzT+h+VJXcs=; b=Sxm6JuVIa/VBOyYU6R6afowaBbcZWBLQ8edTLaMy6eWWGnu2Do83jIjFSm89RTjzLQ WNcZYaXlNOS1PN98f4DahJMh63AQ54FoFxJyE8SGfv08OEpnF+XHgHKz1NpvWKuurj3s uRo6TgOuKm0klWbvezGd+QDPTLlLkmywlgospjfgk5xrWKas/gu25VksFkXytRpBjemG 8lEbYNCYq/Qw9xroqwUx9dGGV1OVktApy0a++h+hf9a11R2CrgkyyH7ZMRRPA+0F82m3 wepW205mRdVUF6qELog6dHXbdBJzGJFNDHBIIlBIXbow1EsTA8UFXLDw8fm2efcoMP04 7b5A== 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=N3q7xJdwh8PFVLuqry097P3Xvdg3K97aXzT+h+VJXcs=; b=qZrSJpl4JkzaFojDfIyDeUWvZqmZkhhoo0W6Qb4UDDvej4592oD8lm2BfNvj7Z9mC9 NEpqP10FzsoSdsYNtAM1AVuazirnVo/Y0xqgaBYogQL+oLsps6totQii2IT83ITkjJ41 KNZwlB6l1qmzIMHuJs5qIqQGJ6SB1b7svQsqHOEyqUtYQEoCK2avMUcPtqsUrbCGRpaF jfuS+jOTfXBcm2szfR4iofoYVhuiW6G+Bd5AkxpG3HvtQH/Ax/eC36aVf4Y1qAMb5cEM y7v2lP10BYpe/VP/bD2UQD9DSI6Z9LBEA6m3xbjmwuEy/R6EXVCwDtJFB3KahjubJogs 7U8Q== X-Gm-Message-State: APjAAAWVn2OgpqsyzL4N/sTuvRJ2zyM9LCrbiE1qXuHF3wauXMs2xXv1 9jGdYnVog9wgHis+uRpBmzAdVfN0aixBF3SbUJ4= X-Received: by 2002:a05:6808:8f0:: with SMTP id d16mr57350197oic.47.1564436762794; Mon, 29 Jul 2019 14:46:02 -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: <9814939f-8580-c8f6-5c2f-7e64db60e6ae@baylibre.com> From: Martin Blumenstingl Date: Mon, 29 Jul 2019 23:45:51 +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 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 Martin