xref: /aosp_15_r20/external/coreboot/src/drivers/spi/issi.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <commonlib/helpers.h>
4 #include <spi_flash.h>
5 #include <spi-generic.h>
6 
7 #include "spi_flash_internal.h"
8 
9 static const struct spi_flash_part_id flash_table[] = {
10 	{
11 		/* IS25WP256D */
12 		.id[0]				= 0x7019,
13 		.nr_sectors_shift		= 13,
14 	},
15 };
16 
17 const struct spi_flash_vendor_info spi_flash_issi_vi = {
18 	.id = VENDOR_ID_ISSI,
19 	.page_size_shift = 8,        // 256 byte page size
20 	.sector_size_kib_shift = 2,  // 4 Kbyte sector size
21 	.match_id_mask[0] = 0xffff,
22 	.ids = flash_table,
23 	.nr_part_ids = ARRAY_SIZE(flash_table),
24 	.desc = &spi_flash_pp_0x20_sector_desc,
25 	.prot_ops = NULL,
26 };
27