summaryrefslogtreecommitdiff
path: root/src/drivers/spi/stmicro.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2018-08-03 01:13:41 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-08-13 15:48:32 +0000
commitcdb9b0c9b5a1a8905647debd5a259c7fed2497ea (patch)
tree371c0dc984bea2e528166a361721b4e763719b70 /src/drivers/spi/stmicro.c
parent6f9c84dc88fc4fcc351ec91b2bb9ff5ae6e4f1a6 (diff)
downloadcoreboot-cdb9b0c9b5a1a8905647debd5a259c7fed2497ea.tar.xz
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 <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27861 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/drivers/spi/stmicro.c')
-rw-r--r--src/drivers/spi/stmicro.c17
1 files 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;
@@ -132,6 +133,14 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
.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,
.page_size = 256,