From: Fil Dunsky via B4 Relay <devnull+filipp.dunsky.gmail.com@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v5 1/3] dt-bindings: mtd: Add Cortina CS7542 NAND controller
Date: Fri, 27 Nov 2026 18:54:04 +0300 [thread overview]
Message-ID: <20261127-b4-cs7542-nand-v5-1-45b1a92bd13d@gmail.com> (raw)
In-Reply-To: <20261127-b4-cs7542-nand-v5-0-45b1a92bd13d@gmail.com>
From: Fil Dunsky <filipp.dunsky@gmail.com>
Describe the flash controller registers, optional banked data aperture,
AXI bus clock, flash interrupt and shared flash reset. The controller has
two chip selects, 8/16-bit bus support and Hamming/BCH hardware, rather
than only the configuration supported by the initial driver.
Inherit the standard NAND chip ECC properties. The example explicitly
selects the ROM-compatible 256-byte Hamming layout used on Almond+.
Firmware initializes the NAND bus timing.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
---
.../bindings/mtd/cortina,cs7542-nand.yaml | 90 ++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml b/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml
new file mode 100644
index 000000000..3b7fdf6ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/cortina,cs7542-nand.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cortina Systems CS7542 NAND controller
+
+maintainers:
+ - Fil Dunsky <filipp.dunsky@gmail.com>
+
+description:
+ The flash controller has two NAND chip selects and supports 8-bit and
+ 16-bit devices, programmed I/O, hardware Hamming ECC with 256-byte or
+ 512-byte steps, and hardware BCH ECC. It is on the AXI peripheral bus.
+ The data aperture selects a bank through the controller registers.
+ The flash controller also has access to the shared SSP DMA engine;
+ the programmed-I/O interface does not require that DMA resource.
+ Firmware initializes the NAND bus timing.
+
+allOf:
+ - $ref: nand-controller.yaml#
+
+properties:
+ compatible:
+ const: cortina,cs7542-nand
+
+ reg:
+ minItems: 1
+ items:
+ - description: Flash controller registers
+ - description: Banked NAND data aperture
+
+ reg-names:
+ minItems: 1
+ items:
+ - const: regs
+ - const: data
+
+ clocks:
+ maxItems: 1
+ description: AXI bus clock
+
+ interrupts:
+ maxItems: 1
+ description: Flash controller interrupt
+
+ resets:
+ maxItems: 1
+ description: Shared flash controller reset
+
+patternProperties:
+ "^nand@[01]$":
+ type: object
+ $ref: raw-nand-chip.yaml#
+ properties:
+ reg:
+ minimum: 0
+ maximum: 1
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ nand-controller@f0050000 {
+ compatible = "cortina,cs7542-nand";
+ reg = <0xf0050000 0x300>, <0xe0000000 0x08000000>;
+ reg-names = "regs", "data";
+ clocks = <&axi_clk>;
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ nand@0 {
+ reg = <0>;
+ nand-ecc-mode = "hw";
+ nand-ecc-algo = "hamming";
+ nand-ecc-step-size = <256>;
+ nand-ecc-strength = <1>;
+ };
+ };
--
2.53.0
next prev parent reply other threads:[~2026-11-27 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:54 [PATCH v5 0/3] Add Cortina Systems CS7542 NAND controller support Fil Dunsky via B4 Relay
2026-11-27 15:54 ` Fil Dunsky via B4 Relay [this message]
2026-11-27 15:54 ` [PATCH v5 2/3] mtd: rawnand: Add Cortina CS7542 " Fil Dunsky via B4 Relay
2026-11-27 15:54 ` [PATCH v5 3/3] MAINTAINERS: Add Cortina CS7542 NAND controller entry Fil Dunsky via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127-b4-cs7542-nand-v5-1-45b1a92bd13d@gmail.com \
--to=devnull+filipp.dunsky.gmail.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=p.zabel@pengutronix.de \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®