[PATCH v5 2/5] dt-bindings: net: ethernet-controller: Allow a unique ID NVMEM cell

Alexey Charkov alchark at flipper.net
Wed Nov 25 11:36:39 PST 2026


Boards without dedicated storage for a MAC address often still have an
identifier unique to the device, such as a SoC serial number in OTP
memory, and bootloaders on several platforms derive a stable MAC address
from it. The device tree can only reference a stored MAC address, so
such boards depend on the bootloader patching the derived one in.

Allow referencing the unique ID as a "unique-id" NVMEM cell instead.
Leave the derivation to the binding of the referenced cell, as it differs
between platforms.

Signed-off-by: Alexey Charkov <alchark at flipper.net>
---
 .../devicetree/bindings/net/ethernet-controller.yaml          | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index 30b2a335116e..6966270ff78b 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -24,10 +24,17 @@ properties:
   nvmem-cells:
     maxItems: 1
     description:
-      Reference to an nvmem node for the MAC address
+      Reference to an nvmem node for the MAC address, or for an identifier
+      unique to the device from which the MAC address is derived
 
   nvmem-cell-names:
-    const: mac-address
+    oneOf:
+      - const: mac-address
+      - const: unique-id
+        description:
+          Identifier unique to the device, such as a SoC serial number, from
+          which a stable MAC address is derived. How the address is derived
+          is defined by the binding of the referenced cell.
 
   phy-connection-type:
     description:

-- 
2.56.0




More information about the Linux-rockchip mailing list