From mboxrd@z Thu Jan 1 00:00:00 1970 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 C623CC282DE for ; Thu, 6 Mar 2025 07:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: References:Subject:To:From:Message-Id:Date:Content-Type: Content-Transfer-Encoding:Mime-Version:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tynbRCJNvJhi67ydy0W9gjWps9spqKy6/S2sdJUz3bA=; b=WB2jdADsHPIy1FzennCDqnuSp3 vfiY8iHelokDVJFFMpNde0WCXW+lHf4MXqWF90CKU7NZgnwP4SMzoNL0/KgK0wIOFjyxzAiKMl5L+ LJGoN+8Ho4wOh/TNboEGlNp7HgLDONXdEWzPXUI1k8oMGM72o/Bamn0vM7iyDslGal5mpimfhSafD L7dUohofKlV2IekB4SSO4EGe83AZPoH83h36z0kck+Y6/BbPusHO2n13ZpQRcHgVyqEzBTPXZpP9k ZJYDeLpEWaFPRe4QbMLjMwC/tkBwFTRawb0y0FboEZcPtkChH/QAgsLbD0aDeTHU8pJeHXwOWGsiy jvp92CsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tq5st-0000000AEmN-0IUg; Thu, 06 Mar 2025 07:43:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq5rH-0000000AEbD-1Bhv; Thu, 06 Mar 2025 07:41:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:References:Subject:To:From: Cc:Message-Id:Date:Content-Type:Content-Transfer-Encoding:Mime-Version:Sender :Reply-To:Content-ID:Content-Description; bh=tynbRCJNvJhi67ydy0W9gjWps9spqKy6/S2sdJUz3bA=; b=qKVUULZe36WBiiRdZ/SQbipIHr WvDiWUadt51HMvTf+SARj9sL/pjD8LG/cB4C2DSNbyAx6JWZYK2DUCCgzLTZh/0s0xrd6AqBPge3y rEoSSyFbcKNZ68+TkVx/WlAFWLS7Gx00j4Wcj9VXvmXi/I+ZqsYK32C1M8QbHHAMBjDLXtM74+ICh zIrcrBVLrWpeD4WxTF7fk2uoqgL2i160Y1KjJqIKhrmSTQQU8a/rvikPTTU7mz8TyFYdeXpUNBcwO dwCCYeYK1LVWXbir+wSnuYjmuea28IkApO89bYCbv8VxkX6WGwpPipoaB9ZToyq+W2/Udhlv7HhWX hI41hrxw==; Received: from 0001.3ffe.de ([2a01:4f8:c0c:9d57::1] helo=mail.3ffe.de) by casper.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq5rE-0000000717x-1n1z; Thu, 06 Mar 2025 07:41:30 +0000 Received: from localhost (unknown [IPv6:2a02:810b:4320:1000:4685:ff:fe12:5967]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id A0115287; Thu, 6 Mar 2025 08:41:17 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 06 Mar 2025 08:41:17 +0100 Message-Id: From: "Michael Walle" To: , Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address X-Mailer: aerc 0.16.0 References: <20250305100134.1171124-1-manikandan.m@microchip.com> <87ikonydym.fsf@bootlin.com> <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> In-Reply-To: <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250306_074128_505475_93102E4E X-CRM114-Status: GOOD ( 11.06 ) 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: , Cc: robh@kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, vigneshr@ti.com, alexandre.belloni@bootlin.com, devicetree@vger.kernel.org, richard@nod.at, claudiu.beznea@tuxon.dev, tudor.ambarus@linaro.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Varshini.Rajendran@microchip.com, krzk+dt@kernel.org, pratyush@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, > >> From: Varshini Rajendran > >> > >> EUI identifier and the MAC Address of the Ethernet Interface is stored > >> after the SFDP table of contents starting at address 0x260 in the > >> QSPI memory. > >> Register the entire SFDP region read by the spi-nor (nor->sfdp) into t= he > >> NVMEM framework and read the MAC Address when requested using the nvme= m > >> properties in the DT by the net drivers. > >> > >> In kernel the Ethernet MAC address relied on U-Boot env variables or > >> generated a random address, which posed challenges for boards without > >> on-board EEPROMs or with multiple Ethernet ports. > >> This change ensures consistent and reliable MAC address retrieval from= QSPI, > >> benefiting boards like the sama5d29 curiosity and sam9x75 curiosity. > >=20 > > Do you mean spi-nor have a programmable area in their SFDP table? Isn't > > this supposed to be a read-only area written once in factory? > >=20 > The SST26VF064BEUI serial quad flash memory is programmed at the factory= =20 > with a globally unique address stored in the SFDP vendor > parameter table and it is permanently write-protected. Why didn't you mention that this is a vendor table in the commit message? Anyway, please write proper support in the core for parsing vendor tables and exposing them as a nvmem device if needed (and asked to do so by the driver of course). -michael From mboxrd@z Thu Jan 1 00:00:00 1970 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 13011C282D1 for ; Thu, 6 Mar 2025 07:43:17 +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:In-Reply-To:References:Subject:To:From: Cc:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nfGW7Tk8aMTItkM8fsi41kT3BA4I5/X5Y+ZDnhHC5yY=; b=CngbXgwSIHML8C aCSu/qxxJoTiI8AGT1fZdRRVMxKMOJj4/NCKgxiWTwWLkhxjnJ3Zi5aQMXXarpcuIp6+2WOjfqKFF 7fRxofHh8i2yjs5UZ9OhdpiA89mMXWcNc7nYNy2wK7xl2f5++LwXHTk6Pk+qMSXJSFBwufUYfEog8 3ZUfwI4DMj9LsmuBYYPRsluHu7JIs0fMciIdRR8VuY9zTOzByuiueELGWa+EzDY/ECAJTFs23rnVx IQ2Cn/Jh1JBYxGLUpxeIdztxfDIb0FUy9sgqRKr8sxzL3pAgy1nNgqOpR9n/yRRQP88oGPmObJl7E RJ1jdJ5ldxmKic72kDyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tq5st-0000000AEme-2uJR; Thu, 06 Mar 2025 07:43:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq5rH-0000000AEbD-1Bhv; Thu, 06 Mar 2025 07:41:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:References:Subject:To:From: Cc:Message-Id:Date:Content-Type:Content-Transfer-Encoding:Mime-Version:Sender :Reply-To:Content-ID:Content-Description; bh=tynbRCJNvJhi67ydy0W9gjWps9spqKy6/S2sdJUz3bA=; b=qKVUULZe36WBiiRdZ/SQbipIHr WvDiWUadt51HMvTf+SARj9sL/pjD8LG/cB4C2DSNbyAx6JWZYK2DUCCgzLTZh/0s0xrd6AqBPge3y rEoSSyFbcKNZ68+TkVx/WlAFWLS7Gx00j4Wcj9VXvmXi/I+ZqsYK32C1M8QbHHAMBjDLXtM74+ICh zIrcrBVLrWpeD4WxTF7fk2uoqgL2i160Y1KjJqIKhrmSTQQU8a/rvikPTTU7mz8TyFYdeXpUNBcwO dwCCYeYK1LVWXbir+wSnuYjmuea28IkApO89bYCbv8VxkX6WGwpPipoaB9ZToyq+W2/Udhlv7HhWX hI41hrxw==; Received: from 0001.3ffe.de ([2a01:4f8:c0c:9d57::1] helo=mail.3ffe.de) by casper.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq5rE-0000000717x-1n1z; Thu, 06 Mar 2025 07:41:30 +0000 Received: from localhost (unknown [IPv6:2a02:810b:4320:1000:4685:ff:fe12:5967]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id A0115287; Thu, 6 Mar 2025 08:41:17 +0100 (CET) Mime-Version: 1.0 Date: Thu, 06 Mar 2025 08:41:17 +0100 Message-Id: Cc: , , , , , , , , , , , , , , From: "Michael Walle" To: , Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address X-Mailer: aerc 0.16.0 References: <20250305100134.1171124-1-manikandan.m@microchip.com> <87ikonydym.fsf@bootlin.com> <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> In-Reply-To: <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250306_074128_505475_93102E4E X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Hi, > >> From: Varshini Rajendran > >> > >> EUI identifier and the MAC Address of the Ethernet Interface is stored > >> after the SFDP table of contents starting at address 0x260 in the > >> QSPI memory. > >> Register the entire SFDP region read by the spi-nor (nor->sfdp) into the > >> NVMEM framework and read the MAC Address when requested using the nvmem > >> properties in the DT by the net drivers. > >> > >> In kernel the Ethernet MAC address relied on U-Boot env variables or > >> generated a random address, which posed challenges for boards without > >> on-board EEPROMs or with multiple Ethernet ports. > >> This change ensures consistent and reliable MAC address retrieval from QSPI, > >> benefiting boards like the sama5d29 curiosity and sam9x75 curiosity. > > > > Do you mean spi-nor have a programmable area in their SFDP table? Isn't > > this supposed to be a read-only area written once in factory? > > > The SST26VF064BEUI serial quad flash memory is programmed at the factory > with a globally unique address stored in the SFDP vendor > parameter table and it is permanently write-protected. Why didn't you mention that this is a vendor table in the commit message? Anyway, please write proper support in the core for parsing vendor tables and exposing them as a nvmem device if needed (and asked to do so by the driver of course). -michael ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (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 EF4A21C84A5; Thu, 6 Mar 2025 07:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.201.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741246883; cv=none; b=eXW0/FqzT3oSFuzjkwWYB9bZ/8ZYQW/tNqtO9xssFiBFMHc3j5HTqz5kpmim9BI6/ObZBg4+H6HiFleyTwXteKg/r1ApxVHLg6rQmIyY8al7yUY/Ra5Wp7bL41uFl+4GUgKAPeFmyoI5v321yh/NkBxiD1VqPfu8CJ27Q6NLSjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741246883; c=relaxed/simple; bh=tynbRCJNvJhi67ydy0W9gjWps9spqKy6/S2sdJUz3bA=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:From:To:Subject: References:In-Reply-To; b=vB2Q4ibrCTlL+9vwjsYcyaILN4yPanGJai81zuGjKtQxRT2LOb5RkD8swOasD/Yjk9ysHjApdj2UvlZK+2E7I8FLmPjiD8HvXTl78539aYlDyRbFdEA+Co3ks8FRxs+EDXYYFnlijpDSxIH5M06xFqwwgkUBkYR+1R8Y5XbFKNw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=walle.cc; arc=none smtp.client-ip=159.69.201.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=walle.cc Received: from localhost (unknown [IPv6:2a02:810b:4320:1000:4685:ff:fe12:5967]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id A0115287; Thu, 6 Mar 2025 08:41:17 +0100 (CET) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 06 Mar 2025 08:41:17 +0100 Message-Id: Cc: , , , , , , , , , , , , , , From: "Michael Walle" To: , Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address X-Mailer: aerc 0.16.0 References: <20250305100134.1171124-1-manikandan.m@microchip.com> <87ikonydym.fsf@bootlin.com> <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> In-Reply-To: <84b1def7-fba7-4f29-a49b-d117efe26d26@microchip.com> Hi, > >> From: Varshini Rajendran > >> > >> EUI identifier and the MAC Address of the Ethernet Interface is stored > >> after the SFDP table of contents starting at address 0x260 in the > >> QSPI memory. > >> Register the entire SFDP region read by the spi-nor (nor->sfdp) into t= he > >> NVMEM framework and read the MAC Address when requested using the nvme= m > >> properties in the DT by the net drivers. > >> > >> In kernel the Ethernet MAC address relied on U-Boot env variables or > >> generated a random address, which posed challenges for boards without > >> on-board EEPROMs or with multiple Ethernet ports. > >> This change ensures consistent and reliable MAC address retrieval from= QSPI, > >> benefiting boards like the sama5d29 curiosity and sam9x75 curiosity. > >=20 > > Do you mean spi-nor have a programmable area in their SFDP table? Isn't > > this supposed to be a read-only area written once in factory? > >=20 > The SST26VF064BEUI serial quad flash memory is programmed at the factory= =20 > with a globally unique address stored in the SFDP vendor > parameter table and it is permanently write-protected. Why didn't you mention that this is a vendor table in the commit message? Anyway, please write proper support in the core for parsing vendor tables and exposing them as a nvmem device if needed (and asked to do so by the driver of course). -michael