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

Marek Behún kabel at kernel.org
Wed Oct 13 16:44:51 CEST 2021


On Mon, 11 Oct 2021 18:16:02 +0200
Luka Kovacic <luka.kovacic at sartura.hr> 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 MACs), so this looks good to me.

The `name` property can be omitted, the node name should be used, since
it is unique both in DT and in env.

MAC addresses will need a special compatible property so that the nvmem
driver knows to convert them from 'XX:XX:XX:XX:XX:XX' string to 6-byte
value.

> I agree, a real nvmem API would be much cleaner than the current
> U-Boot implementation, as there is currently no way to
> programmatically access these parameters and the implementations have
> different user interfaces.
> 
> As there is currently no nvmem framework, I recommend that the basic,
> futureproof DT bindings are defined and DT parsing is temporarily
> implemented in the hw_info mac command. What do you think?

Yes, that is acceptable.

> 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.

In the meantime implement the hw_info mac command.

I will send proposal for dt-binding.

Marek


More information about the U-Boot mailing list