[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a15fd377-1828-4cb5-8c7b-7d26ea2a7733@linaro.org>
Date: Mon, 9 Jun 2025 09:17:48 +0100
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: Manikandan Muralidharan <manikandan.m@...rochip.com>, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, claudiu.beznea@...on.dev,
pratyush@...nel.org, mwalle@...nel.org, miquel.raynal@...tlin.com,
richard@....at, vigneshr@...com, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v3 3/3] ARM: dts: microchip: sama5d27_wlsom1: Add
nvmem-layout in QSPI for EUI48 MAC Address
On 5/21/25 8:03 AM, Manikandan Muralidharan wrote:
> 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@...rochip.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>;
> + };
How would this work if in the future the mchp vendor table adds some
other info that needs to be referenced as nvmem? How do you distinguish
the info from the table?
Would it be possible to have some kind of address and size to reference
the SFDP?
> + };
> +
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
Powered by blists - more mailing lists