devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] mtd: improve block2mtd + airoha parser
@ 2024-08-09 17:20 Christian Marangi
  2024-08-09 17:20 ` [PATCH v4 1/7] dt-bindings: nvme: Document nvme-card compatible Christian Marangi
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Christian Marangi @ 2024-08-09 17:20 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Joern Engel, Keith Busch, Jens Axboe, Christoph Hellwig,
	Sagi Grimberg, Saravana Kannan, Christian Marangi,
	Thomas Bogendoerfer, Wolfram Sang, Florian Fainelli, linux-mmc,
	devicetree, linux-kernel, linux-mtd, linux-nvme

This small series handle 2 problems.

It does try to ""standardize"" the usage of block2mtd module with
MTD OF nodes.

It is very easy to add support for MTD parser by just adding an
OF node to the mtd created for block2mtd.

This apply only if the root block is used for block2mtd to allow
scenario where the full eMMC or an NVME is used for MTD and it doesn't
have any partition table.

To also support NVME, similar to how it's done with eMMC, we introduce
a subnode to the NVME controller that needs to have the "nvme-card"
compatible where a dev can define fixed-paritions for MTD parser usage.

This series also add support for the Airoha partition table where
the last partition is always ART and is placed at the end of the flash.

This require dynamic calculation of the offset as some dedicated
driver for bad block management might be used that reserve some space
at the end of the flash for block accounting.

New aarch64 Airoha SoC make use of this partition table and use block2mtd
for eMMC to treat them as MTD with custom bad block management and block
tracking.

Changes v4:
- Add additional patch for ofpart kmod with of_update_property
  not exported
Changes v3:
- Fix compilation error for missing slab.h header
- Add compatible to partitions.yaml
Changes v2:
- Fix typo in DT patch
- Fix compilation error for non-OF platform
- Fix compilation error due to recent changes in block2mtd module

Christian Marangi (7):
  dt-bindings: nvme: Document nvme-card compatible
  nvme: assign of_node to nvme device
  dt-bindings: mmc: add property for partitions node in mmc-card node
  block2mtd: attach device OF node to MTD device
  of: also export of_update_property
  dt-bindings: mtd: Add Documentation for Airoha fixed-partitions
  mtd: parser: add support for Airoha parser

 .../devicetree/bindings/mmc/mmc-card.yaml     | 40 ++++++++++
 .../partitions/airoha,fixed-partitions.yaml   | 80 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 .../devicetree/bindings/nvme/nvme-card.yaml   | 78 ++++++++++++++++++
 drivers/mtd/devices/block2mtd.c               | 12 +++
 drivers/mtd/parsers/Kconfig                   | 10 +++
 drivers/mtd/parsers/Makefile                  |  1 +
 drivers/mtd/parsers/ofpart_airoha.c           | 57 +++++++++++++
 drivers/mtd/parsers/ofpart_airoha.h           | 18 +++++
 drivers/mtd/parsers/ofpart_core.c             |  6 ++
 drivers/nvme/host/core.c                      |  4 +
 drivers/of/base.c                             |  1 +
 12 files changed, 308 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml
 create mode 100644 Documentation/devicetree/bindings/nvme/nvme-card.yaml
 create mode 100644 drivers/mtd/parsers/ofpart_airoha.c
 create mode 100644 drivers/mtd/parsers/ofpart_airoha.h

-- 
2.45.2


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

end of thread, other threads:[~2024-08-21 21:54 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09 17:20 [PATCH v4 0/7] mtd: improve block2mtd + airoha parser Christian Marangi
2024-08-09 17:20 ` [PATCH v4 1/7] dt-bindings: nvme: Document nvme-card compatible Christian Marangi
2024-08-09 17:21 ` [PATCH v4 2/7] nvme: assign of_node to nvme device Christian Marangi
2024-08-12 11:12   ` Christoph Hellwig
2024-08-12 12:10     ` Christian Marangi
2024-08-12 13:31       ` Christoph Hellwig
2024-08-13 20:04         ` Rob Herring
2024-08-13  9:15   ` Markus Elfring
2024-08-09 17:21 ` [PATCH v4 3/7] dt-bindings: mmc: add property for partitions node in mmc-card node Christian Marangi
2024-08-13 20:07   ` Rob Herring
2024-08-20 20:20     ` Christian Marangi
2024-08-21 13:12       ` Miquel Raynal
2024-08-20 21:55         ` Christian Marangi
2024-08-21 13:14       ` Ulf Hansson
2024-08-20 22:06         ` Christian Marangi
2024-08-21 21:53           ` Ulf Hansson
2024-08-09 17:21 ` [PATCH v4 4/7] block2mtd: attach device OF node to MTD device Christian Marangi
2024-08-09 17:21 ` [PATCH v4 5/7] of: also export of_update_property Christian Marangi
2024-08-09 17:21 ` [PATCH v4 6/7] dt-bindings: mtd: Add Documentation for Airoha fixed-partitions Christian Marangi
2024-08-09 17:21 ` [PATCH v4 7/7] mtd: parser: add support for Airoha parser Christian Marangi
2024-08-12  8:49 ` [PATCH v4 0/7] mtd: improve block2mtd + airoha parser Miquel Raynal
2024-08-12 10:10   ` Christian Marangi
2024-08-12 13:17     ` Miquel Raynal
2024-08-12 13:25       ` Christoph Hellwig

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