devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/17] Prevent NAND chip unevaluated properties
@ 2023-06-19  9:28 Miquel Raynal
  2023-06-19  9:29 ` [PATCH v3 01/17] dt-bindings: mtd: Accept nand related node names Miquel Raynal
                   ` (16 more replies)
  0 siblings, 17 replies; 37+ messages in thread
From: Miquel Raynal @ 2023-06-19  9:28 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, devicetree
  Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
	Pratyush Yadav, Michael Walle, linux-mtd, Chris Packham,
	Thomas Petazzoni, Miquel Raynal, Alexandre Torgue,
	AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
	Christophe Kerello, Heiko Stuebner, Jernej Skrabec, Kamal Dasu,
	Liang Yang, Manivannan Sadhasivam, Masahiro Yamada,
	Matthias Brugger, Maxime Coquelin, Maxime Ripard, Paul Cercueil,
	Samuel Holland, Vadivel Murugan, Xiangsheng Hou

As discussed with Krzysztof and Chris, it seems like each NAND
controller binding should actually restrain the properties allowed in
the NAND chip node with its own "unevaluatedProperties: false". This
only works if we reference a yaml schema which contains all the possible
properties *in the NAND chip node*. Indeed, the NAND controller yaml
schema contains properties for the NAND chip which are not evaluated
with this construction.

Link: https://lore.kernel.org/all/a23dd485-a3d9-e31f-be3e-0ab293fcfc4a@linaro.org/

While converting Marvell controller bindings, Chris explicitly pointed
similar bindings which would also trigger errors when using
"unevaluatedProperties: false" because of the problem mentioned above.

Here is an attempt at making this logic more robust:
* All NAND chip properties which are specific to the raw NAND world are
  moved into a raw-nand-chip.yaml file.
* raw-nand-chip.yaml is referenced by all NAND controller bindings when
  the NAND chip must be further constrained.
* raw-nand-chip.yaml and spi-nand.yaml reference nand-chip.yaml.

These change made me realize the qcom,boot-partition property
description was broken, and a few other descriptions needed small
updates. Here is a batch of updates to fix all these.

Thanks,
Miquèl

Changes in v3:
* I'm not sure what happened with v2 but there were some leftovers from
  "previous" kernels, anyway this version of the series does not seem to
  be affected.
* I also removed the remaining quotes which are not needed anymore.
* Collected all tags.

Miquel Raynal (17):
  dt-bindings: mtd: Accept nand related node names
  dt-bindings: mtd: Create a file for raw NAND chip properties
  dt-bindings: mtd: Mark nand-ecc-placement deprecated
  dt-bindings: mtd: Describe nand-ecc-mode
  dt-bindings: mtd: qcom: Fix a property position
  dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: stm32: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml
  dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties
  dt-bindings: mtd: ti,am654: Prevent unevaluated properties

 .../mtd/allwinner,sun4i-a10-nand.yaml         |   5 +-
 .../bindings/mtd/amlogic,meson-nand.yaml      |   3 +
 .../bindings/mtd/brcm,brcmnand.yaml           |   3 +
 .../devicetree/bindings/mtd/denali,nand.yaml  |   9 +-
 .../devicetree/bindings/mtd/ingenic,nand.yaml |   4 +
 .../bindings/mtd/intel,lgm-ebunand.yaml       |   5 +-
 .../bindings/mtd/mediatek,mtk-nfc.yaml        |   3 +-
 .../devicetree/bindings/mtd/mtd.yaml          |   2 +-
 .../bindings/mtd/nand-controller.yaml         |  85 +-------------
 .../devicetree/bindings/mtd/qcom,nandc.yaml   |  45 ++++---
 .../bindings/mtd/raw-nand-chip.yaml           | 111 ++++++++++++++++++
 .../mtd/rockchip,nand-controller.yaml         |   3 +
 .../bindings/mtd/st,stm32-fmc2-nand.yaml      |   3 +
 .../bindings/mtd/ti,am654-hbmc.yaml           |   2 +
 14 files changed, 172 insertions(+), 111 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml

-- 
2.34.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2023-06-22 21:16 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19  9:28 [PATCH v3 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 01/17] dt-bindings: mtd: Accept nand related node names Miquel Raynal
2023-06-22 21:16   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties Miquel Raynal
2023-06-19 22:50   ` Rob Herring
2023-06-20  6:18     ` Miquel Raynal
2023-06-22 21:05     ` Miquel Raynal
2023-06-22 21:16   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated Miquel Raynal
2023-06-22 21:16   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 04/17] dt-bindings: mtd: Describe nand-ecc-mode Miquel Raynal
2023-06-22 21:16   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 05/17] dt-bindings: mtd: qcom: Fix a property position Miquel Raynal
2023-06-22 21:16   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 07/17] dt-bindings: mtd: ingenic: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 08/17] dt-bindings: mtd: sunxi: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 09/17] dt-bindings: mtd: meson: " Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 10/17] dt-bindings: mtd: brcmnand: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 11/17] dt-bindings: mtd: denali: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 12/17] dt-bindings: mtd: intel: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 13/17] dt-bindings: mtd: rockchip: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 14/17] dt-bindings: mtd: stm32: " Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml Miquel Raynal
2023-06-22 21:15   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties Miquel Raynal
2023-06-22 21:14   ` Miquel Raynal
2023-06-19  9:29 ` [PATCH v3 17/17] dt-bindings: mtd: ti,am654: Prevent " Miquel Raynal
2023-06-22 21:14   ` Miquel Raynal

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).