Re: [PATCH v2 2/3] mtd: rawnand: Add Cortina CS7542 controller support
From: Fil Dunsky
Date: Thu Nov 26 2026 - 06:41:11 EST
Hi Miquel,
Thanks for reviewing both patches. You are right: I put restrictions of
the initial driver into the hardware binding. The SDK definitions have
two chip selects, 8/16-bit bus support, Hamming with 256/512-byte steps,
and BCH. I have removed the ECC restrictions and described both chip
selects in the local v4 candidate.
The 256-byte Hamming step is intentional for Almond+: it uses three ECC
bytes per step, or 24 bytes for a 2048-byte page, matching the stock
layout. The v3 hardware test read the existing flash and wrote/erased a
temporary UBI volume with that layout. This does not imply that the
controller is limited to that ECC configuration.
I also found the AXI bus attachment, flash IRQ at GIC SPI 18, and flash
reset at global reset bit 14 in the vendor sources. The updated binding
describes these and the banked data aperture. PIO does not claim the SSP
DMA engine shared with the network engine. The driver retains the
firmware bus timing and does not pulse the flash reset at probe.
For the driver, the local candidate now separates supports_op() from
execution and checks the sequencer format/capacity rather than an opcode
whitelist. The Hamming callbacks use nand_read_page_op() and
nand_prog_page_op(), with their commands and addresses passed through
exec_op(). Software ECC uses the core monolithic raw-page helpers.
I have also corrected the parameter alignment and run checkpatch.
v3 had already been posted before these replies arrived. I am collecting
both reviews into v4 rather than sending another partial revision. The
ARM build and tests against the real core operation builders pass; the
new Hamming register/data sequence also agrees with v3 in the host
model. I will check the changed path on Almond+ before posting v4.
Thanks,
Fil