Received: by 10.192.165.148 with SMTP id m20csp281351imm; Fri, 4 May 2018 10:12:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzk1RWkT9heDva5AMXRmBVpH9Un3QzyA4avEDHh4S1P7uiwaqcblmDJx4jbbkDSq8QEcpb X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr3398206plg.229.1525453920480; Fri, 04 May 2018 10:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525453920; cv=none; d=google.com; s=arc-20160816; b=PbUcuQeR55EBCx50LlHp1GH+6Er+YpPoar+5TAL2fxEvkY5rJoRMgAqhQP4Jir/rDw WQzERXEAamg9LauiZJfY6dzLA4KOLKKMAvaM51aTFfYXXXy4ZIvejSFfsbdqUCWr7IPS L8wlePmBIGoil0gJKM3QDImwTfF4tbD6Qphw+DNV8GQvcZCFL8G2Kq7hKoH0ipcOtu7o w+ku9DhfRB4YtUzmHLeQVOo6B2eRgJOxxAF8WST21/+OlDhR3+cSpoxcK0x12GSinCcR 0XOfYemqThb5MF9gwUcBS4dESAIEpQE+q0Pgg8NS9lKa9PB4uILPVxbdQvWbgZRimtgO d3tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Uh4tf4SyLZoRiybbBAPeRAJ7LnqBm0QWz2aWERy1P5c=; b=LpPaqaUWoiDGjxmtE3PcoM/Rfxu1gkvwxDn4uoDsJAI3JJ6cXCMvhEzGCGS6HUdYgz AIXfu/q+LW5J4kXgfCLq4zLbD7iKKDCpTVgGmjDRm/gED7dOr/dRufx2xUUWK/1PqtrW orXN8FSGfkyujb4lhltzfcztRxfFtTXLOSzCuT06Gj6ucoJgKKVaH9t9JV+gtOKK6Tye 754NxEwkygReYQWRbzhjTDH1dxYQQWTP3TOtJWAvjRRR/N60w5NRYMyLRb0EDGIJg+2B zr3hDFJQjBlVG6Cdfs3r05+NoDjvEcNm50O2JiPGXdt7Nu6FSbCk+ehD5eXM0k7jvF1d rdnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rQ931qFd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si16281033pfs.91.2018.05.04.10.11.45; Fri, 04 May 2018 10:12:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rQ931qFd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbeEDRL3 (ORCPT + 99 others); Fri, 4 May 2018 13:11:29 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35592 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbeEDRL2 (ORCPT ); Fri, 4 May 2018 13:11:28 -0400 Received: by mail-wr0-f196.google.com with SMTP id i14-v6so18634096wre.2 for ; Fri, 04 May 2018 10:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Uh4tf4SyLZoRiybbBAPeRAJ7LnqBm0QWz2aWERy1P5c=; b=rQ931qFd7FVzL3g6AHd63bcuK7YBHxyFBpyr49ZzyWVFTyqGBFaUBQmP2NzP3FdXg8 GHO6TjYarrw4e6j/8irOn8UElvMuXil9TAhRG1ehewmSYJvXT3ls9nQaOsywSP3CRhjE tEa8eKtn7Ua1fsPZGBBg48npKBRyA+lS01+pvX2E1QdfzWctAa7IqQuel6c/NhDZyjtF tIaBs2aYoqAk3eK7g/31V6Js8RZo+sP0U5IcZd2/qx0gYW1szEvGqUKDRUDcr0+uPB56 0UsBUA33rjFzZQInZFt6akm9D/KzqCFdzsTdxj35XrkElkRhYAdCgBl6UzWrfRK0Zg9B sUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Uh4tf4SyLZoRiybbBAPeRAJ7LnqBm0QWz2aWERy1P5c=; b=cdvOOr6/vFiG34IxhrlutwNiri6d4Lyoij48v4jri2tykvKIj9HzaUc8rBFlmTRgDx rUn4xPTDn96wsddRKL6lBLvTz8gLQK8EOWhre5fkwKZwHpyRKd7XbpAXbr3X71hKjPN+ S8MDPe29eRHkiQ0F6ZQuhg5obGPpSw+nqx71eCzxCJzDQK5q0IEqOcT9e5FsS82BoHmU l2+LQMxeRg0kWCgsSeFRc6qY4FgbycOn1G4fPg81TqOc7n4GsVA3kTo/57P2TjG1FeRd /zz1i/QeaOsruVVW4oEtWlxadD5trqFLWq3R3w7FHo98Zak+QnYdjE0OpjK0mrMSJ2nQ +RYg== X-Gm-Message-State: ALQs6tCpAUhWGB1Z8facrKtv+vJpVxQy7fD9iWX+oezRrOjBN4BkVEmS gu24nP5+hKpvme4efHgqN3I= X-Received: by 2002:adf:c362:: with SMTP id e31-v6mr21361832wrg.257.1525453886911; Fri, 04 May 2018 10:11:26 -0700 (PDT) Received: from [192.168.1.4] (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id z7-v6sm16250981wrg.56.2018.05.04.10.11.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 May 2018 10:11:26 -0700 (PDT) Subject: Re: [PATCH] mtd: spi-nor: add support for Microchip 25LC256 To: Radu Pirea , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Cc: Zhiqiang.Hou@nxp.com, pp@emlix.com, richard@nod.at, boris.brezillon@bootlin.com, computersforpeace@gmail.com, dwmw2@infradead.org References: <20180504155404.5285-1-radu.pirea@microchip.com> From: Marek Vasut Message-ID: Date: Fri, 4 May 2018 19:11:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180504155404.5285-1-radu.pirea@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2018 05:54 PM, Radu Pirea wrote: > Added geometry description for Microchip 25LC256 memory. Are you sure this is a SPI NOR ? I don't see any RDID instruction in the datasheet, only some 6 instructions to read/write the array and lock it. Isn't the AT25 driver a better fit for this EEPROM ? > Signed-off-by: Radu Pirea > --- > drivers/mtd/devices/m25p80.c | 3 +++ > drivers/mtd/spi-nor/spi-nor.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c > index a4e18f6aaa33..1e359d811261 100644 > --- a/drivers/mtd/devices/m25p80.c > +++ b/drivers/mtd/devices/m25p80.c > @@ -372,6 +372,9 @@ static const struct spi_device_id m25p_ids[] = { > { "mr25h10" }, /* 1 Mib, 40 MHz */ > { "mr25h40" }, /* 4 Mib, 40 MHz */ > > + /* Microchip */ > + { "25lc256" }, > + > { }, > }; > MODULE_DEVICE_TABLE(spi, m25p_ids); > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index d445a4d3b770..6341c86be647 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -1076,6 +1076,9 @@ static const struct flash_info spi_nor_ids[] = { > { "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) }, > > + /* Microchip */ > + { "25lc256", CAT25_INFO(32 * 1024, 1, 64, 2, SPI_NOR_NO_ERASE | SPI_NOR_NO_FR) }, > + > /* Micron */ > { "n25q016a", INFO(0x20bb15, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_QUAD_READ) }, > { "n25q032", INFO(0x20ba16, 0, 64 * 1024, 64, SPI_NOR_QUAD_READ) }, > -- Best regards, Marek Vasut