[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230111073102.8147-3-zajec5@gmail.com>
Date: Wed, 11 Jan 2023 08:30:59 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc: Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Michael Walle <michael@...le.cc>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
u-boot@...ts.denx.de,
Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH V2 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout
From: Rafał Miłecki <rafal@...ecki.pl>
U-Boot environment variables can be found of various underlaying storage
entities. This binding should be defined as a layout on top on NVMEM
device not a NVMEM device itself.
Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
.../bindings/nvmem/layouts/nvmem-layout.yaml | 1 +
.../nvmem/{ => layouts}/u-boot,env.yaml | 29 ++++++++++---------
MAINTAINERS | 2 +-
3 files changed, 17 insertions(+), 15 deletions(-)
rename Documentation/devicetree/bindings/nvmem/{ => layouts}/u-boot,env.yaml (77%)
diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml
index 8512ee538c4c..8835b1781a9f 100644
--- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml
@@ -20,6 +20,7 @@ description: |
oneOf:
- $ref: kontron,sl28-vpd.yaml
- $ref: onie,tlv-layout.yaml
+ - $ref: u-boot,env.yaml
properties:
compatible: true
diff --git a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
similarity index 77%
rename from Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
rename to Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
index cbc5c69fd405..fb273b174fe7 100644
--- a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
+++ b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
-$id: http://devicetree.org/schemas/nvmem/u-boot,env.yaml#
+$id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: U-Boot environment variables
+title: NVMEM layout of U-Boot environment variables
description: |
U-Boot uses environment variables to store device parameters and
@@ -14,16 +14,11 @@ description: |
Data is stored using U-Boot specific formats (variant specific header and NUL
separated key-value pairs).
- Environment data can be stored on various storage entities, e.g.:
+ Environment data can be stored on NVMEM devices of various underlaying storage
+ entities, e.g.:
1. Raw flash partition
2. UBI volume
- This binding allows marking storage device (as containing env data) and
- specifying used format.
-
- 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:
@@ -67,11 +62,14 @@ examples:
read-only;
};
- env: partition@...00 {
- compatible = "u-boot,env";
+ partition@...00 {
reg = <0x40000 0x10000>;
- mac: ethaddr {
+ nvmem-layout {
+ compatible = "u-boot,env";
+
+ mac: ethaddr {
+ };
};
};
};
@@ -87,9 +85,12 @@ examples:
label = "u-boot";
partition-u-boot-env {
- compatible = "brcm,env";
- ethaddr {
+ nvmem-layout {
+ compatible = "brcm,env";
+
+ ethaddr {
+ };
};
};
};
diff --git a/MAINTAINERS b/MAINTAINERS
index 2a1368722c45..2e13ee875c77 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21136,7 +21136,7 @@ F: drivers/media/pci/tw686x/
U-BOOT ENVIRONMENT VARIABLES
M: Rafał Miłecki <rafal@...ecki.pl>
S: Maintained
-F: Documentation/devicetree/bindings/nvmem/u-boot,env.yaml
+F: Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
F: drivers/nvmem/u-boot-env.c
UACCE ACCELERATOR FRAMEWORK
--
2.34.1
Powered by blists - more mailing lists