diff mbox series

dt-bindings: nvmem: u-boot,env: add basic NVMEM cells

Message ID 20220703084843.21922-1-zajec5@gmail.com
State New
Headers show
Series dt-bindings: nvmem: u-boot,env: add basic NVMEM cells | expand

Commit Message

Rafał Miłecki July 3, 2022, 8:48 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

U-Boot doesn't have cells at hardcoded addresses. They are stored in
internal format. It's still important to define relevant cells in DT so
NVMEM consumers can reference them.

Update binding to allow including basic cells as NVMEM device subnodes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../devicetree/bindings/nvmem/u-boot,env.yaml       | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Rafał Miłecki Aug. 16, 2022, 9:26 a.m. UTC | #1
On 3.07.2022 10:48, Rafał Miłecki wrote:
> U-Boot doesn't have cells at hardcoded addresses. They are stored in
> internal format. It's still important to define relevant cells in DT so
> NVMEM consumers can reference them.
> 
> Update binding to allow including basic cells as NVMEM device subnodes.

Ping :)


For a reference you can see Broadcom's NVRAM (identical feature):

084973e944bec ("dt-bindings: nvmem: brcm,nvram: add basic NVMEM cells")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=084973e944bec21804f8afb0515b25434438699a

c8442f0fb09ca ("ARM: dts: BCM5301X: Add Ethernet MAC address to Luxul XWR-3150")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8442f0fb09ca3d842b9b23d1d0650f649fd10f8
Tom Rini Aug. 30, 2022, 9:11 p.m. UTC | #2
On Tue, Aug 16, 2022 at 11:26:37AM +0200, Rafał Miłecki wrote:
> On 3.07.2022 10:48, Rafał Miłecki wrote:
> > U-Boot doesn't have cells at hardcoded addresses. They are stored in
> > internal format. It's still important to define relevant cells in DT so
> > NVMEM consumers can reference them.
> > 
> > Update binding to allow including basic cells as NVMEM device subnodes.
> 
> Ping :)
> 
> 
> For a reference you can see Broadcom's NVRAM (identical feature):
> 
> 084973e944bec ("dt-bindings: nvmem: brcm,nvram: add basic NVMEM cells")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=084973e944bec21804f8afb0515b25434438699a
> 
> c8442f0fb09ca ("ARM: dts: BCM5301X: Add Ethernet MAC address to Luxul XWR-3150")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8442f0fb09ca3d842b9b23d1d0650f649fd10f8

Seems fine to me.

Reviewed-by: Tom Rini <trini@konsulko.com>
Rob Herring (Arm) Sept. 13, 2022, 5:45 p.m. UTC | #3
On Sun, 03 Jul 2022 10:48:43 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> U-Boot doesn't have cells at hardcoded addresses. They are stored in
> internal format. It's still important to define relevant cells in DT so
> NVMEM consumers can reference them.
> 
> Update binding to allow including basic cells as NVMEM device subnodes.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../devicetree/bindings/nvmem/u-boot,env.yaml       | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 

Sorry, I guess I was thinking this depended on or interacted with one of 
the other nvmem series.

Applied, thanks!

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
index e70b2a60cb9a..e96bca99f2d9 100644
--- a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
+++ b/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
@@ -24,6 +24,8 @@  description: |
   Right now only flash partition case is covered but it may be extended to e.g.
   UBI volumes in the future.
 
+  Variables can be defined as NVMEM device subnodes.
+
 maintainers:
   - Rafał Miłecki <rafal@milecki.pl>
 
@@ -40,6 +42,14 @@  properties:
   reg:
     maxItems: 1
 
+  bootcmd:
+    type: object
+    description: Command to use for automatic booting
+
+  ethaddr:
+    type: object
+    description: Ethernet interface's MAC address
+
 additionalProperties: false
 
 examples:
@@ -58,5 +68,8 @@  examples:
         env: partition@40000 {
             compatible = "u-boot,env";
             reg = <0x40000 0x10000>;
+
+            mac: ethaddr {
+            };
         };
     };