From: "Rafał Miłecki" <zajec5@gmail.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: "Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Michael Walle" <michael@walle.cc>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, u-boot@lists.denx.de,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH V2 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout
Date: Wed, 11 Jan 2023 08:30:59 +0100 [thread overview]
Message-ID: <20230111073102.8147-3-zajec5@gmail.com> (raw)
In-Reply-To: <20230111073102.8147-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.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@milecki.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@40000 {
- compatible = "u-boot,env";
+ partition@40000 {
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@milecki.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
next prev parent reply other threads:[~2023-01-11 7:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 7:30 [PATCH V2 1/6] nvmem: core: add nvmem_dev_size() helper Rafał Miłecki
2023-01-11 7:30 ` [PATCH V2 2/6] nvmem: core: allow .read_post_process() callbacks to adjust buffer Rafał Miłecki
2023-01-11 11:07 ` kernel test robot
2023-01-11 7:30 ` Rafał Miłecki [this message]
2023-01-13 16:46 ` [PATCH V2 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout Rob Herring
2023-01-11 7:31 ` [PATCH V2 4/6] nvmem: u-boot-env: convert to layout driver Rafał Miłecki
2023-01-11 7:31 ` [PATCH V2 5/6] dt-bindings: nvmem: u-boot,env: add MAC's #nvmem-cell-cells Rafał Miłecki
2023-01-13 16:47 ` Rob Herring
2023-01-11 7:31 ` [PATCH V2 6/6] nvmem: u-boot-env: post process "ethaddr" env variable Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230111073102.8147-3-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).