[PATCH V2 2/3] dt-bindings: nvmem: brcm, nvram: add NVMEM cell to example

Rafał Miłecki zajec5 at gmail.com
Fri Feb 11 05:05:53 PST 2022


From: Rafał Miłecki <rafal at milecki.pl>

NVRAM doesn't have cells at hardcoded addresses. They are stored in
internal struct (custom & dynamic format) . It's still important to
define relevant cells in DT so NVMEM consumers can reference them.

One of cells set in almost every device is "et0macaddr" containing MAC
address. Add it to example to show how it can be referenced.

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
V2: Add children nodes description per Rob's request
---
 .../devicetree/bindings/nvmem/brcm,nvram.yaml    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
index 8c3f0cd22821..fc1df9d1c4d4 100644
--- a/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
+++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
@@ -27,11 +27,23 @@ properties:
   reg:
     maxItems: 1
 
+patternProperties:
+  ".*":
+    description: |
+      Each child node represents one NVRAM entry (variable). Node name has to
+      match variable name as internally defined in the NVRAM.
+
+      Some of common NVRAM variables are: "board_id", "boardflags", "boot_wait",
+      "clkfreq", "et0macaddr", "sdram_config", "wait_time".
+
 unevaluatedProperties: false
 
 examples:
   - |
     nvram at 1eff0000 {
-            compatible = "brcm,nvram";
-            reg = <0x1eff0000 0x10000>;
+        compatible = "brcm,nvram";
+        reg = <0x1eff0000 0x10000>;
+
+        mac: et0macaddr {
+        };
     };
-- 
2.34.1




More information about the linux-arm-kernel mailing list