From: Rob Herring <robh@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: linux-kernel@vger.kernel.org,
Luka Perkov <luka.perkov@sartura.hr>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Robert Marko <robert.marko@sartura.hr>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Michael Walle <michael@walle.cc>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [PATCH v4 1/5] dt-bindings: nvmem: Introduce the nvmem-layout container
Date: Wed, 16 Nov 2022 14:52:09 -0600 [thread overview]
Message-ID: <166863192845.861669.10779520962009282400.robh@kernel.org> (raw)
In-Reply-To: <20221114085659.847611-2-miquel.raynal@bootlin.com>
On Mon, 14 Nov 2022 09:56:55 +0100, Miquel Raynal wrote:
> The nvmem devices description works like this:
>
> * Most cases (EEPROM & co):
>
> eeprom@x {
> compatible = "<eeprom-compatible>";
> ...
> };
>
> * MTD case:
>
> flash@y {
> compatible = "<flash-compatible>";
> ...
> otp {
> compatible = "user-otp"; /* or "factory-otp" */
> ...
> };
> };
>
> In the former case, the nvmem device is "eeprom@x", while in the latter
> case the nvmem device is "otp".
>
> Nvmem devices can produce nvmem cells. The current way to describe nvmem
> cells is to locate them by providing their static byte and bit offset
> and length. These information are stored in subnodes of the nvmem
> device.
>
> It is now a fact that such description does not fit more advanced use
> cases where the location or the size of the cells may vary. There are
> currently three known situations which require being described
> differently: Kontron's SL28 VPD, ONIE's TLV table and U-Boot's
> environment variables.
>
> Hence, we need a way to describe the parsers that must be used in order
> to make the dynamic discovery of the nvmem cells. This new description
> must fit both use cases (the generic situation and the MTD case).
>
> Let's create in both cases a container node named nvmem-layout whose
> content will depend on the parser. Right now nvmem-layout.yaml is
> "empty", but references to additional layout parser bindings will be
> inserted in the near future. The final goal being something that looks
> like:
>
> * Most cases (EEPROM & co):
>
> eeprom@x {
> compatible = "<eeprom-compatible>";
> ...
> nvmem-layout {
> compatible = "<parser-compatible>";
> ...
> };
> };
>
> * MTD case:
>
> flash@y {
> compatible = "<flash-compatible>";
> ...
> otp {
> compatible = "user-otp"; /* or "factory-otp" */
> ...
> nvmem-layout {
> compatible = "<parser-compatible>";
> ...
> };
> };
> };
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> .../bindings/nvmem/layouts/nvmem-layout.yaml | 30 +++++++++++++++++++
> .../devicetree/bindings/nvmem/nvmem.yaml | 7 +++++
> 2 files changed, 37 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
next prev parent reply other threads:[~2022-11-16 20:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 8:56 [PATCH v4 0/5] Bindings for NVMEM layouts Miquel Raynal
2022-11-14 8:56 ` [PATCH v4 1/5] dt-bindings: nvmem: Introduce the nvmem-layout container Miquel Raynal
2022-11-16 20:52 ` Rob Herring [this message]
2022-11-14 8:56 ` [PATCH v4 2/5] dt-bindings: eeprom: Inherit from nvmem.yaml Miquel Raynal
2022-11-14 12:21 ` Bartosz Golaszewski
2022-11-16 20:52 ` Rob Herring
2022-11-14 8:56 ` [PATCH v4 3/5] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout Miquel Raynal
2022-11-16 20:52 ` Rob Herring
2022-11-16 21:28 ` Miquel Raynal
2022-11-16 22:44 ` Srinivas Kandagatla
2022-11-14 8:56 ` [PATCH v4 4/5] dt-bindings: vendor-prefixes: Add ONIE Miquel Raynal
2022-11-14 8:56 ` [PATCH v4 5/5] dt-bindings: nvmem: add YAML schema for the ONIE tlv layout Miquel Raynal
2022-11-16 20:54 ` Rob Herring
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=166863192845.861669.10779520962009282400.robh@kernel.org \
--to=robh@kernel.org \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luka.perkov@sartura.hr \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=thomas.petazzoni@bootlin.com \
/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
all inboxes | Powered by JetHome®