lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250205133730.273985-2-amit.kumar-mahapatra@amd.com>
Date: Wed, 5 Feb 2025 19:07:28 +0530
From: Amit Kumar Mahapatra <amit.kumar-mahapatra@....com>
To: <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
	<robh@...nel.org>, <krzk+dt@...nel.org>, <conor+dt@...nel.org>
CC: <linux-mtd@...ts.infradead.org>, <devicetree@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <git@....com>, <amitrkcian2002@...il.com>,
	Amit Kumar Mahapatra <amit.kumar-mahapatra@....com>
Subject: [PATCH v12 1/3] dt-bindings: mtd: Describe MTD partitions concatenation

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@...000 {
                            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@...000 {
                            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@...tlin.com>
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@....com>
---
 .../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@...000 {
             compatible = "u-boot";
@@ -138,4 +145,14 @@ examples:
             reg = <0x200000 0x100000>;
             align = <0x4000>;
         };
+
+        part0: partition@...000 {
+            label = "part0_0";
+            reg = <0x400000 0x100000>;
+        };
+
+        part1: partition@...000 {
+            label = "part0_1";
+            reg = <0x800000 0x800000>;
+        };
     };
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ