[U-Boot] [PATCH 1/3] sf: stmicro: Add support for N25Q32

From: Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki@xilinx.com
Add support for Numonyx N25Q32 SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki jaganna@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com --- drivers/mtd/spi/stmicro.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 32df827..09a3d68 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 = 0xba16, + .pages_per_sector = 256, + .nr_sectors = 64, + .name = "N25Q32", + }, + { .id = 0xba17, .pages_per_sector = 256, .nr_sectors = 128,

From: Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki@xilinx.com
Add support for Numonyx N25Q32A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki jaganna@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com --- drivers/mtd/spi/stmicro.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 09a3d68..87ed3d3 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 = "N25Q32", }, { + .id = 0xbb16, + .pages_per_sector = 256, + .nr_sectors = 64, + .name = "N25Q32A", + }, + { .id = 0xba17, .pages_per_sector = 256, .nr_sectors = 128,

From: Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki@xilinx.com
Add support for Numonyx N25Q256A SPI flash.
Signed-off-by: Jagannadha Sutradharudu Teki jaganna@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com --- drivers/mtd/spi/stmicro.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 87ed3d3..df432a1 100644 --- a/drivers/mtd/spi/stmicro.c +++ b/drivers/mtd/spi/stmicro.c @@ -134,6 +134,12 @@ static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = { .nr_sectors = 512, .name = "N25Q256", }, + { + .id = 0xbb19, + .pages_per_sector = 256, + .nr_sectors = 512, + .name = "N25Q256A", + }, };
struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode)

I add it's probe in stmicro.c as follow :
/static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
...
+ { + .id = 0xba16, + .pages_per_sector = 256, + .nr_sectors = 64, + .name = "N25Q32", + },
...
struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode) {
...
+ /* clear BP# bit for locked flash */ + spi_flash_cmd_write_status(flash, 0);
.../
Then I add the macro definition of CONFIG_SPI_FLASH_STMICRO. I got the flash was detected :
/U-Boot# sf probe SF:: Got idcodes 00000000: 20 ba 16 10 00 .... SF: Detected N25Q32 with page size 64 KiB, total 4 MiB/
Can it prove the drvier is correct?
And when I erase the flash, it never come out error, it seemed erase correctly :
/SF: erase d8 1 0 0 (20000) status=0x0 ... SF: erase d8 21 0 0 (220000) status=0x0 SF: Successfully erased 2228224 bytes @ 0x0/
But I read out the data, it is not 0xff.
-- View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-1-3-sf-stmicro-Add-support-for-N25Q3... Sent from the U-Boot mailing list archive at Nabble.com.

On 25 November 2014 at 17:16, xixiguo xixiguohx@163.com wrote:
I add it's probe in stmicro.c as follow :
/static const struct stmicro_spi_flash_params stmicro_spi_flash_table[] = {
...
- {
- .id = 0xba16,
- .pages_per_sector = 256,
- .nr_sectors = 64,
- .name = "N25Q32",
- },
...
struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode) {
...
- /* clear BP# bit for locked flash */
- spi_flash_cmd_write_status(flash, 0);
.../
Then I add the macro definition of CONFIG_SPI_FLASH_STMICRO. I got the flash was detected :
/U-Boot# sf probe SF:: Got idcodes 00000000: 20 ba 16 10 00 .... SF: Detected N25Q32 with page size 64 KiB, total 4 MiB/
This flash erase_size works with SECT_4K, please try to use ML u-boot. we unified flash individual vendor flash to common.
Can it prove the drvier is correct?
And when I erase the flash, it never come out error, it seemed erase correctly :
/SF: erase d8 1 0 0 (20000) status=0x0 ... SF: erase d8 21 0 0 (220000) status=0x0 SF: Successfully erased 2228224 bytes @ 0x0/
But I read out the data, it is not 0xff.
thanks!
participants (3)
-
Jagan Teki
-
Michal Simek
-
xixiguo