From patchwork Wed Nov 2 14:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolaus Voss X-Patchwork-Id: 26584 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5521092wrr; Mon, 28 Nov 2022 00:52:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5lPghXD6uG7n6zQqyyr6xflW2N9lVrBVCZwgi2acSK+1uzdbAsoElQXkIXNwodq5uGk5AC X-Received: by 2002:a05:6a00:18a9:b0:572:6da6:218e with SMTP id x41-20020a056a0018a900b005726da6218emr31564747pfh.1.1669625555914; Mon, 28 Nov 2022 00:52:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669625555; cv=none; d=google.com; s=arc-20160816; b=dLzgG6kVAHhoKLJmqF1lISwicj0wC+quvtE6MluFohCjLXEuyIXzaZorfUzJ/72N/g +6pGHTakBC6laS8N8TdMp7JkE5KHeoDC96jGFCL4gTQOZVEm2G+jlcB+QKuznEGj5KF9 sS5ehs+GSknn1FP9ZtRVwwP5A3kGJha0wnHrbkpKWnRgaqMdXyCU0hslLyi2aVz4o3F6 trKfZHCgr8HfmirxEOMIltbs2H3LIf9pEp0RMhZHdTa78zf58FiZuIRqwx72cncxiulA xNZMaqDLHcq9Tx5NCEH1p/rdOjVopQ0tfyYN2gHBKGA7H9u7HyvqsAYm94uiINK+GtIl Rn9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:subject:date:cc:to:from; bh=3n1FBkr4Nf3exOC9CL/PuXcSxUJUHF0wA5NHjU3Md44=; b=Pd6ugzIC088nwDwvcypQ5NLgS8Ctptsi4LrWqgoCS2h3nmgTc8TKAX+RNWg/4nBLfo qZgJ+pbYqg0rZvTb3rtNIX6gk/aztiqyFxAab2vlIRI+O9F6PT66F9svmDk8lFaeLru5 TcH4oEZZWmfl6xKiGhn7lbBq//E2liaRFEKM7uy+Vm4nzvLV18edmopA9E+nQKdA9mII 1HqNdrONDj6lPfUDcxeoRE91tHdwse44JDpBj47oT46XGkJc3akSPkhw32Z9SuKgQM7J vhQolfsqKlOJefU6t5RB5WmRU3/2Qc7nY4zlje5WRfHYIKCVvJEGC5ckaMIeM2mRnTbl EWgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=haag-streit.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170902b08500b00188e5c9e026si10245236plr.102.2022.11.28.00.52.22; Mon, 28 Nov 2022 00:52:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=haag-streit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbiK1IsA (ORCPT + 99 others); Mon, 28 Nov 2022 03:48:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiK1Irz (ORCPT ); Mon, 28 Nov 2022 03:47:55 -0500 Received: from mail.steuer-voss.de (mail.steuer-voss.de [85.183.69.95]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B89965EB; Mon, 28 Nov 2022 00:47:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 5F10D1D73; Mon, 28 Nov 2022 09:47:49 +0100 (CET) From: Nikolaus Voss To: Srinivas Kandagatla , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Krzysztof Kozlowski , Rob Herring , nv@vosn.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Date: Wed, 2 Nov 2022 15:27:19 +0100 Subject: [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem Message-Id: <20221128084749.5F10D1D73@mail.steuer-voss.de> X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00,DATE_IN_PAST_96_XX, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750729286968849321?= X-GMAIL-MSGID: =?utf-8?q?1750729286968849321?= IMX6QDL has fuse locations specified for storing the MAC for the built-in ethernet (Table 5-8 in Reference Manual). Define the fuse location in ocotp and refer to them in fec-ethernet. If the cells are not flashed, the driver behavior is unchanged, i.e. other MAC sources will be probed and a random MAC will be used as a last resort. Signed-off-by: Nikolaus Voss --- arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 4f7fefc14d0ac..7449d554ef1aa 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1053,6 +1053,8 @@ fec: ethernet@2188000 { <&clks IMX6QDL_CLK_ENET_REF>; clock-names = "ipg", "ahb", "ptp", "enet_out"; fsl,stop-mode = <&gpr 0x34 27>; + nvmem-cells = <&fec_mac_addr>; + nvmem-cell-names = "mac-address"; status = "disabled"; }; @@ -1186,6 +1188,10 @@ tempmon_calib: calib@38 { tempmon_temp_grade: temp-grade@20 { reg = <0x20 4>; }; + + fec_mac_addr: mac-addr@88 { + reg = <0x88 6>; + }; }; tzasc@21d0000 { /* TZASC1 */