From: "Rafał Miłecki" <zajec5@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Michael Walle <michael@walle.cc>
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Shawn Guo" <shawnguo@kernel.org>, "Li Yang" <leoyang.li@nxp.com>,
"Frank Rowand" <frowand.list@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Ansuel Smith" <ansuelsmth@gmail.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 0/2] dt-bindings: nvmem: support describing cells
Date: Tue, 25 Jan 2022 19:01:12 +0100 [thread overview]
Message-ID: <20220125180114.12286-1-zajec5@gmail.com> (raw)
From: Rafał Miłecki <rafal@milecki.pl>
Michael has recently posted a cleaned up patchset for NVMEM
transformations support:
[PATCH 0/8] nvmem: add ethernet address offset support
https://lore.kernel.org/lkml/20211228142549.1275412-1-michael@walle.cc/T/
https://patchwork.ozlabs.org/project/linux-mtd/list/?series=278644&state=*
I find it very important & fully support it. In home routers we very
often deal with just one MAC address that:
1. Is a base for calculating multiple Ethernet addresses
2. Can be stored in binary as well as ASCII format
I'd like to suggest just a slightly different solution though. I think
that using something like:
otp-1 {
compatible = "kontron,sl28-vpd", "user-otp";
#address-cells = <1>;
#size-cells = <1>;
base_mac_address: base-mac-address@17 {
#nvmem-cell-cells = <1>;
reg = <17 6>;
};
};
isn't clear enough and requires too much conditional code in Linux /
whatever implementation. DT doesn't make it clear which NVMEM cells
are used for what and how should be handled. That has to be hardcoded in
a Linux / whatever driver.
My idea is to add "compatible" & additional flags to NVMEM cells.
Example:
otp-1 {
compatible = "user-otp";
#address-cells = <1>;
#size-cells = <1>;
base_mac_address: base-mac-address@17 {
compatible = "mac-address";
reg = <17 6>;
#nvmem-cell-cells = <1>;
};
};
(for more examples see PATCH 2/2 and its mac-address.yaml .
Rafał Miłecki (2):
dt-bindings: nvmem: extract NVMEM cell to separated file
dt-bindings: nvmem: cells: add MAC address cell
.../devicetree/bindings/nvmem/cells/cell.yaml | 35 +++++++
.../bindings/nvmem/cells/mac-address.yaml | 94 +++++++++++++++++++
.../devicetree/bindings/nvmem/nvmem.yaml | 25 +----
3 files changed, 131 insertions(+), 23 deletions(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/cells/cell.yaml
create mode 100644 Documentation/devicetree/bindings/nvmem/cells/mac-address.yaml
--
2.31.1
next reply other threads:[~2022-01-25 18:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 18:01 Rafał Miłecki [this message]
2022-01-25 18:01 ` [PATCH 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file Rafał Miłecki
2022-01-25 18:01 ` [PATCH 2/2] dt-bindings: nvmem: cells: add MAC address cell Rafał Miłecki
2022-01-26 3:29 ` Rob Herring
2022-01-26 7:07 ` [PATCH REBASED 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file Rafał Miłecki
2022-01-26 7:07 ` [PATCH REBASED 2/2] dt-bindings: nvmem: cells: add MAC address cell Rafał Miłecki
2022-02-01 15:55 ` Rob Herring
2022-02-01 16:49 ` Rafał Miłecki
2022-02-25 9:09 ` Rafał Miłecki
2022-02-01 17:01 ` Michael Walle
2022-02-25 9:07 ` Rafał Miłecki
2022-02-11 12:50 ` [PATCH REBASED 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file 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=20220125180114.12286-1-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=frowand.list@gmail.com \
--cc=hauke@hauke-m.de \
--cc=kuba@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).