From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 591AC409121; Wed, 12 Aug 2026 10:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531830; cv=none; b=VHtBRH+AGdaO6egY2OgekOkEx9Jyu8XjuzU0lklb7ihPtEekP7aOtdww4VFt6jCXMANgv4Z7clYwdPcruklbvGO+uIlFsbEGAfhHmdcTuyHurSHqNsYYW6qW0dRpsbZcjkBhHvxKy1QM10AcC3tpivJe7bBjtSS2F/57AAIYNZM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531830; c=relaxed/simple; bh=ZbNAFzSIw3R2cm7Wm2v5oyHJUBSuXKlXSqen3A0swWY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s1fz+4NOSr8MhtQLoFWZ0kkkn+VTnTD5307DdbIa5kno7OowNyW+xLixtA50k/3lr2zzuCKwlzTOsTL1XVXPJmCrF0WLBdV1J4b6LMpYYTRSGr2breMm4MfLvXlOqeXJ5Zzmd6JatJombEkleuKxntFKH1xAD1LmROFfGjkYQE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=TrB/xxCj; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="TrB/xxCj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531830; x=1818067830; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZbNAFzSIw3R2cm7Wm2v5oyHJUBSuXKlXSqen3A0swWY=; b=TrB/xxCjeNJFLINMoUAn5LEVom0/oR6glULM56iIXTHSTfnB3+onNCMl 7Ims7iF+DjWtGPLsIW6izC56bzJLXXytl+vX2BhVh8VZClDCBRxpdE/wU 5wY/WJ/MI7g4AyLdqfokyCBZS5sfDktsQC2ojf1FmLX7yxPLEp08YRd7C pWS9ZNFT81mC7jJZIDqxqCaasY1yydl2Dp/avNN3pUzAUb+QsB0hvaV1q ICi2HiAukwbKTOwp2oC9sElQerLjZR0myexEd1timC/2dP4NJtXRBtJur p7dxuX3I0M5Tcn9vfNTzDHyEzXdzzeOeF6CwdfI2cc5ZxAGvOcCi5kT8l g==; X-CSE-ConnectionGUID: DONMir8iQPOoqeFD/87JYg== X-CSE-MsgGUID: gtfK8EHuRHatpaSlu7C0Lw== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="293389497" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 03:50:29 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.87.151) by chn-vm-ex4.mchp-main.com (10.10.87.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.45; Wed, 12 Aug 2026 03:50:27 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:50:17 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 1/7] dt-bindings: mtd: jedec,spi-nor: allow the SFDP to be exposed via NVMEM Date: Wed, 12 Aug 2026 16:19:49 +0530 Message-ID: <20260812104955.485667-2-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Add an optional "sfdp" child node (compatible "jedec,sfdp") that describes the SFDP as a read-only NVMEM provider via nvmem.yaml, so its contents (e.g. a vendor EUI-48/EUI-64) can be read through NVMEM cells. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Signed-off-by: Manikandan Muralidharan --- .../bindings/mtd/jedec,spi-nor.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Doc= umentation/devicetree/bindings/mtd/jedec,spi-nor.yaml index 587af4968255..d7e659912b4a 100644 --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml @@ -103,6 +103,22 @@ properties: spi-cpol: true spi-cpha: true =20 + sfdp: + $ref: /schemas/nvmem/nvmem.yaml# + unevaluatedProperties: false + description: + The Serial Flash Discoverable Parameters (SFDP) tables exposed as a + read-only NVMEM device. This allows standard or vendor-specific SFDP + data (for example a factory-programmed EUI-48/EUI-64 identifier) to = be + consumed through NVMEM cells. + + properties: + compatible: + const: jedec,sfdp + + required: + - compatible + dependencies: spi-cpol: [ spi-cpha ] spi-cpha: [ spi-cpol ] @@ -122,6 +138,10 @@ examples: spi-max-frequency =3D <40000000>; m25p,fast-read; reset-gpios =3D <&gpio 12 GPIO_ACTIVE_LOW>; + + sfdp { + compatible =3D "jedec,sfdp"; + }; }; }; ... --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 5FAE6422531; Wed, 12 Aug 2026 10:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531842; cv=none; b=AAI8HjcazwQPECk/Lg0Eh0z4HZstFIlBmNVFhJzMIPWiao1im+Y4S6Rv9vXPz1U1ufpbIVyFV8o/j6i34NJwapmNI2ICbq4S/oY/7Um/nBZ0vaV6Qjj/akqLiAXCfJMiejPdC63zANmxOwuL2bjnbE8JOeK/QCtRWVyTpq2/fL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531842; c=relaxed/simple; bh=9sspgSaYTLzPxx3ClMpy7dqKoUQ+jVKhLBbkq1ajX5A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nWVOwtRma0muI5hm/mPJBCf8GjDwFzqQBxU33/2/Jn/bXZWP+YxvAVXGAJ3vWm6OccOKj7nHoTiNzXjyefSzC5qTlg62jQ5lQ+1tiwbQRKSxAsdXKw3uUnFr5rZATJg/lL0jGXEWewnha5xsRBZUSfcMVP+WhxxCzpYRiJdKTZ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=PLytDoqo; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="PLytDoqo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531840; x=1818067840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9sspgSaYTLzPxx3ClMpy7dqKoUQ+jVKhLBbkq1ajX5A=; b=PLytDoqopcDwgWHsQucyUaphrhHKkKZjFmjHgG4xKdiNiZfkLH/dKUw2 JI63Tre670YdaWADb1PnXF2VO1x65mkiW7zYV5Tyz3jC25y3E6dy/4ZIV dutRMP5+uwKs8kkQdk037pKUI5Qkv3pFaNuzWyq4sIuNFtDBnB5H+ZRIw aa4Te1RB0vSUtY+TDKCbA14iKNsRZ3cYK/TB0jwG6UWwxpsU564eE0ET7 NG94maVErEXLtCsNSHFlSy8PHWlKIX7F6/y3DwfCxug+zoW4KXclyUckw ilhuQKeG6qXl/yGrGRLz66huD/UyE5ki6kuj0V/dO0WEEfEaaS2S15toM A==; X-CSE-ConnectionGUID: ePqpB5wjRsW4N7O3Nx2f3w== X-CSE-MsgGUID: Tyu2GW8+RnWs/xB7debw+w== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="62324112" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2026 03:50:39 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 12 Aug 2026 03:50:39 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:50:28 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 2/7] dt-bindings: nvmem: layouts: add Microchip/SST SFDP EUI layout Date: Wed, 12 Aug 2026 16:19:50 +0530 Message-ID: <20260812104955.485667-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Add a binding for the NVMEM layout that exposes the factory-programmed EUI-48 identifier from the Microchip/SST vendor-specific SFDP parameter table (e.g. SST26VF064BEUI) as a "mac-address" NVMEM cell, and reference it from nvmem-layout.yaml. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Signed-off-by: Manikandan Muralidharan --- .../layouts/microchip,sst26vf-sfdp-eui.yaml | 60 +++++++++++++++++++ .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + 2 files changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/microch= ip,sst26vf-sfdp-eui.yaml diff --git a/Documentation/devicetree/bindings/nvmem/layouts/microchip,sst2= 6vf-sfdp-eui.yaml b/Documentation/devicetree/bindings/nvmem/layouts/microch= ip,sst26vf-sfdp-eui.yaml new file mode 100644 index 000000000000..37357efb7840 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfd= p-eui.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/layouts/microchip,sst26vf-sfdp-eu= i.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM layout of the Microchip/SST SFDP EUI-48 identifier + +maintainers: + - Manikandan Muralidharan + +description: + Some Microchip/SST serial flashes (for example the SST26VF064BEUI) are + factory programmed with a globally unique EUI-48 identifier stored in a + vendor-specific SFDP parameter table and permanently write-protected. Th= is + layout locates that table and exposes the EUI-48 as an NVMEM cell so tha= t, + for example, a network driver can use it as a MAC address. The location = of + the data is discovered at runtime from the SFDP; no offset is encoded in= the + device tree. + +select: false + +properties: + compatible: + const: microchip,sst26vf-sfdp-eui + + mac-address: + type: object + description: + The factory-programmed EUI-48 identifier, usable as a MAC address. + additionalProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + + sfdp { + compatible =3D "jedec,sfdp"; + + nvmem-layout { + compatible =3D "microchip,sst26vf-sfdp-eui"; + + mac-address { + }; + }; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.y= aml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml index 382507060651..e63b93083821 100644 --- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml @@ -20,6 +20,7 @@ description: | oneOf: - $ref: fixed-layout.yaml - $ref: kontron,sl28-vpd.yaml + - $ref: microchip,sst26vf-sfdp-eui.yaml - $ref: onie,tlv-layout.yaml - $ref: u-boot,env.yaml =20 --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 2497930EF8F; Wed, 12 Aug 2026 10:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531853; cv=none; b=uvdag+EN/qArZttfyePSd6KoE6FjU+Sd37pZBqtdxfuAzNh7rsc7ritm+K4LG0uyjkRDhLovae7iShgzy1D73PTZXIZQqWe1hpViw9bhZjjKxgJvaFZYXRqQrsYbbEXK7YJNSkxl12TrJfI/SoBeeqcGVIOGcW7/VFWRIZDuN/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531853; c=relaxed/simple; bh=l8e7mf5CTX1bJSjWPoqQB3jl5jYEmYnVga61pAP7NGE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mbfOPF5WY045LhfbDi7WyvbImYW7oY2K47xXBqBh5zLq25LRj7R4ztLqLGODVW5Me1RO1NlY2gQNNNwUA7lyYW2UVbNUEhYN9/aLRwOf+UYowbWw+8qg4JPaT+PlcHBkc6oSTvu2CstjzkzFrz+gj0f5SoZLkdyV4FHXNXEm4gA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=a8/7E823; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="a8/7E823" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531852; x=1818067852; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l8e7mf5CTX1bJSjWPoqQB3jl5jYEmYnVga61pAP7NGE=; b=a8/7E823mC09tWuPUWdt0nWqMOtDRyTB0BzT2TNUSZtYqcHazK69lpoe CObNmEKswHZhTjP5FewTM7yekfWLA7B3kMZyUT9c5ypV+/8Nb+ZfE5Gu3 ckQlrtAsrEltxgdnyVn2kdeRF4Hjd0guZl2QCPi/Xbmsg8H6Vxv0JC8dk cS91H/wfeHQ/ieJKDqlUXkzky0jS6rvVm6H7VQFyzQh3t/ZSJ3mCL1szm Vv7K31lMqwslDWMrqB5L7904OqfHXJd8pDjaDQ1dT87kq0xp9zVnCyM1f MkT8NBWzkDaSL2nkFNLKiFdibcgUhrrCToUZV8qD2oJBdT2zTxJMPL6Fq Q==; X-CSE-ConnectionGUID: u0rlZIKHSpSTMJU3C9X76w== X-CSE-MsgGUID: Ru9W8DBtTcG7xCgIgmwuLQ== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="229147411" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2026 03:50:51 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 12 Aug 2026 03:50:50 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:50:39 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 3/7] mtd: spi-nor: sfdp: expose the SFDP as a read-only NVMEM device Date: Wed, 12 Aug 2026 16:19:51 +0530 Message-ID: <20260812104955.485667-4-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" The SPI NOR core already reads the SFDP tables during enumeration and caches them in nor->sfdp->dwords (see spi_nor_parse_sfdp()). Re-expose that cached data as a read-only NVMEM device, in on-flash byte order, rooted at the flash's SFDP child node (compatible "jedec,sfdp"). This lets NVMEM cells reference any SFDP data: a fixed-layout for parameters at a known offset, or an nvmem-layout parser for vendor data whose location must be discovered at runtime. The device is only registered when an "sfdp" node is present in the device tree. Signed-off-by: Manikandan Muralidharan --- drivers/mtd/spi-nor/core.c | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index ccf4396cdcd0..0425af6e898f 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -3001,6 +3002,75 @@ static void spi_nor_init_fixup_flags(struct spi_nor = *nor) nor->flags |=3D SNOR_F_IO_MODE_EN_VOLATILE; } =20 +static int spi_nor_sfdp_reg_read(void *priv, unsigned int offset, + void *val, size_t bytes) +{ + struct spi_nor *nor =3D priv; + struct sfdp *sfdp =3D nor->sfdp; + size_t sfdp_size =3D sfdp->num_dwords * sizeof(*sfdp->dwords); + + if (offset >=3D sfdp_size || bytes > sfdp_size - offset) + return -EINVAL; + + /* The cached SFDP is kept in on-flash (little-endian) byte order. */ + memcpy(val, (u8 *)sfdp->dwords + offset, bytes); + + return 0; +} + +/** + * spi_nor_register_sfdp_nvmem() - expose the SFDP as a read-only NVMEM de= vice + * @nor: pointer to a 'struct spi_nor' + * + * Expose the whole SFDP, in on-flash byte order, as a read-only NVMEM dev= ice + * rooted at the flash's SFDP child node (compatible "jedec,sfdp"). This l= ets + * generic (fixed-layout) or vendor (nvmem-layout) cells reference any SFDP + * data. The device is only registered when a child node with the "jedec,s= fdp" + * compatible is described in the device tree. + * + * Return: 0 on success or if there is nothing to do, -errno otherwise. + */ +static int spi_nor_register_sfdp_nvmem(struct spi_nor *nor) +{ + struct device *dev =3D nor->dev; + struct nvmem_config config =3D { }; + struct nvmem_device *nvmem; + struct device_node *np; + + if (!nor->sfdp) + return 0; + + np =3D of_get_compatible_child(dev_of_node(dev), "jedec,sfdp"); + if (!np) + return 0; + + config.dev =3D dev; + config.of_node =3D np; + config.name =3D "sfdp"; + config.id =3D NVMEM_DEVID_AUTO; + config.owner =3D THIS_MODULE; + config.read_only =3D true; + config.word_size =3D 1; + config.stride =3D 1; + config.size =3D (int)(nor->sfdp->num_dwords * sizeof(*nor->sfdp->dwords)); + config.reg_read =3D spi_nor_sfdp_reg_read; + config.priv =3D nor; + + nvmem =3D devm_nvmem_register(dev, &config); + of_node_put(np); + if (IS_ERR(nvmem)) { + /* NVMEM support is optional. */ + if (PTR_ERR(nvmem) =3D=3D -EOPNOTSUPP) + return 0; + return dev_err_probe(dev, PTR_ERR(nvmem), + "failed to register SFDP NVMEM device\n"); + } + + dev_dbg(dev, "exposed %d-byte SFDP as an NVMEM device\n", config.size); + + return 0; +} + /** * spi_nor_late_init_params() - Late initialization of default flash param= eters. * @nor: pointer to a 'struct spi_nor' @@ -3204,6 +3274,14 @@ static int spi_nor_init_params(struct spi_nor *nor) spi_nor_init_params_deprecated(nor); } =20 + /* + * Expose the SFDP table as an NVMEM device only when + * the flash actually provides one + */ + ret =3D spi_nor_register_sfdp_nvmem(nor); + if (ret) + return ret; + ret =3D spi_nor_late_init_params(nor); if (ret) return ret; --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 F2CE242883B; Wed, 12 Aug 2026 10:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531865; cv=none; b=bOibe9p0TW9VX7TXl933WvLji9AceIsGAmKf31PJbdtjj51vbJm+RMi7KlBzzGMDt3A50akqQI8iHHuNEk0l/baRV6x8HLYdH0U0pUQ4EbmK3RKHnVQgZ9XEaOFVGFoBnUC3xgqiOz9BJtrS0o0oFQYPpRo1xFR5w+BVPH+PODE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531865; c=relaxed/simple; bh=30kJWTW3L7X9FlTOpyXHmfQV2ZJ7dUun8mJpq/L4+VM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HyPF7lnwUel3TqYK0YOcyiPE3t+s4KpBRlXmIbzz5EIUanVDFT1B0nCtdUOhLuFkteOCPxEpnrigED/mO+Pe9dOZulexV3cohNubRZqp6gFuL3+MwGMNY3Z75exESkPmCF+hxJ+vJQhQnVFCm0+BwIyDa/QzMqGHhKSljrvzQzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=ZjfsY5H+; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="ZjfsY5H+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531864; x=1818067864; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=30kJWTW3L7X9FlTOpyXHmfQV2ZJ7dUun8mJpq/L4+VM=; b=ZjfsY5H+kFBwn63FbmxNKFeXWz1gYWPnLnMicr80wlzojyDkK9xwaUbv PO5QOYqIELx8A69H+1brnR7ZpsMZblOOVova45MxZ4NsZMrIu093Nfi8j C0a2uLwAGqaShyxcIS72Dd6//w9G5/AoH6nTHv7H6m8d1UYpZ1oLr2wyP g4+PvUOtA1RZt2uL4WbIu1vJ9HFNhZAcFFdQOzX5umtlH4/CoBHnC1VEy cCN1KP2+UsPH4ldCdzc+fUPrUfArYLCClQwA76pi5cpfwLFvxIC8rc1U7 JTeFmrLKmCIyREcFsQXP1xLS6n+J6OYoAE56EwGPkzfC7uaebUah9xCfq w==; X-CSE-ConnectionGUID: T6xG7j+wQ4eL23rLSQZQNA== X-CSE-MsgGUID: 23bYlRNPSQWn0XG49lQ0tA== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="62324128" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2026 03:51:02 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 12 Aug 2026 03:51:02 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:50:51 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 4/7] nvmem: layouts: add Microchip/SST SFDP EUI layout driver Date: Wed, 12 Aug 2026 16:19:52 +0530 Message-ID: <20260812104955.485667-5-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Add an NVMEM layout that exposes the factory-programmed EUI-48 identifier from the Microchip/SST vendor SFDP parameter table (e.g. SST26VF064BEUI) as a "mac-address" cell, for use as a network MAC address. The vendor table is located at runtime via the SFDP NVMEM device (no offset in DT), and a read_post_process callback reverses the LSB-first bytes into canonical MAC order. Binds to an "nvmem-layout" node with compatible "microchip,sst26vf-sfdp-eui". Signed-off-by: Manikandan Muralidharan --- MAINTAINERS | 6 + drivers/nvmem/layouts/Kconfig | 10 ++ drivers/nvmem/layouts/Makefile | 1 + drivers/nvmem/layouts/sst26vf-sfdp-eui.c | 182 +++++++++++++++++++++++ 4 files changed, 199 insertions(+) create mode 100644 drivers/nvmem/layouts/sst26vf-sfdp-eui.c diff --git a/MAINTAINERS b/MAINTAINERS index 8014b9f8253e..c0eb6c16e2c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17813,6 +17813,12 @@ F: Documentation/devicetree/bindings/sound/atmel,a= t91-ssc.yaml F: drivers/misc/atmel-ssc.c F: include/linux/atmel-ssc.h =20 +MICROCHIP SST SFDP EUI NVMEM LAYOUT DRIVER +M: Manikandan Muralidharan +S: Maintained +F: Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfdp-= eui.yaml +F: drivers/nvmem/layouts/sst26vf-sfdp-eui.c + Microchip Timer Counter Block (TCB) Capture Driver M: Kamel Bouhara L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) diff --git a/drivers/nvmem/layouts/Kconfig b/drivers/nvmem/layouts/Kconfig index 5e586dfebe47..855c7db530da 100644 --- a/drivers/nvmem/layouts/Kconfig +++ b/drivers/nvmem/layouts/Kconfig @@ -26,6 +26,16 @@ config NVMEM_LAYOUT_ONIE_TLV =20 If unsure, say N. =20 +config NVMEM_LAYOUT_SST26VF_SFDP_EUI + tristate "Microchip/SST SFDP EUI-48 layout support" + help + Say Y here if you want to expose the factory-programmed EUI-48 + identifier stored in the Microchip/SST vendor-specific SFDP parameter + table (e.g. SST26VF064BEUI) as NVMEM cells, so that network drivers + can use them as a MAC address. + + If unsure, say N. + config NVMEM_LAYOUT_U_BOOT_ENV tristate "U-Boot environment variables layout" select CRC32 diff --git a/drivers/nvmem/layouts/Makefile b/drivers/nvmem/layouts/Makefile index dd6c6c70b1a9..ab4e996075b2 100644 --- a/drivers/nvmem/layouts/Makefile +++ b/drivers/nvmem/layouts/Makefile @@ -6,4 +6,5 @@ obj-$(CONFIG_NVMEM_LAYOUTS) +=3D fixed-layout.o obj-$(CONFIG_NVMEM_LAYOUT_SL28_VPD) +=3D sl28vpd.o obj-$(CONFIG_NVMEM_LAYOUT_ONIE_TLV) +=3D onie-tlv.o +obj-$(CONFIG_NVMEM_LAYOUT_SST26VF_SFDP_EUI) +=3D sst26vf-sfdp-eui.o obj-$(CONFIG_NVMEM_LAYOUT_U_BOOT_ENV) +=3D u-boot-env.o diff --git a/drivers/nvmem/layouts/sst26vf-sfdp-eui.c b/drivers/nvmem/layou= ts/sst26vf-sfdp-eui.c new file mode 100644 index 000000000000..641318d6f0af --- /dev/null +++ b/drivers/nvmem/layouts/sst26vf-sfdp-eui.c @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * NVMEM layout for the factory-programmed EUI-48 identifier stored in the + * Microchip/SST vendor-specific SFDP parameter table (e.g. SST26VF064BEUI= ). + * + * The whole SFDP is exposed as a read-only NVMEM device by the SPI NOR co= re. + * This layout locates the Microchip vendor parameter table at runtime and + * registers the EUI-48 address as an NVMEM cell, so that a network driver= can + * consume it as a MAC address. No offset is hardcoded in the device tree. + * + * Copyright (C) 2026 Microchip Technology Inc. and its subsidiaries + * + * Author: Manikandan Muralidharan + */ + +#include +#include +#include +#include +#include +#include +#include + +/* SFDP header and parameter header, as laid out on the flash. */ +struct sfdp_header { + u8 signature[4]; + u8 minor; + u8 major; + u8 nph; + u8 unused; +}; + +struct sfdp_parameter_header { + u8 id_lsb; + u8 minor; + u8 major; + u8 length; + u8 parameter_table_pointer[3]; + u8 id_msb; +}; + +#define SFDP_SIGNATURE 0x50444653U + +#define SFDP_PARAM_HEADER_ID(h) (((h)->id_msb << 8) | (h)->id_lsb) +#define SFDP_PARAM_HEADER_PTP(h) get_unaligned_le24((h)->parameter_table_p= ointer) + +/* Microchip (vendor) parameter table identifier: id_msb << 8 | id_lsb. */ +#define SFDP_MCHP_VENDOR_ID 0x01bf + +#define SFDP_MCHP_EUI48_MARKER_OFFSET 0x60 +#define SFDP_MCHP_EUI48_MARKER 0x30 +#define SFDP_MCHP_EUI48_OFFSET 0x61 + +static int sfdp_eui_read_post_process(void *priv, const char *id, int inde= x, + unsigned int offset, void *buf, + size_t bytes) +{ + u8 *data =3D buf; + int i; + + /* SFDP stores the address least-significant octet first; reverse it. */ + for (i =3D 0; i < bytes / 2; i++) + swap(data[i], data[bytes - 1 - i]); + + if (bytes =3D=3D ETH_ALEN && !is_valid_ether_addr(buf)) + return -EINVAL; + + return 0; +} + +static int sfdp_eui_find_vendor_table(struct nvmem_device *nvmem, u32 *ptp) +{ + struct sfdp_parameter_header ph; + struct sfdp_header hdr; + int nph, i, ret; + + ret =3D nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); + if (ret < 0) + return ret; + + if (get_unaligned_le32(hdr.signature) !=3D SFDP_SIGNATURE) + return -EINVAL; + + /* The number of parameter headers (NPH) field is zero-based. */ + nph =3D hdr.nph; + + for (i =3D 0; i <=3D nph; i++) { + ret =3D nvmem_device_read(nvmem, sizeof(hdr) + i * sizeof(ph), + sizeof(ph), &ph); + if (ret < 0) + return ret; + + if (SFDP_PARAM_HEADER_ID(&ph) !=3D SFDP_MCHP_VENDOR_ID) + continue; + + *ptp =3D SFDP_PARAM_HEADER_PTP(&ph); + return 0; + } + + return -ENOENT; +} + +static int sfdp_eui_add_cells(struct nvmem_layout *layout) +{ + struct nvmem_device *nvmem =3D layout->nvmem; + struct device *dev =3D &layout->dev; + struct nvmem_cell_info info =3D { }; + struct device_node *layout_np; + u32 base =3D 0; + u8 marker; + int ret; + + ret =3D sfdp_eui_find_vendor_table(nvmem, &base); + if (ret =3D=3D -ENOENT) { + dev_dbg(dev, "no Microchip SFDP vendor table found\n"); + return 0; + } + if (ret) + return ret; + + /* The EUI-48 is present only if its marker byte is programmed. */ + ret =3D nvmem_device_read(nvmem, base + SFDP_MCHP_EUI48_MARKER_OFFSET, + 1, &marker); + if (ret < 0) + return ret; + if (marker !=3D SFDP_MCHP_EUI48_MARKER) { + dev_dbg(dev, "EUI-48 not programmed (marker 0x%02x)\n", marker); + return 0; + } + + layout_np =3D of_nvmem_layout_get_container(nvmem); + if (!layout_np) + return -ENOENT; + + info.name =3D "mac-address"; + info.offset =3D base + SFDP_MCHP_EUI48_OFFSET; + info.bytes =3D ETH_ALEN; + info.np =3D of_get_child_by_name(layout_np, "mac-address"); + info.read_post_process =3D sfdp_eui_read_post_process; + + ret =3D nvmem_add_one_cell(nvmem, &info); + if (ret) + of_node_put(info.np); + else + dev_dbg(dev, "exposed EUI-48 at SFDP offset 0x%x\n", info.offset); + + of_node_put(layout_np); + + return ret; +} + +static int sfdp_eui_probe(struct nvmem_layout *layout) +{ + layout->add_cells =3D sfdp_eui_add_cells; + + return nvmem_layout_register(layout); +} + +static void sfdp_eui_remove(struct nvmem_layout *layout) +{ + nvmem_layout_unregister(layout); +} + +static const struct of_device_id sfdp_eui_of_match_table[] =3D { + { .compatible =3D "microchip,sst26vf-sfdp-eui" }, + {} +}; +MODULE_DEVICE_TABLE(of, sfdp_eui_of_match_table); + +static struct nvmem_layout_driver sfdp_eui_layout =3D { + .driver =3D { + .name =3D "microchip-sst26vf-sfdp-eui-layout", + .of_match_table =3D sfdp_eui_of_match_table, + }, + .probe =3D sfdp_eui_probe, + .remove =3D sfdp_eui_remove, +}; +module_nvmem_layout_driver(sfdp_eui_layout); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Manikandan Muralidharan "); +MODULE_DESCRIPTION("NVMEM layout for the EUI-48 in the Microchip/SST SFDP = vendor table"); --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 279B441CB26; Wed, 12 Aug 2026 10:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531876; cv=none; b=uB+c42lHyc1URNbKELlQx0tlvMkAZA2M0eDVJARvOSiN0EpDxIEPwUJ/GF3k8zuqHSjasF8BRYgIm1utyOlGhv7srQdqxSEXwlTMl9cA7S5y0IoKnf+fttsjbFqNXn6jqwzo8LXR+sug8HJ1unrH5vzX3tLsg2OKzFHBIYWUSYg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531876; c=relaxed/simple; bh=+Txf5rjD+DI2shJcwGP84PS0A02ha3PLs4g7tp/AJhg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iMkZkHoWnBJUZzdAM6kmNP2Z/SDqaZwq2Xy2j0gLjWusvJ377stIT8RaleNoHccK+Uc5ofu2VS7XGs8vsiGXbqsphWw9yt1kU+HjQ6M1t35rUJX+KSjNpHF0fVNLBrssbR6BnfRl1Iidtqoz8xBpuuXVHMUjFh9ltf+Htswnksw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=yisw23MQ; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="yisw23MQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531875; x=1818067875; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Txf5rjD+DI2shJcwGP84PS0A02ha3PLs4g7tp/AJhg=; b=yisw23MQKpySsSN8cT7owLyhBwSy0NS7Wzu8z8aZQJeElP9fVtTlS2tO 8iDhMOR/UEo5L5lmPUtz8xRBlirq3mWswd7yWSj5i4CoK5A9+2rx+Slj+ ED3N5LslvDZMDU2zNNZuuGBq7sIxcSx9cQAkAiraAM3i1ZdrFV2ULDhh8 J3rNuPQoEb0/G1adwks16VxJAeSlYyEpsHGSCqQ4yRNrRW/BBmu58u/6A jPwFrtxmmIk9X9kRHlcDvhTquMAm2swuf+8VrUcO/E6QbQ+c1tY3wgOM8 9eync58EaIdrHZjwBWRd/TBPb+5NptSrWMpxY8pU1TXr4udQKq+r6oPJP A==; X-CSE-ConnectionGUID: GrJ2XrNbS1SA3ezscL300A== X-CSE-MsgGUID: raJAU4sqSe+FF5NNWhdq9A== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="61119836" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Aug 2026 03:51:14 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 12 Aug 2026 03:51:13 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:51:03 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 5/7] ARM: dts: microchip: sama5d27_wlsom1: use fixed-partitions for QSPI flash Date: Wed, 12 Aug 2026 16:19:53 +0530 Message-ID: <20260812104955.485667-6-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Move the QSPI flash partitions under a "partitions" node with the "fixed-partitions" compatible, as required by the current MTD partition binding, instead of declaring them as direct children of the flash node. No functional change. Reviewed-by: Linus Walleij Signed-off-by: Manikandan Muralidharan --- .../dts/microchip/at91-sama5d27_wlsom1.dtsi | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi b/arch/a= rm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi index 0417f53b3e96..062aa02a98ed 100644 --- a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi @@ -240,34 +240,40 @@ qspi1_flash: flash@0 { m25p,fast-read; status =3D "disabled"; =20 - at91bootstrap@0 { - label =3D "at91bootstrap"; - reg =3D <0x0 0x40000>; - }; + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + at91bootstrap@0 { + label =3D "at91bootstrap"; + reg =3D <0x0 0x40000>; + }; =20 - bootloader@40000 { - label =3D "bootloader"; - reg =3D <0x40000 0xc0000>; - }; + bootloader@40000 { + label =3D "bootloader"; + reg =3D <0x40000 0xc0000>; + }; =20 - bootloaderenvred@100000 { - label =3D "bootloader env redundant"; - reg =3D <0x100000 0x40000>; - }; + bootloaderenvred@100000 { + label =3D "bootloader env redundant"; + reg =3D <0x100000 0x40000>; + }; =20 - bootloaderenv@140000 { - label =3D "bootloader env"; - reg =3D <0x140000 0x40000>; - }; + bootloaderenv@140000 { + label =3D "bootloader env"; + reg =3D <0x140000 0x40000>; + }; =20 - dtb@180000 { - label =3D "device tree"; - reg =3D <0x180000 0x80000>; - }; + dtb@180000 { + label =3D "device tree"; + reg =3D <0x180000 0x80000>; + }; =20 - kernel@200000 { - label =3D "kernel"; - reg =3D <0x200000 0x600000>; + kernel@200000 { + label =3D "kernel"; + reg =3D <0x200000 0x600000>; + }; }; }; }; --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 9CC2842641B; Wed, 12 Aug 2026 10:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531888; cv=none; b=nsFVlwukwSwGP3fYmIjZSwXLOi+wVazNMSKy2qQLbyICbEv1XUg911y9NIf/dfoHwjH8pN9M+T/JL8Hwm4c6jd70bIICxWo3IOZm8YgVzkQzmqLGyxpgYcSAtVFquQH2JH1L0OBt+Dol6PVcvGZ1LsYPkLDBY3WmK/CprS6q9As= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531888; c=relaxed/simple; bh=Z70fjpYttGJ5pF28+/q5Hw0XOwexxfwU6c0isKT50eA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ttkxb2cIRtjxcwCYOGJEH/21tKxyDhqDCG2arvtyhFGig0mGqKC/ILBJ3YgZ/HAJeYse20pHaUJwafyZ8JYzHOpyJ4oqcm750rVIzCKnMu2EHJ15tLal03oi07CynimN/QdCVryG40fEjSk5hmDW4OqD0j8Xc6uE/Qz4lCxqjKE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=UwutCFZY; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="UwutCFZY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531886; x=1818067886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z70fjpYttGJ5pF28+/q5Hw0XOwexxfwU6c0isKT50eA=; b=UwutCFZY1B2+Dhh4p74m1HAO601crOHhTkUVxnyXbF47OLwWW0PG7XxB GFLDVvxvEaMWusTJj1cisOBQyI+OVBO6aDx1nbx/nhuq5YXgSGVItLzMS KA7KJZpspH4jO8KI8wmQ26Hk7hdT7/qoKr+PSjiXTp8n63a5QOXHBua6y IP32JrsQloeBQ4ABAwSc7mAS1nypducvYG0HaXT64fX/5AxA4gjbBZSD9 +tS6goa+gpSG4hMMAge171Vp46/3bXKCI1LvEKEa4EPpKUxtvQY0gWPId WSdonmxSyLRrbJWVdoJ89OT4NVtlrMyEcjndyNYYCknuCcKihD1aRYx+A w==; X-CSE-ConnectionGUID: LSAcPquSSsak6epvTX2MmA== X-CSE-MsgGUID: lzlKLKSLQnGi/vL1LfQsDw== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="71673518" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 03:51:25 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.87.151) by chn-vm-ex4.mchp-main.com (10.10.87.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.45; Wed, 12 Aug 2026 03:51:25 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:51:14 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 6/7] ARM: dts: microchip: sama5d27_wlsom1: read MAC address from QSPI SFDP Date: Wed, 12 Aug 2026 16:19:54 +0530 Message-ID: <20260812104955.485667-7-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Describe the QSPI flash SFDP as an NVMEM provider with the microchip,sst26vf-sfdp-eui layout, which exposes the factory-programmed EUI-48 as a "mac-address" cell, and point macb0 at it through nvmem-cells. This yields a stable MAC address on boards where U-Boot does not program one, instead of falling back to a random address. The sama5d27_wlsom1 SoM is fitted with the factory-programmed SST26VF064BEUI, and the QSPI flash node is only enabled on boards carrying that part, so the EUI-48 marker and its "mac-address" cell are always present. Boards without an EUI-programmed part simply do not reference the cell, so macb0 never defers waiting for it. Reviewed-by: Linus Walleij Signed-off-by: Manikandan Muralidharan --- arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi | 11 +++++++++++ .../boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts | 2 ++ 2 files changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi b/arch/a= rm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi index 062aa02a98ed..6016d7f2a39c 100644 --- a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi @@ -240,6 +240,17 @@ qspi1_flash: flash@0 { m25p,fast-read; status =3D "disabled"; =20 + sfdp { + compatible =3D "jedec,sfdp"; + + nvmem-layout { + compatible =3D "microchip,sst26vf-sfdp-eui"; + + mac_address_eui48: mac-address { + }; + }; + }; + partitions { compatible =3D "fixed-partitions"; #address-cells =3D <1>; diff --git a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts b/arch= /arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts index 35a933eec573..5e87bf04bc47 100644 --- a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts +++ b/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts @@ -97,6 +97,8 @@ uart6: serial@200 { =20 &macb0 { status =3D "okay"; + nvmem-cells =3D <&mac_address_eui48>; + nvmem-cell-names =3D "mac-address"; }; =20 &pioA { --=20 2.43.0 From nobody Tue Sep 29 04:39:33 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 A8FE4403129; Wed, 12 Aug 2026 10:51:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531899; cv=none; b=qzB763kB7VfDswdcP0x/Eh+l98kFhkwkIkfgIkbAhiZXdxpSgGYSHJUjxioQt7KOfb1NjVIg/p5Ak0nmuPkBklW8UyjQWyvmtUo5BbqSCvqAr9MtOMEAZkJCbFaWhqdV+NwiuAl8sLcsto6U/5QoHkLBAsiPQsgjtdINLYe40vk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786531899; c=relaxed/simple; bh=1XJw3ZIVNLVIjUuPwE5g/7zUOaAo2PmxEW3WdYarUvQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aC1HQcPYHCUgR4dfmsDjVgP3PL3YsqQjchxpJrE+9U5PvthDFWys2e6oOHyuB654U9103Va789wiMICmsNYov+37d1QOUsNV0Z/3lEgm5tMnvBX7z65sLnCCFkpn5XAiLarK8brjfSkyaO662R+PAJ3NijgXPGUTJM6YzW2UPno= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=tK3SWyMy; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="tK3SWyMy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1786531897; x=1818067897; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1XJw3ZIVNLVIjUuPwE5g/7zUOaAo2PmxEW3WdYarUvQ=; b=tK3SWyMy6QEREwPgX0Gyq3lis3EWCvmDDF8+HZch0e4bo94tSCUTuCgT hRaWJu9EZc4BvbIdzhG+PvED6f+RfZhI/HbErNWKp9VmgGgbH28jHlsOF 1vz/X9TVx5RsdUIvGSfyKJeiSPDQKDwYRfjga5rOey612vN0KynaWUBCE c8Z7gZjhwnReYqj0igJsJYvMpqNExrqMElRzDiRTTA5w6tsPCg4yhv6Fk ytorojdxJ0glSyCoZv1Bao2rtMjQM3p6M0rWblte3zws2dQmB04lgNvRj g9qmZGipH4CrbbQnaNwQH6hpegdTJY6NAvN+4q5SuQOHlcehtXncto2P8 w==; X-CSE-ConnectionGUID: ZXSAxwFwTfufGD66zMQ6LQ== X-CSE-MsgGUID: jXelUdznTDmVXN8PJqotyQ== X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="71673525" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 03:51:36 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.87.151) by chn-vm-ex4.mchp-main.com (10.10.87.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.45; Wed, 12 Aug 2026 03:51:36 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 12 Aug 2026 03:51:25 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , , , , , , , , , , CC: Manikandan Muralidharan Subject: [PATCH v7 7/7] ARM: configs: sama5: enable Microchip/SST SFDP EUI NVMEM layout Date: Wed, 12 Aug 2026 16:19:55 +0530 Message-ID: <20260812104955.485667-8-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260812104955.485667-1-manikandan.m@microchip.com> References: <20260812104955.485667-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@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" Enable CONFIG_NVMEM_LAYOUT_SST26VF_SFDP_EUI so the factory EUI-48 stored in the SST26VF QSPI flash SFDP can be used as a MAC address on boards such as the sama5d27_wlsom1. Reviewed-by: Linus Walleij Signed-off-by: Manikandan Muralidharan --- arch/arm/configs/sama5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defc= onfig index bd7f0b5f7d66..14dda4b0cfd0 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -220,6 +220,7 @@ CONFIG_PWM=3Dy CONFIG_PWM_ATMEL=3Dy CONFIG_PWM_ATMEL_HLCDC_PWM=3Dy CONFIG_PWM_ATMEL_TCB=3Dy +CONFIG_NVMEM_LAYOUT_SST26VF_SFDP_EUI=3Dy CONFIG_EXT4_FS=3Dy CONFIG_FANOTIFY=3Dy CONFIG_AUTOFS_FS=3Dm --=20 2.43.0