From patchwork Thu Feb 1 04:25:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zev Weiss X-Patchwork-Id: 13540647 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07E52C48292 for ; Thu, 1 Feb 2024 04:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dttiwOW2mxOB0yiNX0HmxFgDznllkOecxCwZuWojxq8=; b=xzneEJSYAfpxUo +9f8PROdC3SiAlsZPcP1BStsp5bF4QUixwjVusCW/1Z+9YZl1l+OG+DtpQIVpMKzgCgWyrSHOjAvi hQcaZpHG7TiSCLs1Jqa4v36keJfxrUKH5EGg1l+4vEypVZFNQ3JQnzDw92qkI0N58D9qJGlu9fpR6 QdjAs4nfTcNJZ2EerJTyuQSU8Zrt8DcXWFlwleYwsuD4DhFDJrOXd0zATYnU5XtWNK+SzSCs3zXHf ItPK9u4nF2+SjG8AtIY2aH0YgPfvDXWboQV8yZl/it6hrieMDkDDOIrPLEe4Wma9j3L3KRixaauNM ZBWfcG7P6mOYxVW4L7fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVOeU-00000006Vso-3TVC; Thu, 01 Feb 2024 04:26:14 +0000 Received: from thorn.bewilderbeest.net ([71.19.156.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVOeT-00000006Vrj-0AYg for linux-arm-kernel@lists.infradead.org; Thu, 01 Feb 2024 04:26:14 +0000 Received: from hatter.bewilderbeest.net (unknown [IPv6:2602:61:7e5d:5300::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 60C4598F; Wed, 31 Jan 2024 20:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1706761566; bh=91lQIC5ttis5jruXSHoJGTpRH5gY1g5HotYFr9Ay6KQ=; h=From:To:Cc:Subject:Date:From; b=iFPeHygOCuHr7Kp3wqppIP4gtRLDrV4Mz4Z5BpokLensflO19IseUz6ay2/bV+XQu 9AN7IiOqjZdmpyvE2YxOaWAN52xPL8iv9rtqlkx/tCby/2Z9Mj1WIeVc8G+xHvI29S KOSP0LVqgJm3VhVZnqXVAiO6ZhQWUtl+/jYfB2Z8= From: Zev Weiss To: Joel Stanley , Andrew Jeffery , linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Cc: Zev Weiss , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dts: aspeed: asrock: Use MAC address from FRU EEPROM Date: Wed, 31 Jan 2024 20:25:54 -0800 Message-ID: <20240201042559.29795-2-zev@bewilderbeest.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_202613_106399_254B9C03 X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Like the more recently added ASRock BMC platforms, e3c246d4i and romed8hm3 also have the BMC's MAC address available in the baseboard FRU EEPROM, so let's add support for using it. Signed-off-by: Zev Weiss --- arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts | 9 +++++++++ arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts index c4b2efbfdf56..bb2e6ef609af 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-e3c246d4i.dts @@ -83,6 +83,9 @@ &mac0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; + + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; }; &i2c1 { @@ -103,6 +106,12 @@ eeprom@57 { compatible = "st,24c128", "atmel,24c128"; reg = <0x57>; pagesize = <16>; + #address-cells = <1>; + #size-cells = <1>; + + eth0_macaddress: macaddress@3f80 { + reg = <0x3f80 6>; + }; }; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts index 4554abf0c7cd..f8a1764a4424 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-romed8hm3.dts @@ -71,6 +71,9 @@ &mac0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; + + nvmem-cells = <ð0_macaddress>; + nvmem-cell-names = "mac-address"; }; &i2c0 { @@ -131,6 +134,12 @@ eeprom@50 { compatible = "st,24c128", "atmel,24c128"; reg = <0x50>; pagesize = <16>; + #address-cells = <1>; + #size-cells = <1>; + + eth0_macaddress: macaddress@3f80 { + reg = <0x3f80 6>; + }; }; };