[PATCH 2/3] mtd: spi-nor: Add GD25LB512ME GigaDevice flash_info
Michael Walle
mwalle at kernel.org
Fri May 23 04:16:50 PDT 2025
Hi,
> Add GD25LB512ME SPI-NOR flash information
Please have a look at [1].
This flash supports SFDP, do you really need a new entry in the
flashdb? Could you try without it?
In any case, could you please dump the SFDP see [1], too.
[1] https://docs.kernel.org/driver-api/mtd/spi-nor.html
> Signed-off-by: Zixian Zeng <sycamoremoon376 at gmail.com>
> ---
> drivers/mtd/spi-nor/gigadevice.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
> index ef1edd0add70e6ca501620798a779d621d6bb00d..223b2f598ecd651ce8df6789dfbaf938c534f94f 100644
> --- a/drivers/mtd/spi-nor/gigadevice.c
> +++ b/drivers/mtd/spi-nor/gigadevice.c
> @@ -33,6 +33,15 @@ static const struct spi_nor_fixups gd25q256_fixups = {
> .post_bfpt = gd25q256_post_bfpt,
> };
>
> +static void gd25lb512me_default_init(struct spi_nor *nor)
> +{
> + nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable;
Should be automatically set, by SFDP.
> +}
> +
> +static const struct spi_nor_fixups gd25lb512me_fixups = {
> + .default_init = gd25lb512me_default_init,
> +};
> +
> static const struct flash_info gigadevice_nor_parts[] = {
> {
> .id = SNOR_ID(0xc8, 0x40, 0x15),
> @@ -82,6 +91,14 @@ static const struct flash_info gigadevice_nor_parts[] = {
> .size = SZ_16M,
> .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
> .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> + }, {
> + .id = SNOR_ID(0xc8, 0x67, 0x1a),
> + .name = "gd25lb512me",
No name,
> + .size = SZ_64M,
> + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
> + .no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ,
No, no_sfdp_flags, as this flash supports SFDP.
> + .fixups = &gd25lb512me_fixups,
> + .fixup_flags = SPI_NOR_4B_OPCODES,
> },
> };
>
-michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 297 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20250523/e3cfccf9/attachment.sig>
More information about the linux-mtd
mailing list