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: 195151 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp204302dyc; Wed, 31 Jan 2024 20:32:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBm8j67q0Jcok0i/U07wQsKWWZ3kT/HnhcqsCEu1kVNaKe3tOCnwHlMrOnvXiiF8u56/WJ X-Received: by 2002:a50:fc0f:0:b0:55e:f4fb:66f5 with SMTP id i15-20020a50fc0f000000b0055ef4fb66f5mr2526933edr.13.1706761975834; Wed, 31 Jan 2024 20:32:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706761975; cv=pass; d=google.com; s=arc-20160816; b=dFjl3yReVXSbwKrxNLEz8ZrLX4vxf6ubpVDzoQ/QxAdB65nLa/fLOzyHWTQW5mplpp sqz/bf/VesQ2qUBNex5Jqy6Gh1RDPTj+PSnSikZdOq5MM0j/AaF7/yUSEbc3Up4QhajG W3YZ7zytekUMNm15J0yYlIhADuBK6zDgU6ZRkiAFBkPpoyCAY7OvWYU+2uKQyqrwD5jd tT7UwFOtdJdlG+jDwBrVCTm2KseO0lEy/ecup2+D98UrauhGi9N0CYrIMAvyJwmWQ/Pu hpuX3TVHQ+aefbNkPGoEnWavsA/BGkTuCEnRLhWXFV/hGdlPfYmgfTrq9azu/aFsLkrh dVog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=91lQIC5ttis5jruXSHoJGTpRH5gY1g5HotYFr9Ay6KQ=; fh=kU3pYLNJoPT7L6+DxGdxSXwjaTxv4JDOp4IQiMhoe5E=; b=tTgYfVLLMUgJJ7Th/uFAysQBGqRoHIPzVW9RsWtVPWSv3QbKlQ8t3HtIy06hzP/y90 VWW6x/xd0HkC0vtWhUeeyWqkxGi1vgj4cvYXubOUXebF5c5kRNhhykdfqYn9lQWEUfFJ bld8Uzov/Xy2QgtIPGNjnq/ozCScQ8ZzjQe5mxR+2G/9dizB3fSz6cOBbyRbB+DrLnyX iAwFCKITNTeN0sezFEyBrNr+MDRfOm8ncFzmkeLlwjG/w0hvt0dNkx2T6EZQ1WegYT9X TUbm+l13C0PKpZfU+ZV93+DkCy8bDS1kGS5Pusy47cLWaFM35fIiJZsZ2CKh4kHYsrXz 4C2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bewilderbeest.net header.s=thorn header.b=iFPeHygO; arc=pass (i=1 spf=pass spfdomain=bewilderbeest.net dkim=pass dkdomain=bewilderbeest.net dmarc=pass fromdomain=bewilderbeest.net); spf=pass (google.com: domain of linux-kernel+bounces-47619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net X-Forwarded-Encrypted: i=1; AJvYcCVT5And5lQMkuEoJ9/0Jxb8SbWqRz9+ZqjcP0e6IpJaSdOI6lHfTUm7Z6g2NVQQCXKPuaB/h2ZImhXNXJFCC7M8QWMrIg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j22-20020aa7c0d6000000b0055f14e2cc30si3327934edp.375.2024.01.31.20.32.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 20:32:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bewilderbeest.net header.s=thorn header.b=iFPeHygO; arc=pass (i=1 spf=pass spfdomain=bewilderbeest.net dkim=pass dkdomain=bewilderbeest.net dmarc=pass fromdomain=bewilderbeest.net); spf=pass (google.com: domain of linux-kernel+bounces-47619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 702811F26B9B for ; Thu, 1 Feb 2024 04:32:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C9EA3BB4F; Thu, 1 Feb 2024 04:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bewilderbeest.net header.i=@bewilderbeest.net header.b="iFPeHygO" Received: from thorn.bewilderbeest.net (thorn.bewilderbeest.net [71.19.156.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 598833BB21; Thu, 1 Feb 2024 04:32:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=71.19.156.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706761957; cv=none; b=EXL4ILac5hsEc6RC11ECxTqJeIQcLjHt8wTJQpWnVsoPUn0zZHgZdc2iz/BxFlZnt8Ds+R+Q9+ntQf7+8TPhmtsXhw3flmITfX38l1qIqbopqZDCUroq3C4yjjYGSiukm1L1ObmqAVbuKmyU7moyEIRSQgJfOpTPWPXPlNr2t+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706761957; c=relaxed/simple; bh=pda2Mn73eHui5hFlKn7PApNf/Yq+JvVcatVuU36ymJ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hcLjoNlMi7Gmy5W9d3gMAXYwU2ssEG9SXDfKejidB6oj7J1aJ2fapBt4lb0UmzeITl9YstWHGr8gIreXwUU5nLE8UhgHRPxQqOblbhjYJz/PlUmwr6GFo77kIWc6prS5PZMj8KJCEkn68S0u0Ucd33QXWbaCQYWpHIhwQytQhrg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bewilderbeest.net; spf=pass smtp.mailfrom=bewilderbeest.net; dkim=pass (1024-bit key) header.d=bewilderbeest.net header.i=@bewilderbeest.net header.b=iFPeHygO; arc=none smtp.client-ip=71.19.156.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bewilderbeest.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bewilderbeest.net 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789669645824698109 X-GMAIL-MSGID: 1789669645824698109 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>; + }; }; };