From c969abc47033d6f810d3c9dbdb994ea9d691d038 Mon Sep 17 00:00:00 2001 From: Rajeshwari Shinde Date: Thu, 2 Aug 2012 12:55:05 +0530 Subject: sf: winbond: add W25Q32 SMDK EVT1 has a different Winbond part, added its part details to the SPI flash table. Signed-off-by: Abhilash Kesavan Signed-off-by: Rajeshwari Shinde Signed-off-by: Mike Frysinger --- drivers/mtd/spi/winbond.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index 427b71f..6d9b3af 100644 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -62,6 +62,11 @@ static const struct winbond_spi_flash_params winbond_spi_flash_table[] = { .nr_blocks = 256, .name = "W25Q128", }, + { + .id = 0x5014, + .nr_blocks = 128, + .name = "W25Q80", + }, }; struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) -- cgit v1.1 From 63ff6a66aef4d838fa6e3737d3e242697c0a591d Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Thu, 2 Aug 2012 20:47:29 +0200 Subject: sf: stmicro: support JEDEC standard two-byte signature There are more than the M25Pxx serial flashs that can be used with the stmicro driver, for example: the M25PXxx or N25Qxx serie. All these chips have burned in the original stmicro manufacture id 0x20 together with a standard two-byte signature. In preperation to support all these chips the stmicro driver have to decode the full two-byte signature. Signed-off-by: Stephan Linz Signed-off-by: Mike Frysinger --- drivers/mtd/spi/stmicro.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index dbd1fc1..706bb8e 100644 --- a/drivers/mtd/spi/stmicro.c +++ b/drivers/mtd/spi/stmicro.c @@ -37,7 +37,7 @@ #define CMD_M25PXX_RES 0xab /* Release from DP, and Read Signature */ struct stmicro_spi_flash_params { - u8 idcode1; + u16 id; u16 pages_per_sector; u16 nr_sectors; const char *name; @@ -45,55 +45,55 @@ struct stmicro_spi_flash_params { static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { { - .idcode1 = 0x11, + .id = 0x2011, .pages_per_sector = 128, .nr_sectors = 4, .name = "M25P10", }, { - .idcode1 = 0x15, + .id = 0x2015, .pages_per_sector = 256, .nr_sectors = 32, .name = "M25P16", }, { - .idcode1 = 0x12, + .id = 0x2012, .pages_per_sector = 256, .nr_sectors = 4, .name = "M25P20", }, { - .idcode1 = 0x16, + .id = 0x2016, .pages_per_sector = 256, .nr_sectors = 64, .name = "M25P32", }, { - .idcode1 = 0x13, + .id = 0x2013, .pages_per_sector = 256, .nr_sectors = 8, .name = "M25P40", }, { - .idcode1 = 0x17, + .id = 0x2017, .pages_per_sector = 256, .nr_sectors = 128, .name = "M25P64", }, { - .idcode1 = 0x14, + .id = 0x2014, .pages_per_sector = 256, .nr_sectors = 16, .name = "M25P80", }, { - .idcode1 = 0x18, + .id = 0x2018, .pages_per_sector = 1024, .nr_sectors = 64, .name = "M25P128", }, { - .idcode1 = 0x19, + .id = 0xba19, .pages_per_sector = 256, .nr_sectors = 512, .name = "N25Q256", @@ -105,6 +105,7 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode) const struct stmicro_spi_flash_params *params; struct spi_flash *flash; unsigned int i; + u16 id; if (idcode[0] == 0xff) { i = spi_flash_cmd(spi, CMD_M25PXX_RES, @@ -119,15 +120,17 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode) return NULL; } + id = ((idcode[1] << 8) | idcode[2]); + for (i = 0; i < ARRAY_SIZE(stmicro_spi_flash_table); i++) { params = &stmicro_spi_flash_table[i]; - if (params->idcode1 == idcode[2]) { + if (params->id == id) { break; } } if (i == ARRAY_SIZE(stmicro_spi_flash_table)) { - debug("SF: Unsupported STMicro ID %02x\n", idcode[1]); + debug("SF: Unsupported STMicro ID %04x\n", id); return NULL; } -- cgit v1.1 From 6ad6c6dc1ed2bc3357afb2bdd22be8bab4955837 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Thu, 2 Aug 2012 20:47:30 +0200 Subject: sf: stmicro: add support N25Q128 parts Adds support for Numonyx's N25Q128 SPI flash. These devices are used on (among others) Avnet Spartan-6 LX9 micro-evaluation boards. Tested with "sf" commands and CONFIG_ENV_IS_IN_SPI_FLASH. Signed-off-by: Stephan Linz Signed-off-by: Mike Frysinger --- drivers/mtd/spi/stmicro.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 706bb8e..600e531 100644 --- a/drivers/mtd/spi/stmicro.c +++ b/drivers/mtd/spi/stmicro.c @@ -93,6 +93,12 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { .name = "M25P128", }, { + .id = 0xba18, + .pages_per_sector = 256, + .nr_sectors = 256, + .name = "N25Q128", + }, + { .id = 0xba19, .pages_per_sector = 256, .nr_sectors = 512, -- cgit v1.1 From d945ce970414673f895ac2b2449d7b7a9edf58d0 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 10 Aug 2012 14:21:46 +0200 Subject: sf: stmicro: add support for N25Q128A Add support for Numonyx N25Q128A SPI flash. Signed-off-by: Michal Simek Signed-off-by: Mike Frysinger --- drivers/mtd/spi/stmicro.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 600e531..30b626a 100644 --- a/drivers/mtd/spi/stmicro.c +++ b/drivers/mtd/spi/stmicro.c @@ -99,6 +99,12 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { .name = "N25Q128", }, { + .id = 0xbb18, + .pages_per_sector = 256, + .nr_sectors = 256, + .name = "N25Q128A", + }, + { .id = 0xba19, .pages_per_sector = 256, .nr_sectors = 512, -- cgit v1.1 From c75942c7b792f420d1bf41e15cb1c00189f26ccd Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 13 Aug 2012 16:46:21 -0600 Subject: sf: winbond: fix page_size Commit a4ed3b6 "sf: inline data constants" modified winbond.c's page_size from 256 to 4096. This prevents either/both of "sf write" writing the correct data, or "sf read" from reading the correct data back. This allows U-Boot running on Compulab Tegra to upgrade itself. Signed-off-by: Stephen Warren Signed-off-by: Mike Frysinger --- drivers/mtd/spi/winbond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index 6d9b3af..f6aab3d 100644 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -99,7 +99,7 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode) flash->write = spi_flash_cmd_write_multi; flash->erase = spi_flash_cmd_erase; flash->read = spi_flash_cmd_read_fast; - flash->page_size = 4096; + flash->page_size = 256; flash->sector_size = 4096; flash->size = 4096 * 16 * params->nr_blocks; -- cgit v1.1 From 4a4cb4e11149158c9eabb1537a1eaee7372ce491 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 14 Aug 2012 13:11:22 +0200 Subject: sf: spansion: Add support for S25FL256S Add support for Spansion S25FL256S SPI flash. Signed-off-by: Michal Simek Signed-off-by: Mike Frysinger --- drivers/mtd/spi/spansion.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c index 9a114ac..32b76e0 100644 --- a/drivers/mtd/spi/spansion.c +++ b/drivers/mtd/spi/spansion.c @@ -96,6 +96,13 @@ static const struct spansion_spi_flash_params spansion_spi_flash_table[] = { .nr_sectors = 256, .name = "S25FL129P_64K", }, + { + .idcode1 = 0x2019, + .idcode2 = 0x4d01, + .pages_per_sector = 256, + .nr_sectors = 512, + .name = "S25FL256S", + }, }; struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode) -- cgit v1.1