On Sat, Oct 26 2024, Amit Kumar Mahapatra wrote: Hi Amit, I've been meaning to look into this proposal for some time now, but one thing or another kept coming up and I never got around to it. Well, I'll try to get some of my thoughts out with this reply. I still haven't looked very deeply into the past discussions, so apologies if I bring up something that was already discussed. > 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.