mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH v6 0/3] Meson: R/W support for pages used by boot ROM
@ 2024-05-07 23:09 Arseniy Krasnov
  2024-05-07 23:09 ` [PATCH v6 1/3] dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Arseniy Krasnov
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Arseniy Krasnov @ 2024-05-07 23:09 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: linux-mtd, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, oxffffaa, kernel, Arseniy Krasnov

Amlogic's boot ROM code needs that some pages on NAND must be written
in special "short" ECC mode with scrambling enabled. Such pages:
1) Contain some metadata about hardware.
2) Located with some interval starting from 0 offset, until some
   specified offset. Interval and second offset are set in the
   device tree.

This patchset adds R/W support for such pages. To enable it we can setup
it in dts:

    nand-is-boot-medium;
    amlogic,boot-pages = <1024>;
    amlogic,boot-page-step = <128>;

It means that each 128th page in range 0 to 1024 pages will be accessed
in special mode ("short" ECC + scrambling). In practice this feature is
needed when we want to update first block of NAND - driver will enable
required mode by itself using value from device tree.

Changelog:
 v1 -> v2:
  * Rename 'meson,boot-page-XXX' -> 'amlogic,boot-page-XXX'.
  * Add words that 'amlogic,boot-page-step' is measured in pages.
  * Remove words that 'amlogic,boot-page-XXX' depends on 'nand-is-boot-medium'.
  * Make both 'amlogic,boot-page-XXX' depend on each other also, in
    addition to 'nand-is-boot-medium' dependency.
 v2 -> v3:
  * Add quotes to 0001 in dependencies. This fixes 'make dt_binding_check'
    warning.
 v3 -> v4:
  * Rename 'amlogic,boot-page-last' to 'amlogic,boot-pages'.
 v4 -> v5:
  * Update 'description' fields in bindings.
 v5 -> v6:
  * Split patch for meson_nand.c to 2 patches: first is refactoring of
    scrambling mode handling, another is support for special pages for
    boot ROM.
  * Update description and commit message in the bindings patch.

Arseniy Krasnov (3):
  dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code
  mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()'
  mtd: rawnand: meson: read/write access for boot ROM pages

 .../bindings/mtd/amlogic,meson-nand.yaml      | 18 ++++
 drivers/mtd/nand/raw/meson_nand.c             | 86 +++++++++++++------
 2 files changed, 77 insertions(+), 27 deletions(-)

-- 
2.35.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-27 13:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 23:09 [PATCH v6 0/3] Meson: R/W support for pages used by boot ROM Arseniy Krasnov
2024-05-07 23:09 ` [PATCH v6 1/3] dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Arseniy Krasnov
2024-05-08 14:09   ` Rob Herring (Arm)
     [not found]     ` <CAP_G_RUdN+6OcsQZUkqWQMYoH-ZvmPnskT3yONK_YssqUYhm9Q@mail.gmail.com>
2024-05-12 17:26       ` Arseniy Krasnov
2024-05-13  9:05         ` Krzysztof Kozlowski
2024-05-13 10:10   ` Arseniy Krasnov
2024-05-27 12:19   ` Miquel Raynal
2024-05-07 23:09 ` [PATCH v6 2/3] mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()' Arseniy Krasnov
2024-05-27 12:19   ` Miquel Raynal
2024-05-07 23:09 ` [PATCH v6 3/3] mtd: rawnand: meson: read/write access for boot ROM pages Arseniy Krasnov
2024-05-27 12:18   ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®