From patchwork Wed Apr 13 12:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Max X-Patchwork-Id: 1616733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=yuJ3+R4d; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KdhGD36cyz9sG5 for ; Wed, 13 Apr 2022 22:09:08 +1000 (AEST) 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:References:In-Reply-To: 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: List-Owner; bh=GUD9pVsKyNCZRaTZlgS8ptn94KuuXHXLXRB6D1A3TC0=; b=yuJ3+R4d380Di7 lffBTK8MxINX695hXvrju9DJL66WA4maCjLYByU/M2mFfwMaDdpz8jIWahEodRnHVW4Cg/fnpj7L6 fld8SD+Yx4kDKdHDryMhOeQFzOJPTN0SURdh+F8YrwGHsN6aFY7UCFpHg832jUM8UNDQdgp6cfVn/ 1tF2X9WIG3DQQ+DTxS1WrkHoCc+tBiRVlHZB0+UXR1RjQ3NMr6G6Yi80NbRMC0YitirZy29CKOCCM KOY5G942s0ChX6zJ23K8ewT2Z29X1kcRziUf67ebagIFn2DrEpK1yma1j/1ht/NxSzxLVDy5yDqZ6 mmm6BdwFryKF9p5siCtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nebm5-000ubg-Bh; Wed, 13 Apr 2022 12:07:05 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neblJ-000uLs-W4 for openwrt-devel@lists.openwrt.org; Wed, 13 Apr 2022 12:06:19 +0000 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B82DD1F856; Wed, 13 Apr 2022 12:06:16 +0000 (UTC) Received: from f232.suse.de (nitsch.suse.de [10.160.4.250]) by relay2.suse.de (Postfix) with ESMTP id B1532A3B82; Wed, 13 Apr 2022 12:06:16 +0000 (UTC) Received: by f232.suse.de (Postfix, from userid 312) id 43F7B6ECF; Wed, 13 Apr 2022 14:06:17 +0200 (CEST) From: Reinhard Max To: openwrt-devel@lists.openwrt.org Cc: Reinhard Max Subject: [PATCH 2/3] ramips: hlk-7621a-evb: read MAC address from flash Date: Wed, 13 Apr 2022 14:05:53 +0200 Message-Id: <20220413120554.9355-2-reinhard@m4x.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220413120554.9355-1-reinhard@m4x.de> References: <20220413120554.9355-1-reinhard@m4x.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_050618_217911_DF324E0E X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Two MAC addresses are apparently located at offsets 0xe000 and 0xe006 in the factory partition on these devices. Change the dts to use the first one. See also: https://github.com/openwrt/openwrt/pull/4046#issuecomment-1091596559 Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.29 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Two MAC addresses are apparently located at offsets 0xe000 and 0xe006 in the factory partition on these devices. Change the dts to use the first one. See also: https://github.com/openwrt/openwrt/pull/4046#issuecomment-1091596559 Signed-off-by: Reinhard Max --- .../ramips/dts/mt7621_hilink_hlk-7621a-evb.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index b96436e03d..20e99352f3 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -100,3 +100,18 @@ function = "gpio"; }; }; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +};