Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-13 Thread Luka Kovacic
> > Is anyone already working on a nvmem framework to support nvmem > > providers in U-Boot? > > AFAIK no, but I am planning to look into this. Ok. I'd be happy to assist in any way you see fit with this in my free time. > In the meantime implement the hw_info mac command. Okay. > I will send

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-13 Thread Marek Behún
On Mon, 11 Oct 2021 18:16:02 +0200 Luka Kovacic wrote: >> eth1_mac_addr: eth1addr { >> compatible = "mac-address-string"; >> name = "eth1addr"; >> }; > > I don't see any better approach than just matching strings to retrieve > values for specific keys (for

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-11 Thread Luka Kovacic
Hello Marek, > These differences between Marvell's version and U-Boot's standard > environment version can be specified in device-tree (via compatible or > other properties) and handled by one driver. > > A driver for nvmem provider of standard U-Boot env could have this > binding (with

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-11 Thread Marek Behún
On Mon, 11 Oct 2021 12:19:07 +0200 Luka Kovacic wrote: > Hello Pali, > > > Something like this? compatible = "marvell,hw-info" > > This compatible string looks good to me. > We will send a new patch version, which implements the discussed DT > functionality. > > > > I am sure Luka knows more

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-11 Thread Luka Kovacic
Hello Pali, > Something like this? compatible = "marvell,hw-info" This compatible string looks good to me. We will send a new patch version, which implements the discussed DT functionality. > > I am sure Luka knows more about the format than me. The Marvell hw_info partition is very similar to

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-09 Thread Pali Rohár
On Saturday 09 October 2021 12:09:28 Robert Marko wrote: > On Sat, Oct 9, 2021 at 11:42 AM Marek Behún wrote: > > > > > > > > +config MVEBU_MAC_HW_INFO_OFFSET > > > > > > + hex "Marvell hw_info (mac) SPI flash offset" > > > > > > + depends on MVEBU_MAC_HW_INFO > > > > > > + default

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-09 Thread Robert Marko
On Sat, Oct 9, 2021 at 11:42 AM Marek Behún wrote: > > > > > > +config MVEBU_MAC_HW_INFO_OFFSET > > > > > + hex "Marvell hw_info (mac) SPI flash offset" > > > > > + depends on MVEBU_MAC_HW_INFO > > > > > + default 0x3E > > > > > + help > > > > > + This option defines the

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-09 Thread Marek Behún
> > > > +config MVEBU_MAC_HW_INFO_OFFSET > > > > + hex "Marvell hw_info (mac) SPI flash offset" > > > > + depends on MVEBU_MAC_HW_INFO > > > > + default 0x3E > > > > + help > > > > + This option defines the SPI flash offset of the Marvell > > > > + hw_info area.

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Pali Rohár
Hello! On Friday 08 October 2021 15:28:03 Luka Kovacic wrote: > Hello Pali, > > On Fri, Oct 8, 2021 at 2:53 PM Pali Rohár wrote: > > > > Hello! > > > > On Friday 08 October 2021 14:09:23 Robert Marko wrote: > > > From: Luka Kovacic > > > > > > The mac command is implemented to enable parsing

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Luka Kovacic
Hello Pali, On Fri, Oct 8, 2021 at 2:53 PM Pali Rohár wrote: > > Hello! > > On Friday 08 October 2021 14:09:23 Robert Marko wrote: > > From: Luka Kovacic > > > > The mac command is implemented to enable parsing Marvell hw_info formatted > > environments. This format is often used on Marvell

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Pali Rohár
Hello! On Friday 08 October 2021 14:09:23 Robert Marko wrote: > From: Luka Kovacic > > The mac command is implemented to enable parsing Marvell hw_info formatted > environments. This format is often used on Marvell Armada devices to store > parameters like the board serial number, factory MAC

[PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-08 Thread Robert Marko
From: Luka Kovacic The mac command is implemented to enable parsing Marvell hw_info formatted environments. This format is often used on Marvell Armada devices to store parameters like the board serial number, factory MAC addresses and some other information. These parameters are usually written