From: Rob Herring <robh@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
linux-mtd@lists.infradead.org, Mark Brown <broonie@kernel.org>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Boris Brezillon <boris.brezillon@collabora.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Bernhard Frauendienst <kernel@nospam.obeliks.de>
Subject: Re: [PATCH v4 3/4] dt-bindings: mtd: Describe mtd-concat devices
Date: Mon, 18 Nov 2019 16:13:41 -0600 [thread overview]
Message-ID: <20191118221341.GA30937@bogus> (raw)
In-Reply-To: <20191113171505.26128-4-miquel.raynal@bootlin.com>
On Wed, Nov 13, 2019 at 06:15:04PM +0100, Miquel Raynal wrote:
> From: Bernhard Frauendienst <kernel@nospam.obeliks.de>
>
> The main use case to concatenate MTD devices is probably SPI-NOR
> flashes where the number of address bits is limited to 24, which can
> access a range of 16MiB. Board manufacturers might want to double the
> SPI storage size by adding a second flash asserted thanks to a second
> chip selects which enhances the addressing capabilities to 25 bits,
> 32MiB. Having two devices for twice the size is great but without more
> glue, we cannot define partition boundaries spread across the two
> devices. This is the gap mtd-concat intends to address.
>
> There are two options to describe concatenated devices:
> 1/ One flash chip is described in the DT with two CS;
> 2/ Two flash chips are described in the DT with one CS each, a virtual
> device is also created to describe the concatenation.
>
> Solution 1/ presents at least 3 issues:
> * The hardware description is abused;
> * The concatenation only works for SPI devices (while it could be
> helpful for any MTD);
> * It would require a lot of rework in the SPI core as most of the
> logic assumes there is and there always will be only one CS per
> chip.
This seems ok if all the devices are identical.
> Solution 2/ also has caveats:
> * The virtual device has no hardware reality;
> * Possible optimizations at the hardware level will be hard to enable
> efficiently (ie. a common direct mapping abstracted by a SPI
> memories oriented controller).
Something like this may be necessary if data is interleaved rather than
concatinated.
Solution 3
Describe each device and partition separately and add link(s) from one
partition to the next
flash0 {
partitions {
compatible = "fixed-partitions";
concat-partition = <&flash1_partitions>;
...
};
};
flash1 {
flash1_partition: partitions {
compatible = "fixed-partitions";
...
};
};
Maybe a link back to the previous paritions too or a boolean to mark as
a continuation.
No idea how well this works or not for the kernel, but that really
shouldn't matter for the binding design.
Rob
next prev parent reply other threads:[~2019-11-18 22:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 17:15 [PATCH v4 0/4] MTD concat Miquel Raynal
2019-11-13 17:15 ` [PATCH v4 1/4] mtd: concat: Fix a comment referring to an unknown symbol Miquel Raynal
2020-01-14 17:09 ` Miquel Raynal
2019-11-13 17:15 ` [PATCH v4 2/4] mtd: Add get_mtd_device_by_node() helper Miquel Raynal
2019-11-13 17:15 ` [PATCH v4 3/4] dt-bindings: mtd: Describe mtd-concat devices Miquel Raynal
2019-11-18 22:13 ` Rob Herring [this message]
2019-11-25 14:15 ` Miquel Raynal
2019-12-02 16:26 ` Rob Herring
2019-11-13 17:15 ` [PATCH v4 4/4] mtd: Add driver for concatenating devices 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=20191118221341.GA30937@bogus \
--to=robh@kernel.org \
--cc=Tudor.Ambarus@microchip.com \
--cc=boris.brezillon@collabora.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@nospam.obeliks.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=richard@nod.at \
--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