From patchwork Sat Jul 27 19:46:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11062667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B375613A4 for ; Sat, 27 Jul 2019 19:47:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0493289D2 for ; Sat, 27 Jul 2019 19:47:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A415728A10; Sat, 27 Jul 2019 19:47:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4FCAB289D2 for ; Sat, 27 Jul 2019 19:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UlviAQCJKL76tZNHkH0uiu58G+H229poMhtW6hHCjoc=; b=Q7/LpjptPo5RGr 90DAPtgFXtAsPruxEclyoNcGrZZWr+rozk0yoBhFZpV1VxgcRmIVDc+sflcRPDcwg5baeeNLaeNLo L9D4x7S5CnrgJrYbywXPcAGrwS9WbckamcCnrjnKZvWLsccRpVg4F+yXvKWe9Dnve4qWKuUUvOJy9 Xkp1laVfdyJ9/tK7Vvw51qi+C1zrGnrvtEwD3hCyEstRleF0Bq0UwdrDY0qgl2jiSTIwRMZoYZmRT rU6LO6V/Rq4y2tZurFa6CV5B5iziOpyeXWrU+DA7U6CEgdjBtxtw4iFVM663636grVgyeCeNa2m/O 3gELzDcYP2SPBKoznM4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hrSf9-0000TQ-M6; Sat, 27 Jul 2019 19:47:27 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hrSes-0000Dp-Kc; Sat, 27 Jul 2019 19:47:11 +0000 Received: by mail-wm1-x341.google.com with SMTP id v19so50267622wmj.5; Sat, 27 Jul 2019 12:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u4zxzrsUGYajoD9B2Tdkb88ZiEEyjMTr1V8RPdE+1UY=; b=VLfAIH5SbHDQJcWnj5H522i2JcJ07BE+Zogzg/hd67JVrtQ/SMrYJZcfbNkZ2UQn11 990VWKwTTuOrjBF318IiUVbLdDT5wu/CkI5NegXtPCqDvW7C5ZZPwIZp3QI7b0cixVNL 1DJOL0s3HhdLycXuchIAIxwKy9Izek+IjPMrTFqle86YmZuBFaj8QkzS5hMjnUeZRX4x Wzupss3SpHykXFCouwWrO6cOydH6MlRZ6HfnuB+FI8xYP/q0yoNexz5Iny0FwGoNXvs9 JLq5FFJHF0wXXz+QrWFGPfQltGm0HB6Ch7+5CvNbG7OXR+TrctVdnqJuzi226oAfXu/g 8JDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u4zxzrsUGYajoD9B2Tdkb88ZiEEyjMTr1V8RPdE+1UY=; b=OCt72lZ+p8CGQDJ2TQdul1jo5r0s6lNBGZny5pCcCMTu6w0nhuua/LvwUbZWawso1v g/bU2IaVj3u9yHqb7c/cPq/kNK+8aoIy8AVpzme+v5uuRQae2XKpdV3OUMRuskBrLuak vvrp7qNkpWAlhzEwvfsr7zHE8BE7OAbdI3c443Dby8ztsbCNprI8+JOfTpvYIPOHrhLq rLNU349tNpH9mezNlQKVF/bOJH5zb7PfWA078u2aaR+HYZvvqvU1n3m22fkiY4aQmE2X e3rsjwIxEm4vOdIJLx9t8LpLIBpJ23G9xqxwW3v/1xMnSw34XwgBIK1syfV0BepO7C7v qBjA== X-Gm-Message-State: APjAAAXTv2mLdbN7EI4hDjyk1kSphwU4vr/JBsLxiv0Mj/xOU/qW4MLw Dr7a0rM5da/XfCblGg625ZsOCDBH X-Google-Smtp-Source: APXvYqykfdQYXHJvMHLdBsllsqHbIXy+FoSsDdN0ix235Vwv3c8pZV4WMrJhL5yfUaEeSHpjmVRfvQ== X-Received: by 2002:a1c:b706:: with SMTP id h6mr88410051wmf.119.1564256828803; Sat, 27 Jul 2019 12:47:08 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133C65C00B418D0F4A25A19EC.dip0.t-ipconnect.de. [2003:f1:33c6:5c00:b418:d0f4:a25a:19ec]) by smtp.googlemail.com with ESMTPSA id c4sm44651726wrt.86.2019.07.27.12.47.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 27 Jul 2019 12:47:08 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 1/2] ARM: dts: meson8b: add the nvmem cell with the board's MAC address Date: Sat, 27 Jul 2019 21:46:46 +0200 Message-Id: <20190727194647.15355-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190727194647.15355-1-martin.blumenstingl@googlemail.com> References: <20190727194647.15355-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190727_124710_671916_6D951046 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux.amoon@gmail.com, Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ottuzzi@gmail.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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>; + }; + temperature_calib: calib@1f4 { /* only the upper two bytes are relevant */ reg = <0x1f4 0x4>; From patchwork Sat Jul 27 19:46:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11062671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B505746 for ; Sat, 27 Jul 2019 19:47:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854FE289D2 for ; Sat, 27 Jul 2019 19:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79AE528A10; Sat, 27 Jul 2019 19:47:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3622A289D2 for ; Sat, 27 Jul 2019 19:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zdRNGs5Y8SitGpFKDgd9UqzvR/EvYu5bHOAjGmlnvzw=; b=MRYv/HWB0IrFEB E6PiJquMRynvvjWo/x3igcaM4mEDIu3ZWkuz3GOKIPjQ/ROMWlkxauhlxpsVDgQWfGiH4WaVX7HK4 x12eBz7Ejr/yDd8plj2YwgnHkFcNZ3n6FC04aEdMEj03rELOCXzwheA//0agz0JDfcmZVZOK9fPKc jisW0x6XnLnp1CBX3GaZh5In8BzzhbmmEUg734GX5OBqW1/NiOhwfVo64zfIu+HcKoq1vtJQav9yg F7iOV90c1kRRqJO/e/t0kK7rUUCUldbUPsm7Qx9xb40eA0z0i51OPTAmckhAHqk0HDo7wbm3pbdHx KQBngYk4M2uaQpZeZUYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hrSfU-0000kX-LY; Sat, 27 Jul 2019 19:47:48 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hrSet-0000E2-Ke; Sat, 27 Jul 2019 19:47:12 +0000 Received: by mail-wm1-x344.google.com with SMTP id h19so40230251wme.0; Sat, 27 Jul 2019 12:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nJlEm3dspnVA1ANEmrZqrPkw4P7Y/3ZVDcm+FttuwD8=; b=jMGFetvUkouy5oaS2jC9JloqDDB4ECT5Fa59B0q8l9FZFb1TmFQeFuDB+PkR6358Hl GZOcEZ06G86uK/6zH82Gwdj8NsArIOCIX+mrwQBhjItintgYrxBW/lL7dTjOMWK26XS4 TqV5BIAhUlaj9eFliO6D+6sdMxwNl6eAb0oXuaKkUA/eQJ5DNtO1DC80LTUbEPC5AVst lkg2S+BsXMyk57FnQJaaRZ8VmvM8Fs8NJWI3jTfsOLQmyN0pJu5/8oWk+f6i3AKV23VO Lv7d5qg0GusMAKDMNUOkcVGtOIBjDpV9Di7lkH28WDLPSBn8ZyrA3lO6OfRueI1r24fG /mvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nJlEm3dspnVA1ANEmrZqrPkw4P7Y/3ZVDcm+FttuwD8=; b=Zlmf1nZt5Iez+D0mgED12y4xtDKawH6KbZXbdj9nP3Ng5DNiqVkYRyVA4K64K6zuIp ZlPE9AACL8Yag1xeZIccXw0f6nA/MNj4EmxZqoeIdeWlUuhigqcUYptKlXwbQXH2SECr IbmBgfu3B+R/iWXSrhChhNxEes1sbbpsBYX+39vxGjYJti5rgC3M0dPBBEpxQEcrUhg3 lUGr7P7toQNxG3WBK3Fr5/DCaRnsL4ws/2wA8jTa8xsKNZxLXYRQjHFUBFfjYsVZiYCP kkk5kKI+ojgdEBBoLy7qVtUb5UnGwmbdaDaSidRm7yumfwLXZcaUWjB0xJESBGNP4Jbm RMEw== X-Gm-Message-State: APjAAAWpAO+TMCpuhYRdqemQhtXeBDXHb0KaMJ9bMSAgIwx4P9LV70td vudsVNoQEs1SN+agxAkCdANP93Zz X-Google-Smtp-Source: APXvYqw957ik/KAi3QT0gjmD5rTkJZINjl7uhrK+NX+nd9KMeifyb6WC8ERCf40L6g/Rr/rocBXY7A== X-Received: by 2002:a7b:c748:: with SMTP id w8mr17514641wmk.36.1564256829821; Sat, 27 Jul 2019 12:47:09 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133C65C00B418D0F4A25A19EC.dip0.t-ipconnect.de. [2003:f1:33c6:5c00:b418:d0f4:a25a:19ec]) by smtp.googlemail.com with ESMTPSA id c4sm44651726wrt.86.2019.07.27.12.47.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 27 Jul 2019 12:47:09 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 2/2] ARM: dts: meson8b: odroidc1: use the MAC address stored in the eFuse Date: Sat, 27 Jul 2019 21:46:47 +0200 Message-Id: <20190727194647.15355-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190727194647.15355-1-martin.blumenstingl@googlemail.com> References: <20190727194647.15355-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190727_124711_673235_6B520348 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux.amoon@gmail.com, Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ottuzzi@gmail.com Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Odroid-C1 (and probably other Meson8b boards which are based on the reference designs) uses the MAC address stored in eFuse at offset 0x1b4. Assign the nvmem cell to the Ethernet controller as "mac-address" so the MAC address which is stored in the eFuse is assigned to the Ethernet controller. This means the MAC address will be consistent across reboots. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 90f66dc45115..df428a40a748 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -200,6 +200,9 @@ phy-handle = <ð_phy>; amlogic,tx-delay-ns = <4>; + nvmem-cells = <ðernet_mac_address>; + nvmem-cell-names = "mac-address"; + mdio { compatible = "snps,dwmac-mdio"; #address-cells = <1>;