Re: [PATCH v3] mtd: spinand: dosilicon: Add support for additional models
From: Miquel Raynal
Date: Wed May 27 2026 - 08:30:00 EST
On 27/05/2026 at 06:00:21 -04, Qing Wu <ses1er@xxxxxxxxx> wrote:
> Add support for additional Dosilicon SPI NAND chips.
>
> Datasheets for chips included in this patch: https://www.dosilicon.com/SPI%20NAND%20Flash.html
>
> Tested on a TP-Link TL-7DR7250 with a Dosilicon DS35Q1GB (0xE5 0xF1)
>
> Signed-off-by: Qing Wu <ses1er@xxxxxxxxx>
> ---
> Changes in v3:
> - Changed title
> - Updated 2 bytes for BBM
> - Link to v2: https://lore.kernel.org/all/20260520003733.82514-1-ses1er@xxxxxxxxx/
> Changes in v2:
> - Fixed compilation errors.
> - Link to v1: https://lore.kernel.org/all/20260217211427.9120-1-ses1er@xxxxxxxxx
> ---
> drivers/mtd/nand/spi/dosilicon.c | 218 ++++++++++++++++++++++++++++---
> 1 file changed, 203 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/mtd/nand/spi/dosilicon.c b/drivers/mtd/nand/spi/dosilicon.c
> index f99899866ceb..fcd967c1bcbc 100644
> --- a/drivers/mtd/nand/spi/dosilicon.c
> +++ b/drivers/mtd/nand/spi/dosilicon.c
> @@ -9,21 +9,27 @@
>
> #define SPINAND_MFR_DOSILICON 0xE5
>
> +#define DOSICON_STATUS_ECC_MASK GENMASK(6, 4)
> +#define DOSICON_STATUS_ECC_NO_BITFLIPS (0 << 4)
> +#define DOSICON_STATUS_ECC_1TO3_BITFLIPS (1 << 4)
> +#define DOSICON_STATUS_ECC_4TO6_BITFLIPS (3 << 4)
> +#define DOSICON_STATUS_ECC_7TO8_BITFLIPS (5 << 4)
> +
> static SPINAND_OP_VARIANTS(read_cache_variants,
> - SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0),
> - SPINAND_PAGE_READ_FROM_CACHE_1S_1S_2S_OP(0, 1, NULL, 0, 0),
> - SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0),
> - SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0));
> + SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
> + SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
> + SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
> + SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
Spurious changes? This cannot be even compile tested.
Please don't rush your v4.
Also please run get_maintainers.pl, the Cc list is not complete.
Thanks,
Miquèl