[PATCH v3 3/3] ARM: dts: microchip: sama5d27_wlsom1: Add nvmem-layout in QSPI for EUI48 MAC Address

Manikandan Muralidharan
2025-05-21T07:12:07Z

Add nvmem-layout in QSPI to read the EUI48 Mac address by the
net drivers using the nvmem property.The offset is set to 0x0
since the factory programmed address is available in the
resource managed space and the size determine if the requested
address is of EUI48 (0x6) or EUI-64 (0x8) type.
This is useful for cases where U-Boot is skipped and the Ethernet
MAC address is needed to be configured by the kernel

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
.../boot/dts/microchip/at91-sama5d27_wlsom1.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi
index b34c5072425a..be06df1b7d66 100644
--- a/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi
+++ b/arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1.dtsi
@@ -210,6 +210,9 @@ &macb0 {
#size-cells = <0>;
phy-mode = "rmii";

+ nvmem-cells = <&mac_address_eui48>;
+ nvmem-cell-names = "mac-address";
+
ethernet-phy@0 {
reg = <0x0>;
interrupt-parent = <&pioA>;
@@ -238,6 +241,16 @@ qspi1_flash: flash@0 {
m25p,fast-read;
status = "disabled";

+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mac_address_eui48: mac-address@0 {
+ reg = <0x0 0x6>;
+ };
+ };
+
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
--
2.25.1