]> git.sur5r.net Git - u-boot/commitdiff
driver: mtd: spi: Adding support for QSPI flash
authorPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Fri, 3 Jun 2016 13:11:28 +0000 (18:41 +0530)
committerYork Sun <york.sun@nxp.com>
Fri, 3 Jun 2016 21:12:49 +0000 (14:12 -0700)
Serial number, vendor id and page size are added for QSPI flash
common on both LS1012AQDS and LS1012ARDB i.e. S25FS512SDSMFI011.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@nxp.com>
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/mtd/spi/sf_params.c
drivers/mtd/spi/spi_flash.c

index 4f37e33eb0687e753ac965f5cb0f145552baa94d..c577d9ed6c91d81b28648b2b5adec82b8ab73e47 100644 (file)
@@ -67,6 +67,7 @@ const struct spi_flash_params spi_flash_params_table[] = {
        {"S25FL128S_64K",  0x012018, 0x4d01,    64 * 1024,   256, RD_FULL,                   WR_QPP},
        {"S25FL256S_256K", 0x010219, 0x4d00,   256 * 1024,   128, RD_FULL,                   WR_QPP},
        {"S25FL256S_64K",  0x010219, 0x4d01,    64 * 1024,   512, RD_FULL,                   WR_QPP},
+       {"S25FS512S",      0x010220, 0x4D00,   128 * 1024,   512, RD_FULL,                   WR_QPP},
        {"S25FL512S_256K", 0x010220, 0x4d00,   256 * 1024,   256, RD_FULL,                   WR_QPP},
        {"S25FL512S_64K",  0x010220, 0x4d01,    64 * 1024,  1024, RD_FULL,                   WR_QPP},
        {"S25FL512S_512K", 0x010220, 0x4f00,   256 * 1024,   256, RD_FULL,                   WR_QPP},
index fa0e79966cf4253fde639c1f70556b57779d8277..64d4e0f947fd5764464a5aff216c3b9c23718892 100644 (file)
@@ -1072,7 +1072,8 @@ int spi_flash_scan(struct spi_flash *flash)
         * sector that is not overlaid by the parameter sectors.
         * The uniform sector erase command has no effect on parameter sectors.
         */
-       if (jedec == 0x0219 && (ext_jedec & 0xff00) == 0x4d00) {
+       if ((jedec == 0x0219 || (jedec == 0x0220)) &&
+           (ext_jedec & 0xff00) == 0x4d00) {
                int ret;
                u8 id[6];
 
@@ -1146,7 +1147,7 @@ int spi_flash_scan(struct spi_flash *flash)
         * have 256b pages.
         */
        if (ext_jedec == 0x4d00) {
-               if ((jedec == 0x0215) || (jedec == 0x216))
+               if ((jedec == 0x0215) || (jedec == 0x216) || (jedec == 0x220))
                        flash->page_size = 256;
                else
                        flash->page_size = 512;