From cdb9b0c9b5a1a8905647debd5a259c7fed2497ea Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Fri, 3 Aug 2018 01:13:41 +0200 Subject: [PATCH] driver/spi/stmicro: add 3.3V variant of N25Q032 Unfortunately stmicro.c does not distinguish the 1.8V version from the 3.3V versions (yet) although they have distinct RDIDs. I have at least ordered the ID macros accordingly and used a proper name in this patch. Change-Id: Id4fd8d46dcc9e51c1ae5504a32c2f8c5cfd863a1 Signed-off-by: Stefan Tauner Reviewed-on: https://review.coreboot.org/27861 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- src/drivers/spi/stmicro.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c index 240d182b60..4ee0fcf7c2 100644 --- a/src/drivers/spi/stmicro.c +++ b/src/drivers/spi/stmicro.c @@ -45,17 +45,18 @@ * Device ID = (memory_type << 8) + memory_capacity */ #define STM_ID_M25P10 0x2011 -#define STM_ID_M25P16 0x2015 #define STM_ID_M25P20 0x2012 -#define STM_ID_M25P32 0x2016 #define STM_ID_M25P40 0x2013 -#define STM_ID_M25P64 0x2017 #define STM_ID_M25P80 0x2014 +#define STM_ID_M25P16 0x2015 +#define STM_ID_M25P32 0x2016 +#define STM_ID_M25P64 0x2017 #define STM_ID_M25P128 0x2018 +#define STM_ID_N25Q032__3E 0xba16 +#define STM_ID_N25Q128A 0xba18 #define STM_ID_N25Q256 0xba19 #define STM_ID_N25Q064 0xbb17 #define STM_ID_N25Q128 0xbb18 -#define STM_ID_N25Q128A 0xba18 struct stmicro_spi_flash_params { u16 device_id; @@ -131,6 +132,14 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { .nr_sectors = 64, .name = "M25P128", }, + { + .device_id = STM_ID_N25Q032__3E, + .op_erase = CMD_M25PXX_SSE, + .page_size = 256, + .pages_per_sector = 16, + .nr_sectors = 1024, + .name = "N25Q032..3E", + }, { .device_id = STM_ID_N25Q064, .op_erase = CMD_M25PXX_SSE,