The AMD QSPI controller supports an advanced connection modes called Stacked mode which allow the controller to treat two different flashes as one storage. In Stacked connection mode 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 mtd layer needs to split it into two separate operations and adjust the data length accordingly. For more information on the modes please feel free to go through the controller flash interface below [1]. Introduce new DT property to specify which partitions are concatenated to each other. flash@0 { reg = <0>; partitions { compatible = "fixed-partitions"; part-concat = <&flash0_part1>, <&flash1_part0>; flash0_part0: part0@0 { label = "part0_0"; reg = <0x0 0x800000>; }; flash0_part1: part1@800000 { label = "part0_1"; reg = <0x800000 0x800000>; }; }; }; flash@1 { reg = <1>; partitions { compatible = "fixed-partitions"; flash1_part0: part1@0 { label = "part1_0"; reg = <0x0 0x800000>; }; flash1_part1: part1@800000 { label = "part1_1"; reg = <0x800000 0x800000>; }; }; }; The partitions that gets created are part0_0 part1_1 part0_1-part1_0-concat [1] https://docs.amd.com/r/en-US/am011-versal-acap-trm/QSPI-Flash-Device-Interface Suggested-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xxxxxxx> --- .../bindings/mtd/partitions/partition.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index 80d0452a2a33..f77fef368211 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -57,6 +57,12 @@ properties: user space from type: boolean + part-concat: + description: List of MTD partitions phandles that should be concatenated. + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 2 + maxItems: 16 + align: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 2 @@ -125,6 +131,7 @@ examples: compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + part-concat = <&part0>, <&part1>; partition@100000 { compatible = "u-boot"; @@ -138,4 +145,14 @@ examples: reg = <0x200000 0x100000>; align = <0x4000>; }; + + part0: partition@400000 { + label = "part0_0"; + reg = <0x400000 0x100000>; + }; + + part1: partition@800000 { + label = "part0_1"; + reg = <0x800000 0x800000>; + }; }; -- 2.34.1