From 55859f5c41cc9ceebc9dfc106ba2c37be9f0c6e6 Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Thu, 4 Aug 2016 08:12:04 +0200 Subject: [PATCH] UPSTREAM: drivers/spi: Add support for Micron N25Q128A Although we have already support for the flash chip N25Q128 there is a similar type available which has the same geometry and opcodes but unfortunately a slightly different device type ID. While the already supported N25Q128 has the ID 0xbb18 this one has the ID 0xba18. To make both types available in the flash support table, use N25Q128A as the flash name. This name can be found in the datasheet which can be found here: https://www.micron.com/~/media/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_128mb_3v_65nm.pdf TEST=Booted and verified that MRC cache could be written BUG=None BRANCH=None Change-Id: Ic8acba7f4c55347e45798ce4bea577094be7e281 Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/16061 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi Reviewed-on: https://chromium-review.googlesource.com/368518 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin --- src/drivers/spi/stmicro.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c index 3a4e6a4931..6ab601c73f 100644 --- a/src/drivers/spi/stmicro.c +++ b/src/drivers/spi/stmicro.c @@ -52,6 +52,7 @@ #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; @@ -155,6 +156,14 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { .nr_sectors = 4096, .name = "N25Q128", }, + { + .device_id = STM_ID_N25Q128A, + .op_erase = CMD_M25PXX_SSE, + .page_size = 256, + .pages_per_sector = 16, + .nr_sectors = 4096, + .name = "N25Q128A", + }, { .device_id = STM_ID_N25Q256, .op_erase = CMD_M25PXX_SSE,