From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
devicetree@vger.kernel.org
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <michael@walle.cc>, <linux-mtd@lists.infradead.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
<linux-kernel@vger.kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH v3 00/17] Improve MTD bindings
Date: Mon, 14 Nov 2022 10:02:58 +0100 [thread overview]
Message-ID: <20221114090315.848208-1-miquel.raynal@bootlin.com> (raw)
Hello,
During a yaml conversion review, Krzysztof opened the discussion about
the links and references made between the different files in the mtd
bindings. I figured out some minimal changes might be needed to properly
reference everything correctly and ensure we constrain as much as
possible the existing bindings. That is what I tried to do here.
The idea is:
* partition.yaml defines one MTD partition
* parsers/*.yaml define partition parsers (mainly compatibles)
* mtd.yaml contains the generic definition of any mtd device (nand,
spi-nand, spi-nor, nor, sram, etc), in particular, it defines the
various partition formats (legacy and current) and references
partition.yaml as well as a list of all the possible parsers within a
"partitions" node.
* nand-chip.yaml, jedec,spi-nor, mtd-physmap.yaml all describe real
instances of mtd device, each of them with a different underlying
technology, they reference mtd.yaml
* nand-controller.yaml has subnodes which reference nand-chip.yaml.
* Specific NAND controller bindings reference nand-controller.yaml.
I've tested each and every patch with the following command and it
worked fine:
$ make dt_binding_check -j10 DT_CHECKER_FLAG=-m DT_SCHEMA_FILES=mtd/
Cheers,
Miquèl
Changes since v2:
* Added Rob's R-by on almost all the patches but
"dt-bindings: mtd: nvmem-cells: Fix example"
* Changed the commit message of the patch mentioned above to mention
that 'ranges' is not declared anywhere besides being a potentially
valid property, hence dropping it from the example just to avoid
failing the test, knowing that at some point someone could reintroduce
it by defining it in one of the core yaml files.
Miquel Raynal (17):
dt-bindings: mtd: Clarify all partition subnodes
dt-bindings: mtd: Remove useless file about partitions
dt-bindings: mtd: nand-chip: Reference mtd.yaml
dt-bindings: mtd: nand: Drop common properties already defined in
generic files
dt-bindings: mtd: nand: Standardize the child node name
dt-bindings: mtd: ingenic: Mark partitions in the controller node as
deprecated
dt-bindings: mtd: onenand: Mention the expected node name
dt-bindings: mtd: sunxi-nand: Add an example to validate the bindings
dt-bindings: mtd: spi-nor: Drop common properties
dt-bindings: mtd: physmap: Reuse the generic definitions
dt-bindings: mtd: partitions: Constrain the list of parsers
dt-bindings: mtd: partitions: Change qcom,smem-part partition type
dt-bindings: mtd: nvmem-cells: Drop range property from example
dt-bindings: mtd: nvmem-cells: Inherit from MTD partitions
dt-bindings: mtd: Argue in favor of keeping additionalProperties set
to true
dt-bindings: mtd: Drop object types when referencing other files
dt-bindings: mtd: Standardize the style in the examples
.../mtd/allwinner,sun4i-a10-nand.yaml | 34 +++--
.../bindings/mtd/arasan,nand-controller.yaml | 5 +-
.../bindings/mtd/arm,pl353-nand-r2p1.yaml | 30 ++---
.../devicetree/bindings/mtd/atmel-nand.txt | 6 +-
.../bindings/mtd/brcm,brcmnand.yaml | 80 ++++++------
.../devicetree/bindings/mtd/denali,nand.yaml | 2 +-
.../devicetree/bindings/mtd/ingenic,nand.yaml | 116 ++++++++---------
.../bindings/mtd/intel,lgm-ebunand.yaml | 48 +++----
.../bindings/mtd/jedec,spi-nor.yaml | 14 ---
.../devicetree/bindings/mtd/lpc32xx-mlc.txt | 2 +-
.../devicetree/bindings/mtd/lpc32xx-slc.txt | 2 +-
.../bindings/mtd/microchip,mchp48l640.yaml | 14 +--
.../devicetree/bindings/mtd/mtd-physmap.yaml | 7 +-
.../devicetree/bindings/mtd/mtd.yaml | 24 +++-
.../devicetree/bindings/mtd/mtk-nand.txt | 2 +-
.../devicetree/bindings/mtd/nand-chip.yaml | 4 +
.../bindings/mtd/nand-controller.yaml | 2 +-
.../devicetree/bindings/mtd/partition.txt | 33 -----
.../partitions/arm,arm-firmware-suite.yaml | 2 +
.../partitions/brcm,bcm4908-partitions.yaml | 2 +
.../brcm,bcm947xx-cfe-partitions.yaml | 2 +
.../mtd/partitions/linksys,ns-partitions.yaml | 2 +
.../bindings/mtd/partitions/nvmem-cells.yaml | 4 +-
.../bindings/mtd/partitions/partition.yaml | 1 +
.../bindings/mtd/partitions/partitions.yaml | 41 ++++++
.../mtd/partitions/qcom,smem-part.yaml | 32 ++---
.../bindings/mtd/partitions/redboot-fis.yaml | 6 +
.../devicetree/bindings/mtd/qcom,nandc.yaml | 117 +++++++++---------
.../bindings/mtd/st,stm32-fmc2-nand.yaml | 47 +++----
.../bindings/mtd/ti,am654-hbmc.yaml | 36 +++---
.../bindings/mtd/ti,gpmc-onenand.yaml | 3 +
drivers/mtd/parsers/Kconfig | 2 +-
32 files changed, 380 insertions(+), 342 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/mtd/partition.txt
create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
--
2.34.1
next reply other threads:[~2022-11-14 9:03 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 9:02 Miquel Raynal [this message]
2022-11-14 9:02 ` [PATCH v3 01/17] dt-bindings: mtd: Clarify all partition subnodes Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 02/17] dt-bindings: mtd: Remove useless file about partitions Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 03/17] dt-bindings: mtd: nand-chip: Reference mtd.yaml Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 04/17] dt-bindings: mtd: nand: Drop common properties already defined in generic files Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 05/17] dt-bindings: mtd: nand: Standardize the child node name Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 06/17] dt-bindings: mtd: ingenic: Mark partitions in the controller node as deprecated Miquel Raynal
2022-11-17 21:16 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 07/17] dt-bindings: mtd: onenand: Mention the expected node name Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 08/17] dt-bindings: mtd: sunxi-nand: Add an example to validate the bindings Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 09/17] dt-bindings: mtd: spi-nor: Drop common properties Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 10/17] dt-bindings: mtd: physmap: Reuse the generic definitions Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 11/17] dt-bindings: mtd: partitions: Constrain the list of parsers Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 12/17] dt-bindings: mtd: partitions: Change qcom,smem-part partition type Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 13/17] dt-bindings: mtd: nvmem-cells: Drop range property from example Miquel Raynal
2022-11-16 20:56 ` Rob Herring
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 14/17] dt-bindings: mtd: nvmem-cells: Inherit from MTD partitions Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 15/17] dt-bindings: mtd: Argue in favor of keeping additionalProperties set to true Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 16/17] dt-bindings: mtd: Drop object types when referencing other files Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
2022-11-14 9:03 ` [PATCH v3 17/17] dt-bindings: mtd: Standardize the style in the examples Miquel Raynal
2022-11-17 21:15 ` Miquel Raynal
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=20221114090315.848208-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--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
all inboxes | Powered by JetHome®