Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbdFVN2a (ORCPT ); Thu, 22 Jun 2017 09:28:30 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:57706 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbdFVN23 (ORCPT ); Thu, 22 Jun 2017 09:28:29 -0400 X-IronPort-AV: E=Sophos;i="5.39,373,1493708400"; d="scan'208";a="3918413" Subject: Re: [PATCH] mtd: spi-nor: Add support for Spansion S25FL064L To: Harry Chou , CC: , , , , , , References: <1498135998-17788-1-git-send-email-HarryYC.Chou@gmail.com> From: Cyrille Pitchen Message-ID: <10af97e9-345f-ebc6-1dd9-7d556a366cfa@microchip.com> Date: Thu, 22 Jun 2017 15:28:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1498135998-17788-1-git-send-email-HarryYC.Chou@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1438 Lines: 43 Hi Harry, Le 22/06/2017 à 14:53, Harry Chou a écrit : > It's an 8 MiB flash with 4 KiB erase sectors. > > Signed-off-by: Harry Chou > --- > drivers/mtd/spi-nor/spi-nor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index dea8c9c..1f84765 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -1076,6 +1076,7 @@ static const struct flash_info spi_nor_ids[] = { > { "s25fl164k", INFO(0x014017, 0, 64 * 1024, 128, SECT_4K) }, > { "s25fl204k", INFO(0x014013, 0, 64 * 1024, 8, SECT_4K | SPI_NOR_DUAL_READ) }, > { "s25fl208k", INFO(0x014014, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ) }, > + { "s25fl064l", INFO(0x016017, 0, 64 * 1024, 128, SECT_4K) }, > According to the Cypress datasheet, this memory part number supports Fast Read: - Dual Output (SPI 1-1-2) - Dual I/O (SPI 1-2-2) - Quad Output (SPI 1-1-4) - Quad I/O (SPI 1-4-4) http://www.cypress.com/file/316661/download So you should also add the 2 flags SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ in addition to SECT_4K and also the flag SPI_NOR_4B_OPCODES since this part number also supports the 4-byte address instruction set. Best regards, Cyrille > /* SST -- large erase sizes are "overlays", "sectors" are 4K */ > { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024, 8, SECT_4K | SST_WRITE) }, >