From patchwork Fri Aug 31 08:56:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10583433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D987B17DB for ; Fri, 31 Aug 2018 08:58:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA32E2A2AC for ; Fri, 31 Aug 2018 08:58:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD8502A2CF; Fri, 31 Aug 2018 08:58:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30BD32A2AC for ; Fri, 31 Aug 2018 08:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727993AbeHaNEk (ORCPT ); Fri, 31 Aug 2018 09:04:40 -0400 Received: from mail-ve1eur01on0045.outbound.protection.outlook.com ([104.47.1.45]:12752 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727705AbeHaNEk (ORCPT ); Fri, 31 Aug 2018 09:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yD0LOgJ0Ysxscp87Bb+YCfdKkxCcOFP+D56wT7bkoTE=; b=xmwyPAAPhrXgGTomYQcmBbeeh+r+h1oqNZyG4t9pJp8PulETPHV1Fe852GNRMwaSKzSrtsZt9mKLhoA+cXQyHOrYJKo0Dw5orJDdmSoO3PQ9/Y/JvXllF2mh1i0I38nkB9ZDus9i8B89LSnO/gkFvi12+bUjXzB6Txvx1MUzh+4= Received: from idcbfarm.ap.freescale.net (14.143.30.134) by HE1PR04MB1035.eurprd04.prod.outlook.com (2a01:111:e400:581a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Fri, 31 Aug 2018 08:58:04 +0000 From: Yogesh Gaur To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com, linux-spi@vger.kernel.org, marek.vasut@gmail.com Cc: computersforpeace@gmail.com, frieder.schrempf@exceet.de, linux-kernel@vger.kernel.org, david.wolfe@nxp.com, Yogesh Gaur Subject: [PATCH 1/2] mtd: spi-nor: add macros related to MICRON flash Date: Fri, 31 Aug 2018 14:26:02 +0530 Message-Id: <1535705763-26369-2-git-send-email-yogeshnarayan.gaur@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535705763-26369-1-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1535705763-26369-1-git-send-email-yogeshnarayan.gaur@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: SG2PR0302CA0018.apcprd03.prod.outlook.com (2603:1096:3:2::28) To HE1PR04MB1035.eurprd04.prod.outlook.com (2a01:111:e400:581a::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e7ee7fa-1d94-45bd-1a04-08d60f1fdefb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:HE1PR04MB1035; X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;3:kfl2Wps+pGcP/7V7yI/Ywsi1VZA/rIZSkW5YwChKIS6stENs2JmNGXx3ThVDh3D3rvYBjD4B5AUMMWmqbvXPbfTWJIgHNELWyVGgCzTttInHMvF+HH9DnigdwAsH2Pba6DvzGzg+rFRY15WmP1qqnHeSy+VtffJAIV9F3Gti4DCCOjRW8zRTDE4Bvd7x17//ftB8XzSz0EVtnBNN+j2sDDcBSevytOlb+o/9d/PhXsU8wBeUz3Y9qdwyCgtQ7K//;25:lnxOkyXBZHStinDsg0Zn0DWGsBrwDhCLjSyyktWgZMiGICZFW08p+1IcP9H+V9imIHEsKL1K/vrKPQZ0vNCa4sCvIk4RXpAqKz9FvMWJgY69hMFmVv8fYOFjZYQuJVzSrHjlZhd/S5iWOd45p+UAX8ynsmEs4r+e6jlMA+kXjVnw47A2zBLsEmvdfHaRilGqPpzLgtUMdOl6jo4WfXdqOSV0KpKt000odeUXg1RzG8xNHr2jCT01kTmt98YSe+Oy+GQw3uob4CUUDdbUEsfZ+MNuKbc/3RBJvYXRl/QYbLfIvpOaVD0+J2uW0u++Ms0uyb5ajEEDw6uMKt4rDy6YTA==;31:LQ+J2sqPLcY0NnRRzXLLTXsWYOV7pd6iEmyTKN+a0Eo6YpCieF80tdsRZ1RbIeCWvSz8c4l0KqY11pGJlcsXs4Ov1pTWmRr4cYI+Fzy3J1kFZipjLQDhRckkkbs6sIrZuCDKm/1zi7ET7vdt4svtPCw/pXSeHAZvSZJBjS+Vel4zSCLFjlY+G/XjZmiAz333stLl8+73t5vmCcXBayTNRrhg3NVPKgFAH+Iob+VFP8Q= X-MS-TrafficTypeDiagnostic: HE1PR04MB1035: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;20:JV0Y4zRbW4aWknT65fPpbvbxFTJEd5+I0fEkB2BxfIlADz4tTQvws1n8+gxxXfdFdUT/BszBwKhMGfkh2ZRa0fcnBwlYmmtHV+dVUKsGTa7TrSPP9ipLs0vV+IN7iUrur6skStUV3R8r+7UEBAJtADi8hJd68OKC35gC0eNpE4YKjIvk0CnrbGWO/GrtwU41o6EvcprVEs8sYNWhzQ5GOn1ynVRKV6Y4TmTtyf4qxkOEQuEmzI+N+8Kfxv8F0o+w4InnMvQh8ajrVkTQjg1LpQgsjz2ELuwX6NevzjO3lx9/zsG6rYBGskzbW++qSjQ+/jeEuoETxbxuerFXJ6FWrvD0UhkREp1ro3fxE0YxNLap8YjX/NF1RWCcptdKkKd1cxl33XS4/KO+B9hGTJmhkRS71n5slU3EcdfML0/IuMZcnA2DNFzkYQZFIi/0PnbWwRpAcCkcyXUnTK94kWySxKd0EPE8TUU5SShso0W7aMJwfqarT3hfA8kZ1QyVCstz;4:NMrJjiwn96KCtlp8VTLwbjdmqZrvDz3EDZysx8dR4oBnBuiSNBirNAnsPCiHUrpzC6v8nv96njs0zgaxntLfTPxInJ8RUU2qd3Xqfup0vfRPFvKYFuGP/xwjlsjIPNjz956itZzXhxoqOGGoIL/T1k627TGKTkaADpi3FPk8w2v0r4+TrwN//iGg2g6sbMoNJj7Y6LnjKqEzPAR3No9E5DwA6VEUG4xQJHfvvFUe+210sYwxxYIfUkO5iJotxXy6D4+/SGTiDM599o1ZJkNFE1xodJJC4f++sUEkvgyJ/g3Q8fqZhHKcDt83RXJGxY/sR9+vdOSdtZnoQ+hTH+JVnGpibrZKvfW7SO9A1eqhsPc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(269456686620040); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:HE1PR04MB1035;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1035; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(346002)(376002)(396003)(136003)(199004)(189003)(486006)(66066001)(47776003)(16586007)(316002)(476003)(11346002)(2616005)(956004)(478600001)(68736007)(446003)(2906002)(3846002)(50466002)(6116002)(106356001)(105586002)(36756003)(81156014)(25786009)(53936002)(6486002)(81166006)(4326008)(6512007)(5660300001)(39060400002)(26005)(55236004)(8936002)(16526019)(186003)(8676002)(97736004)(305945005)(5009440100003)(386003)(6506007)(7736002)(14444005)(50226002)(86362001)(48376002)(76176011)(51416003)(52116002)(110426005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1035;H:idcbfarm.ap.freescale.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;23:6hhs2om/70EUuzBuZnEtyOiJGKaNDqC5lq/ms6V6lD/1DxxavruYPiHmLkMXK12ay4fXv5FD2YbV+MGVcXtQmyU6Dz5mXhsxWyaoVGmiwBMhahn06A3YLYlDhN66aL8bwFVciMKdJ6Fk6WoENa6x3uIbVSoIEIdDi9NxodXX5Neh9KNLUpZEvVZTPbynyG7HrR+/tUxRjL5Liy5G7T4R89oZSosWBLwLBhgTF5dxi2GTIGHfyOFUTWzDflodpc2dQC6ocbMrlv6mPziYzs4X3upLL7bzGEJNAEEPltVM9bYqvosflunCA+nBZMOEI8nfNn7JPObt6wFC3pwRMn4kFJyUU6r5eQI/7oywF7GYPBMDD2/pvhd49qjWvKAXNVh+09hwD6/ENZNn1FVy7LAO7BZ7pjiaVTmU/G66HjGmg+8vfI+8Qlc8No1jEihDx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1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 08:58:04.5623 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e7ee7fa-1d94-45bd-1a04-08d60f1fdefb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1035 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some MICRON related macros in spi-nor domain were ST. Rename entries related to STMicroelectronics under macro SNOR_MFR_ST. Added entry of MFR Id for Micron flashes, 0x002C. Signed-off-by: Yogesh Gaur --- drivers/mtd/spi-nor/spi-nor.c | 9 ++++++--- include/linux/mtd/cfi.h | 1 + include/linux/mtd/spi-nor.h | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index f028277..33a55bc 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -271,6 +271,7 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info, u8 cmd; switch (JEDEC_MFR(info)) { + case SNOR_MFR_ST: case SNOR_MFR_MICRON: /* Some Micron need WREN command; all will accept it */ need_wren = true; @@ -1096,7 +1097,7 @@ static int spi_nor_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) { "mx66l1g45g", INFO(0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, - /* Micron */ + /* Micron <--> ST Micro */ { "n25q016a", INFO(0x20bb15, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q032", INFO(0x20ba16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, { "n25q032a", INFO(0x20bb16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, @@ -2502,6 +2503,7 @@ static int spi_nor_init_params(struct spi_nor *nor, params->quad_enable = macronix_quad_enable; break; + case SNOR_MFR_ST: case SNOR_MFR_MICRON: break; @@ -2876,8 +2878,9 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, mtd->_resume = spi_nor_resume; /* NOR protection support for STmicro/Micron chips and similar */ - if (JEDEC_MFR(info) == SNOR_MFR_MICRON || - info->flags & SPI_NOR_HAS_LOCK) { + if (JEDEC_MFR(info) == SNOR_MFR_ST || + JEDEC_MFR(info) == SNOR_MFR_MICRON || + info->flags & SPI_NOR_HAS_LOCK) { nor->flash_lock = stm_lock; nor->flash_unlock = stm_unlock; nor->flash_is_locked = stm_is_locked; diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 9b57a9b..cbf7716 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h @@ -377,6 +377,7 @@ struct cfi_fixup { #define CFI_MFR_SHARP 0x00B0 #define CFI_MFR_SST 0x00BF #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ +#define CFI_MFR_MICRON 0x002C /* Micron */ #define CFI_MFR_TOSHIBA 0x0098 #define CFI_MFR_WINBOND 0x00DA diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index c922e97..f43bfc5 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -23,7 +23,8 @@ #define SNOR_MFR_ATMEL CFI_MFR_ATMEL #define SNOR_MFR_GIGADEVICE 0xc8 #define SNOR_MFR_INTEL CFI_MFR_INTEL -#define SNOR_MFR_MICRON CFI_MFR_ST /* ST Micro <--> Micron */ +#define SNOR_MFR_ST CFI_MFR_ST /* ST Micro */ +#define SNOR_MFR_MICRON CFI_MFR_MICRON /* Micron */ #define SNOR_MFR_MACRONIX CFI_MFR_MACRONIX #define SNOR_MFR_SPANSION CFI_MFR_AMD #define SNOR_MFR_SST CFI_MFR_SST From patchwork Fri Aug 31 08:56:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10583439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63BFB17DB for ; Fri, 31 Aug 2018 08:58:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 544032B160 for ; Fri, 31 Aug 2018 08:58:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 489322B16C; Fri, 31 Aug 2018 08:58:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEED42B160 for ; Fri, 31 Aug 2018 08:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbeHaNEz (ORCPT ); Fri, 31 Aug 2018 09:04:55 -0400 Received: from mail-ve1eur01on0042.outbound.protection.outlook.com ([104.47.1.42]:65440 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727222AbeHaNEz (ORCPT ); Fri, 31 Aug 2018 09:04:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xoM/W/pnDrDICSM03ZPdfkhcJ/XaOury2+BzaFD0U2Q=; b=Zv0SwOSdj308we5uB3hGqcvkkE/pYkoiuyNZapPFOaE/EDU8q9b/AWZtSsmXpvWQzgP6lVyUDZaYcGUxpCjVGYavjxof2hK23/PsXfFhG2rj4Sue8hiHqhQBdVx9ldb5gkw7AUxBzrFr82RFBWWKqX+LvDX+2vUgHEE+dioe+O8= Received: from idcbfarm.ap.freescale.net (14.143.30.134) by HE1PR04MB1035.eurprd04.prod.outlook.com (2a01:111:e400:581a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Fri, 31 Aug 2018 08:58:08 +0000 From: Yogesh Gaur To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com, linux-spi@vger.kernel.org, marek.vasut@gmail.com Cc: computersforpeace@gmail.com, frieder.schrempf@exceet.de, linux-kernel@vger.kernel.org, david.wolfe@nxp.com, Yogesh Gaur Subject: [PATCH 2/2] mtd: spi-nor: add entry for mt35xu512aba flash Date: Fri, 31 Aug 2018 14:26:03 +0530 Message-Id: <1535705763-26369-3-git-send-email-yogeshnarayan.gaur@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535705763-26369-1-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1535705763-26369-1-git-send-email-yogeshnarayan.gaur@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: SG2PR0302CA0018.apcprd03.prod.outlook.com (2603:1096:3:2::28) To HE1PR04MB1035.eurprd04.prod.outlook.com (2a01:111:e400:581a::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3522eed4-8500-4309-c27f-08d60f1fe16b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:HE1PR04MB1035; X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;3:MP4OjZXM65e6xbAueRYgjiR6wlL++uNAH+hPIo3Q0YMeXOxvIUohjeBdtyGXH6palvsOzux5i8AYf7AhU7z/eJK5UMzaVPRFPFwx+iihP8jObh7DEfnmqo34eGtyt5ysq0EvFb+VJTfotBJseXxV4eyjshKxghRNn7UbmHmFgHX8w4Qu2k+oZB1VO964tuPO3yQ1TVgNLc9+uN3u4k0Ru2sUJyofZEgOIVVAzz3/7TGfNnyH4kkmTTD/jBqcqy5v;25:yxi+aw98Wpp4gEuqXyZt/8wusn5zzwBJ0MHHhwV/jmVFGOiqel3Ye7xwhRQs6OO9yJOKFfKmm4g6sBmDlAc7ExE8PnUxLunV29YC10YECrjXQ16Q5w+fmDWFjQMuVQCM7maNK7D2N0s1JT4VkRP/fxHDYeN8tbf9FLJ4FD6EVFo/4vWjEQ82GJiPDhRSR1NRkhQc9NOGI+vuPINnlh0e2lIB3kWYIcV8sdm6d5iAhPEryo1YWH61jIRxzx1fccWcy8xqJyWN4L8Ukubjkol7pjgfN1y0aOp4RrCycwPuaVRAWJ9JUqTAtstfZQpTLIp92oci2Huc2dEpdC88iQMDDA==;31:k2wUqufSdHCeTkr6q928auKHFulF4aGMqlQqbCJOtUzUtNJccW2YyiFV7qH4Zuoc05Rcu7BmPxzYTXur+KcUDE9w2HiT8V9FOF0ujNMoO5df0aeyP2z+RjFhP5jR4p80gXXg+yVnVCM0w2+/8yBMlB3zeAC/bok9OqBJlESY6CpeIHp/LncRjt80ZpDYePQai4Dv2+Hnhp5SXmLWN0PxqFsec2dGMBuMMI9bHQ0eFlY= X-MS-TrafficTypeDiagnostic: HE1PR04MB1035: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;20:PouOBArss6EW67C3t6/7BjzpBnw5RS3BtEp/nTN/y0xZXNcZvDuIrrurFTGoXndxGtIwHP2Q7WCiieDucfrCzh8ynEv/Q6zmNSdMeQz1MTayXIB+6NCjBWeoxk91Cn4YOi3Ipn/7KQqm5Ify0oQ0OmE4idE+jRhDwgNHMGCJftv4pxEzisUqOdUgvleNeuD+7Lrliii/Erw7bp/yCYbcijBfct4zOyvZAEl4/B8spX34JTc9xRdHn4WB+PnhP8iNf2beiHr4X9FfkyADV6j2R5dPh0HoinA9iJd3bACbq0gzQh+2aQ7hKvChQs0srTjuVuD66LHQgTYw19dbn7A0FsoKCnXmBeYM863s9tNk74ETbFaCfdjEppGPbEflvA+pwOQ+yajeGo1aBZTQPSgq3dPIWOAN0PbbrQsD9gEAJieTZAar/IuVoIrJop3O3faa4F8Cl9xzryfY+8V9O5Enyz1IYUhd7IMV/YbrvDC7kqLQFOZa4bAxgqJGCodlz2b+;4:QqAgOOk9GbA2OhVB9aaHs/05KP7dpDjYt/ZJb38CntARgQITbOU8filM7A9ZWeTYyyR9sjhKjHg8Jp7vMpv2BMceyxYUJyb9ivM17XAUn+BPhme+8QOlXrS5DYcrzTl4FySg0ojRWp1WklTKk/0EFO2H2AWgeSksUCE87VuJ2ZQu8LoClrWYimkYB1ytfaqhxIkTAx83jON//Gw/lgUPqIc59jO8KoD/MKXbV/tjollO2grNKQ9RNuI7535fulMGQuwg4Shmi+bslxN2pcZHG790zQc1v+DTf6DFoJDD7Ci1fQck5jZapnqZ2Rlr1Ray X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:HE1PR04MB1035;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1035; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(136003)(366004)(39860400002)(189003)(199004)(55236004)(8936002)(16526019)(186003)(26005)(97736004)(8676002)(81166006)(5660300001)(6512007)(39060400002)(4326008)(86362001)(50226002)(6486002)(52116002)(48376002)(51416003)(76176011)(5009440100003)(6666003)(305945005)(7736002)(386003)(6506007)(14444005)(956004)(2616005)(476003)(11346002)(446003)(68736007)(478600001)(66066001)(47776003)(486006)(16586007)(316002)(36756003)(53936002)(81156014)(25786009)(3846002)(50466002)(6116002)(2906002)(106356001)(105586002)(110426005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1035;H:idcbfarm.ap.freescale.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;HE1PR04MB1035;23:0M/Cp4uZ9PmW8ufIUzmPU5gR4k1NhKzRMs4Lgpz6zrYyQGTUaS+QTcNVhRz65v9EY9tpXnWAWaWqz8Hm3wBgsumJi35TCeS4sCs4qImQzj8w8bYGyIhPrQZDs8J+9wIQiEioj9XehEyhpGK5eYi65d6qmvr9cJFwCM8Ssg8cW8KyT1DCEN1vw5NeUhR079zahnb3t2Vo/poYyc9oDl74glYZMYJV/GABCTyi18B4AYiWdrmOEw3XLHvK70qyPtJuuazKetPxeroxeo5bhyuXEn73S2IHUn0gVAf8enokyMZUNzCmZf69all+y2g0brv8Xbu6R0EfzVDSHl6L43yCfykqAc1GBreaqRLQC/vwA2RxyxqJOH9hZ0FslGitvYz7xPZvzjx7zLPP2H+9bl73Ytf+B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kXtQMxrI7RizmvZfD/matJAJWZL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 08:58:08.6561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3522eed4-8500-4309-c27f-08d60f1fe16b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1035 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add entry for mt35xu512aba Micron NOR flash. This flash is having uniform sector erase size of 128KB, have support of FSR(flag status register), flash size is 64MB and supports 4-byte commands. Signed-off-by: Yogesh Gaur --- drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 33a55bc..6042df8 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -1113,6 +1113,9 @@ static int spi_nor_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) { "n25q00a", INFO(0x20bb21, 0, 64 * 1024, 2048, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, { "mt25qu02g", INFO(0x20bb22, 0, 64 * 1024, 4096, SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | NO_CHIP_ERASE) }, + /* Micron */ + { "mt35xu512aba", INFO(0x2c5b1a, 0, 128 * 1024, 512, SECT_4K | USE_FSR | SPI_NOR_4B_OPCODES) }, + /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) },