Re: [PATCH v2 2/2] mtd: spi-nor: spansion: add die erase support in s28hx-t
From: Michael Walle
Date: Wed May 27 2026 - 09:16:53 EST
On Wed May 27, 2026 at 11:05 AM CEST, tkuw584924 wrote:
> From: Takahiro Kuwano <takahiro.kuwano@xxxxxxxxxxxx>
>
> S28Hx-T family has multi-die devices that support die erase opcode.
> Update die erase opcode when the device is multi-die.
>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>
> Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
> Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> Signed-off-by: Takahiro Kuwano <takahiro.kuwano@xxxxxxxxxxxx>
> ---
> drivers/mtd/spi-nor/spansion.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index b6023076903a..65227d989de1 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -762,6 +762,9 @@ static int s28hx_t_late_init(struct spi_nor *nor)
> params->ready = cypress_nor_sr_ready_and_clear;
> cypress_nor_ecc_init(nor);
>
> + if (params->n_dice > 1)
> + params->die_erase_opcode = SPINOR_OP_CYPRESS_DIE_ERASE;
> +
So this seems to be a common theme for the spansion/cypress flashes.
Does it make sense to have a .mfr_flag USE_DIE_ERASE or
SUPPORTS_DIE_ERASE that can be set in the flash entry instead of
having many different fixups?
-michael
Attachment:
signature.asc
Description: PGP signature