In practice (as found in the OpenWrt project) many devices with multiple ethernet interfaces just store a base MAC address in NVMEM and increase the lowermost byte with one for each interface, so as to occupy less NVMEM. Support this with a per-interface offset so we can encode this in a predictable way for each interface sharing the same NVMEM cell. Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> --- .../devicetree/bindings/net/ethernet-controller.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index 45819b2358002bc75e876eddb4b2ca18017c04bd..608f89359ca844e5325e3cc81bd2677b0eccb08a 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -53,6 +53,18 @@ properties: nvmem-cell-names: const: mac-address + nvmem-mac-minor-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 255 + description: + When a MAC address for a device with multiple ethernet interface + is stored in non-volatile memory, the address is often offsetted + for different interfaces by increasing the lowermost byte for each + interface subsequent to the first in order to save space in NVMEM. + This property can be used to add that offset when several + interfaces refer to the same NVMEM cell. + phy-connection-type: description: Specifies interface type between the Ethernet device and a physical -- 2.47.1