Skip to content

Commit afe1ea1

Browse files
AlvinZhou97ambarus
authored andcommitted
mtd: spi-nor: add support for Macronix Octal flash
Add manufacturer ID 0xc2 at the end of ID table to allow manufacturer fixups to be applied for any Macronix flash. This spares us of adding new flash entries for flashes that can be initialized solely based on the SFDP data, but still need the manufacturer hooks to set parameters that can't be discovered at SFDP parsing time. The ID is added in order to set the octal DTR methods. SFDP defines a "Command Sequences to Change to Octal DDR (8D-8D-8D) Mode" which can enable the octal DTR mode. Until that is parsed and used, use the local defined method. Suggested-by: Michael Walle <mwalle@kernel.org> Signed-off-by: JaimeLiao <jaimeliao@mxic.com.tw> Signed-off-by: AlvinZhou <alvinzhou@mxic.com.tw> Link: https://lore.kernel.org/r/20240926141956.2386374-7-alvinzhou.tw@gmail.com [ta: update commit message and comment in the code] Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent 46b6256 commit afe1ea1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/mtd/spi-nor/macronix.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,14 @@ static const struct flash_info macronix_nor_parts[] = {
199199
.name = "mx25l3255e",
200200
.size = SZ_4M,
201201
.no_sfdp_flags = SECT_4K,
202-
}
202+
},
203+
/*
204+
* This spares us of adding new flash entries for flashes that can be
205+
* initialized solely based on the SFDP data, but still need the
206+
* manufacturer hooks to set parameters that can't be discovered at SFDP
207+
* parsing time.
208+
*/
209+
{ .id = SNOR_ID(0xc2) }
203210
};
204211

205212
static int macronix_nor_octal_dtr_en(struct spi_nor *nor)

0 commit comments

Comments
 (0)