From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CD0D606A32D for ; Fri, 4 Dec 2026 02:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WbL5Wloe; dkim=pass (2048-bit key) header.d=pardini.net header.i=@pardini.net header.a=rsa-sha256 header.s=google header.b=dIIs9OCh DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=; b=WbL5Wloe/13N/c hRcxTToamI+V2aqEfEc06oS2Zs8otrhZlo2/F19X2dWcNhEjPFqYNYNVC3dgUfiA2+jNKrlSnLg3P A1ev5cC6Ajwthn6cyO3pTJhQMZV+9LKR19Keu+7lHG18UNeehoAxkqGw7GbJeqpIVydVWPKyhnk1Y Bbx2u8bpQFEMuCZHGBekRpKGMmgMEXHWKquzDzWrJbCjGWsInPr4nNuT4hPsCIhCj6BEb2lhCmBhM CLFR1GYo1Yc+ubAAPCBcoLtRTYDgb2sZdqbfGQDhPry5PWnNZ/dUJqwwIoWaUl42Ohfg+N48usDir wd2D7ThOgDxy6ETbxzfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZIsQ-0000000GP8h-2rHR; Fri, 04 Dec 2026 02:18:22 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZIsB-0000000GP6j-3EzS for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 02:18:09 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-6baa6f27904so545978a12.0 for ; Thu, 03 Dec 2026 18:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pardini.net; s=google; t=1796350686; x=1796955486; darn=lists.infradead.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rRo+bxhoPfN/3D69ZpgUhDT5DaatId3qIH16kABOoxc=; b=dIIs9OChqYgTVcSrpIopHUilMxQS6W187CuhVhmiuOrfjqF8pJcrEBc0RpKje9v3hY 5HEJBUESXD2kIW7h/+WF8N1pd1Ae8hhfH7svwoQUImlt69EA1wN+uOgqVXq6HZBWGrk1 hMi2e7s2FoZAj22VcQ72LFS2vtVbSe4mLBXXPgIIbHlcZj8ESbT+Bq2MoxC0bltY4OfA XuoEIwtPW9aj9oj35OaQQybbi0CDjz8H3hPke+BrK4aUpABdNCnE1F8PI/BzNbxe13Ym LHEm8f2aB7FrMggjXMewqxkH0IrKu9tf7ImoLmFNZcOH4UzRa0REfJ5SND9wbgX23DZy vSVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796350686; x=1796955486; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rRo+bxhoPfN/3D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kE7Vfd HG+KbfE/chq/gyJRaC82UYEdw27mbDy9PW6OyCmCbXDFLKgf4VXFZFBUsKEkOIMTGwVGuxKrxlV hsYCd9rE0UsEDyZby9g5MuJ47zHZeUZmeRqshKKbZLnFdlU7rT1oKyRm9RxEfaJUcwTylz56u7w 7vkS08iQE6SFsKAwBQO7yOfcQs0YmB6uCPvmJ6vrddQYpS7uL8qxBZ2bOBBz8nj1VnqWbQxuE1h 5He1M8BX/vp0KAjdvx+hcQKWCqSNiWTzpYa/cImncngLW9UagWhpSCXJMFtMxsToYj8b5H2T+wM 2w49Ua+cR6Mv3AzxL5dDl7 X-Received: by 2002:a05:6402:eaa:b0:6b7:221c:beb with SMTP id 4fb4d7f45d1cf-6bcbee5892fmr425271a12.0.1796350685740; Thu, 03 Dec 2026 18:18:05 -0800 (PST) Received: from ?IPV6:2a02:a466:4d7a:0:e97d:7def:c516:347a? (2a02-a466-4d7a-0-e97d-7def-c516-347a.fixed6.kpn.net. [2a02:a466:4d7a:0:e97d:7def:c516:347a]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6bcbbfa1eb9sm351968a12.12.2026.12.03.18.18.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 18:18:04 -0800 (PST) Message-ID: <7fcf8e87-fe69-469a-a116-2eede651f843@pardini.net> Date: Fri, 4 Dec 2026 03:18:02 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/5] net: Derive stable MAC addresses from a unique device ID To: Alexey Charkov , Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , Willem de Bruijn , Simon Horman Cc: Ryan Leung , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261125-rk3576-otp-cpuid-mac-v5-0-b3125c9a5fc8@flipper.net> Content-Language: en-US From: Ricardo Pardini In-Reply-To: <20261125-rk3576-otp-cpuid-mac-v5-0-b3125c9a5fc8@flipper.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_181807_857332_588A761D X-CRM114-Status: GOOD ( 18.82 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 25/11/2026 20:36, Alexey Charkov wrote: > Rockchip SoCs are shipped with a unique CPU ID in their internal OTP > memory, and Rockchip bootloaders use it to give boards which have no > dedicated storage for a MAC address a stable one anyway: they hash the CPU > ID and patch the resulting addresses into the device tree they hand over. > > Kernels started without that fixup, e.g. straight from the SPL in Falcon > mode or by any other loader which does not implement Rockchip's derivation, > fall back to random MAC addresses which change on every boot. > > Derive the addresses in of_get_mac_address() instead, as the last resort > after any stored address, from a "unique-id" NVMEM cell referenced by > the Ethernet controller, so that a Linux image can use the same stable > addresses regardless of the boot flow. > [...] Hi Alexey, I tested the whole series on v7.4-rc5 on a Seeed reComputer RK3576 Dev Kit (both GMACs, ethernet0/1; DT for the board is submitted with an upcoming v2). With U-Boot (mainline v2026.07) the fixed-up local-mac-address still wins, as intended. Without u-boot proper, it gives both GMACs exactly the addresses U-Boot would assign, and both links come up. Thus: Tested-by: Ricardo Pardini # Seeed reComputer RK3576 Dev Kit I also carried the approach over to RK3588 and RK356x, and it fits them well: - the RK3588 OTP cells move into a fixed layout without trouble, the same as your RK3576 patch; RK356x already had one - the "rockchip,cpuid" compatible goes onto the RK3588 (id@7) and RK356x (id@a) CPU ID cells as is - the GMAC "unique-id" references apply the same way. On a Mekotronics R58X-Pro (RK3588, gmac0 + gmac1) both GMACs got exactly U-Boot's addresses, and so did the single GMAC (gmac1) on a Mixtile Edge 2 (RK3568) - it also works for PCIe NICs: on a Mixtile Blade 3 (RK3588, not submitted yet), the two RTL8125B behind the PCIe switch get ethernet0/1 aliases and a "unique-id" reference each, and r8169 picks the derived addresses up through of_get_mac_address() with no driver changes. So all in all, the approach works and carries over nicely to RK356x/88. I can send the RK3588 and RK356x DT patches once this lands, unless you'd rather carry them, just let me know; they'd be: - arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK356x - arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK3588 - arm64: dts: rockchip: Move RK3588 OTP cells into a fixed layout Plus a few different instances of - arm64: dts: rockchip: Derive RTL8125 MAC addresses from OTP on Foo Thanks, Ricardo