[PATCH] mtd: spinand: add support for Dosilicon DS35Q1GA/DS35M1GA

Miquel Raynal miquel.raynal at bootlin.com
Mon Dec 8 00:52:15 PST 2025


Hi Ahmed, thanks for this contribution.

> +static SPINAND_OP_VARIANTS(read_cache_variants,
> +		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));

These macros have been renamed, please rebase at -rc1.

> +
> +static SPINAND_OP_VARIANTS(write_cache_variants,
> +		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
> +		SPINAND_PROG_LOAD(true, 0, NULL, 0));
> +
> +static SPINAND_OP_VARIANTS(update_cache_variants,
> +		SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
> +		SPINAND_PROG_LOAD(false, 0, NULL, 0));
> +
> +static int ds35xx_ooblayout_ecc(struct mtd_info *mtd, int section,
> +				struct mtd_oob_region *region)
> +{
> +	return -ERANGE;
> +}

This is strange, there is usually some spare area used for storing the
ECC. Are you sure none of the bytes in the spare area are being smashed
when you write them?

> +static int ds35xx_ooblayout_free(struct mtd_info *mtd, int section,
> +				 struct mtd_oob_region *region)
> +{
> +	if (section)
> +		return -ERANGE;
> +	region->offset = 2;
> +	region->length = 62;
> +	return 0;
> +}
> +

LGTM otherwise.

Thanks,
Miquèl



More information about the linux-mtd mailing list