From: "Mahapatra, Amit Kumar" <amit.kumar-mahapatra@amd.com>
To: "tudor.ambarus@linaro.org" <tudor.ambarus@linaro.org>,
"michael@walle.cc" <michael@walle.cc>,
"broonie@kernel.org" <broonie@kernel.org>,
"pratyush@kernel.org" <pratyush@kernel.org>,
"richard@nod.at" <richard@nod.at>,
"vigneshr@ti.com" <vigneshr@ti.com>,
"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
"robh@kernel.org" <robh@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>
Cc: "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"nicolas.ferre@microchip.com" <nicolas.ferre@microchip.com>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"claudiu.beznea@tuxon.dev" <claudiu.beznea@tuxon.dev>,
"Simek, Michal" <michal.simek@amd.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"patches@opensource.cirrus.com" <patches@opensource.cirrus.com>,
"git (AMD-Xilinx)" <git@amd.com>,
"amitrkcian2002@gmail.com" <amitrkcian2002@gmail.com>,
"beanhuo@micron.com" <beanhuo@micron.com>
Subject: RE: [RFC PATCH 0/2] Add support for stacked and parallel memories
Date: Fri, 8 Nov 2024 14:25:39 +0000 [thread overview]
Message-ID: <IA0PR12MB769954DFDA43110B1066F1C9DC5D2@IA0PR12MB7699.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20241026075347.580858-1-amit.kumar-mahapatra@amd.com>
Hello Tudor, Michael, Mark, Rob, Pratyush & Krzysztof
Please share your thoughts on the proposed binding changes and overall
architecture, so we can discuss and finalize the same.
Regards,
Amit
> Subject: [RFC PATCH 0/2] Add support for stacked and parallel memories
>
> Hello Everyone,
>
> Following an email discussion with Miquel regarding the binding changes and overall
> architecture for implementing support for stacked and parallel memories, I’m sharing
> this RFC to initiate a discussion on the proposed updates to current bindings and to
> finalize the implementation architecture.
>
> Before diving into the main topic, here is some background on stacked and parallel
> memories.
>
> The AMD QSPI controller supports two advanced connection modes(Stacked and
> Parallel) which allow the controller to treat two different flashes as one storage.
>
> Stacked:
> Flashes share the same SPI bus, but different CS line, controller driver asserts the
> CS of the flash to which it needs to communicate. Stacked mode is a software
> abstraction rather than a controller feature or capability.
> At any given time, the controller communicates with one of the two connected flash
> devices, as determined by the requested address and data length. If an operation
> starts on one flash and ends on the other, the core needs to split it into two separate
> operations and adjust the data length accordingly.
>
> Parallel(Multi-CS):
> Both the flashes have their separate SPI bus, CS of both the flashes will be
> asserted/de-asserted at the same time. In this mode data will be split across both the
> flashes by enabling the STRIPE setting in the controller.
> Parallel mode is a controller feature where if the STRIPE bit is set then the controller
> internally handles the data split during data write to the flashes and while reading
> data from the flash the controller internally merges data from both the flashes before
> writing to the controller FIFO.
> If STRIPE is not enabled, then same data will be sent to both the devices.
> In parallel mode both the flashes should be identical.
>
> For more information on the modes please feel free to go through the controller flash
> interface below [1].
>
> Mirochip QSPI controller[2] also supports "Dual Parallel 8-bit IO mode", but they call
> it "Twin Quad Mode".
>
> Initially in [3] [4] [5] Miquel had tried to extend MTD-CONCAT driver to support
> Stacked mode, but the bindings were not accepted. So, the MTD-CONCAT
> approach was dropped and the DT bindings that got accepted [6] [7] [8] that
> describes the two flash devices as being one. SPI core changes to support the
> above bindings were added [9]. While adding the support in SPI-NOR Tudor
> provided additional feedback, leading to a discussion on updating the current
> stacked and parallel DT bindings.
>
> Proposed Solution:
> The solution has two parts:
>
> 1. Update MTD-CONCAT
> Update MTD-CONCAT to create virtual concatinated mtd devices as defined
> in the device tree.
>
> 2. Add a New Layer
> Add a new layer between the SPI-NOR and MTD layers to support stacked
> and parallel configurations. This new layer will be part of spi-nor,
> located in mtd/spi-nor/, can be included/excluded via Kconfig, will be
> maintained by AMD and will:
>
> - During probing, store information from all connected flashes in
> stacked or parallel mode and present them as a single device to the
> MTD layer.
> - Register callbacks and manage MTD device registration within the new
> layer instead of spi-nor/core.c.
> - Make minimal changes in spi-nor/core.c, as stacked and parallel
> handling will be managed by the new layer on top of SPI-NOR.
> - Handle odd byte count requests from the MTD layer during flash
> operations in parallel mode.
>
> [1] https://docs.amd.com/r/en-US/am011-versal-acap-trm/QSPI-Flash-Device-
> Interface
> [2]
> https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductD
> ocuments/DataSheets/SAMA7G5-Series-Data-Sheet-DS60001765.pdf
> [3] https://lore.kernel.org/all/20191113171505.26128-4-miquel.raynal@bootlin.com/
> [4] https://lore.kernel.org/all/20191127105522.31445-5-miquel.raynal@bootlin.com/
> [5]https://lore.kernel.org/all/20211112152411.818321-1-miquel.raynal@bootlin.com/
> [6]
> https://github.com/torvalds/linux/commit/f89504300e94524d5d5846ff8b728592ac72c
> ec4
> [7]
> https://github.com/torvalds/linux/commit/eba5368503b4291db7819512600fa014ea17
> c5a8
> [8]
> https://github.com/torvalds/linux/commit/e2edd1b64f1c79e8abda365149ed62a2a9a4
> 94b4
> [9]https://github.com/torvalds/linux/commit/4d8ff6b0991d5e86b17b235fc46ec62e919
> 5cb9b
>
> Thanks,
> Amit
>
> Amit Kumar Mahapatra (2):
> dt-bindings: mtd: Add bindings for describing concatinated MTD devices
> dt-bindings: spi: Update stacked and parallel bindings
>
> .../mtd/partitions/fixed-partitions.yaml | 18 +++++++++++++++
> .../bindings/mtd/partitions/partitions.yaml | 6 +++++
> .../bindings/spi/spi-controller.yaml | 23 +++++++++++++++++--
> .../bindings/spi/spi-peripheral-props.yaml | 9 +++-----
> 4 files changed, 48 insertions(+), 8 deletions(-)
>
> --
> 2.34.1
prev parent reply other threads:[~2024-11-08 14:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 7:53 [RFC PATCH 0/2] Add support for stacked and parallel memories Amit Kumar Mahapatra
2024-10-26 7:53 ` [RFC PATCH 1/2] dt-bindings: mtd: Add bindings for describing concatinated MTD devices Amit Kumar Mahapatra
2024-10-26 11:13 ` Krzysztof Kozlowski
2024-10-28 6:41 ` Mahapatra, Amit Kumar
2024-11-18 13:27 ` Miquel Raynal
2024-11-19 17:02 ` Mahapatra, Amit Kumar
2024-11-20 9:52 ` Miquel Raynal
2024-11-20 10:08 ` Mahapatra, Amit Kumar
2024-10-26 7:53 ` [RFC PATCH 2/2] dt-bindings: spi: Update stacked and parallel bindings Amit Kumar Mahapatra
2024-11-18 13:39 ` Miquel Raynal
2024-11-19 17:02 ` Mahapatra, Amit Kumar
2024-11-20 9:58 ` Miquel Raynal
2024-11-20 10:57 ` Mahapatra, Amit Kumar
[not found] ` <b025774a-adf6-443f-b795-bb138c490c2b@metux.net>
2024-10-30 12:09 ` [RFC PATCH 0/2] Add support for stacked and parallel memories Mahapatra, Amit Kumar
2024-11-08 14:25 ` Mahapatra, Amit Kumar [this message]
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=IA0PR12MB769954DFDA43110B1066F1C9DC5D2@IA0PR12MB7699.namprd12.prod.outlook.com \
--to=amit.kumar-mahapatra@amd.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=amitrkcian2002@gmail.com \
--cc=beanhuo@micron.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@walle.cc \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
--cc=patches@opensource.cirrus.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=venkatesh.abbarapu@amd.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