[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241220-net-mac-nvmem-offset-v1-1-e9d1da2c1681@linaro.org>
Date: Fri, 20 Dec 2024 20:17:06 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 1/2] dt-bindings: net: ethernet-controller: Add mac offset
option
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@...aro.org>
---
.../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
Powered by blists - more mailing lists