[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200919223026.20803-3-ansuelsmth@gmail.com>
Date: Sun, 20 Sep 2020 00:30:21 +0200
From: Ansuel Smith <ansuelsmth@...il.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Ansuel Smith <ansuelsmth@...il.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Frank Rowand <frowand.list@...il.com>,
Boris Brezillon <bbrezillon@...nel.org>,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH v2 2/4] dt-bindings: mtd: partition: Document use of nvmem-provider
Document the use of this 2 new bindings, nvmem-provider and nvmem-cell,
used to describe the nvmem cell that the subpartition provide to the
nvmem api and the system. Nvmem cell are direct subnode of the
subpartition and are skipped by the 'fixed-partitions' parser if they
contain the 'nvmem-cell' tag. The subpartition must have the
'nvmem-provider' tag or the subpartition will not register the cell to
the nvmem api.
Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
---
.../devicetree/bindings/mtd/partition.txt | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index 4a39698221a2..66d3a3f0a021 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -64,6 +64,16 @@ Optional properties:
- slc-mode: This parameter, if present, allows one to emulate SLC mode on a
partition attached to an MLC NAND thus making this partition immune to
paired-pages corruptions
+- nvmem-provider : Optionally a subpartition can be set as a nvmem-provider. This can
+ be very useful if some data like the mac-address is stored in a special partition
+ at a specific offset. Subpartition that describe nvmem-cell must have set the
+ 'nvmem-cell' of they will be treated as a subpartition and not skipped and registred
+ as nvmem cells. In this specific case '#address-cells' and '#size-cells' must be
+ provided.
+- nvmem-cell : A direct subnode of a subpartition can be described as a nvmem-cell and
+ skipped by the fixed-partition parser and registred as a nvmem-cell of the registred
+ nvmem subpartition IF it does contain the 'nvmem-provider tag. If the subpartition
+ lacks of such tag the subnode will be skipped and the nvmem api won't register them.
Examples:
@@ -158,3 +168,52 @@ flash@3 {
};
};
};
+
+flash@0 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0000000 0x100000>;
+ read-only;
+ };
+
+ art: art@...0000 {
+ label = "art";
+ reg = <0x1200000 0x0140000>;
+ read-only;
+ nvmem-provider;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_gmac1: macaddr_gmac1@0 {
+ nvmem-cell;
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_gmac2: macaddr_gmac2@6 {
+ nvmem-cell;
+ reg = <0x6 0x6>;
+ };
+
+ macaddr_wifi: macaddr_wifi@6 {
+ nvmem-cell;
+ reg = <0x6 0x6>;
+ };
+
+ pre_cal_24g: pre_cal_24g@...0 {
+ nvmem-cell;
+ reg = <0x1000 0x2f20>;
+ };
+
+ pre_cal_5g: pre_cal_5g@...0{
+ nvmem-cell;
+ reg = <0x5000 0x2f20>;
+ };
+ };
+ };
+};
\ No newline at end of file
--
2.27.0
Powered by blists - more mailing lists