summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mtd
diff options
context:
space:
mode:
authorArseniy Krasnov <avkrasnov@salutedevices.com>2024-05-08 02:09:01 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2024-05-27 13:52:07 +0200
commit4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4 (patch)
treed720f6179f705b1496734d536433f892fd10fed2 /Documentation/devicetree/bindings/mtd
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
downloadlinux-4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4.tar.gz
linux-4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4.tar.bz2
linux-4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4.zip
dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code
Boot ROM code on Meson requires that some pages on NAND must be written in special mode: "short" ECC mode where each block is 384 bytes and scrambling mode is on. Such pages are located on the chip in the following way (for example): [ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ] ^ ^ ^ ^ pX is page number "X". "^" means "special" page used by boot ROM - e.g. every 2nd page in the range of [0, 7]. Step (2 in example is set by 'amlogic,boot-page-step' field. Last page in range (7 in example) is set by 'amlogic,boot-pages' field. Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-2-avkrasnov@salutedevices.com
Diffstat (limited to 'Documentation/devicetree/bindings/mtd')
-rw-r--r--Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml18
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
index 57b6957c8415..284f0f882c32 100644
--- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
@@ -64,11 +64,29 @@ patternProperties:
items:
maximum: 0
+ amlogic,boot-pages:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Number of pages starting from offset 0, where a special ECC
+ configuration must be used because it is accessed by the ROM
+ code. This ECC configuration uses 384 bytes data blocks.
+ Also scrambling mode is enabled for such pages.
+
+ amlogic,boot-page-step:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Interval between pages, accessed by the ROM code. For example
+ we have 8 pages [0, 7]. Pages 0,2,4,6 are accessed by the
+ ROM code, so this field will be 2 (e.g. every 2nd page). Rest
+ of pages - 1,3,5,7 are read/written without this mode.
+
unevaluatedProperties: false
dependencies:
nand-ecc-strength: [nand-ecc-step-size]
nand-ecc-step-size: [nand-ecc-strength]
+ amlogic,boot-pages: [nand-is-boot-medium, "amlogic,boot-page-step"]
+ amlogic,boot-page-step: [nand-is-boot-medium, "amlogic,boot-pages"]
required: