Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3838910imm; Mon, 25 Jun 2018 05:33:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKImkDbeLQes62/CbmXdxaMRQaE6IjhqvVBsd+qbSkNhnxmWknGA4iFwgf1PZCX7LGgZiMF0 X-Received: by 2002:a62:4359:: with SMTP id q86-v6mr12998594pfa.140.1529930029938; Mon, 25 Jun 2018 05:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529930029; cv=none; d=google.com; s=arc-20160816; b=uvWai/pqudOaE3BM7Bogwc9lkRR0Ug6G25rQMRWZvsmWQ48QAWhbAfyHL1WeSZc52I /DdTUxOnB4lbu3gIai4IRmvcOsdekjo1Rm+WqoJSFQhC68rRCSiASu0TvxKfBkbH9s+x JaHN+cD7rAsslxWvrqgQ5FMxkUi7Ls7pQ1TY1oGBz3brU0+RIWNqVFhZQu7JVgeE1cl9 eg8lWBVYAbKdHTG6nQzNIAeXahPv4J2WHavp32kyJB3aogWAmnGcpig3A6l4Njcv8hbq rVUkBnLO0RyKdiFQP0Jf56qMyIUI4Oa5WF7RpuRhLyvy3XI7FHfurJYxnh8St5GGY9YA xTig== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=Y2Q1eX1ZUeVK/DsnADtBq1J6pvUyzYnHYHNIvstUpUk=; b=Og+T1t6u6F+KEJwE/2C/XihBLpvLmd3qKiXLlM6ukK5G9YTH6l+QKkUY396N1AdEDF e2ZnVuhJZM8EEEsGrfYWUXVI4Zi4XEO7xz4WRTQ2Zcj9Wems738NAfUNWLXKDQKMm2sq Fqvuj0qEPx17V3ubr5hJByvAg3MyXq411ZRZb2o+RQYgZZVoCDzQblfhV76VUydyEEbf 7UfA3Doa2za7+hBYCg/7074DuhAsx2mxyvjfzkFY+VDn2mFn2YTb8hJklDCdkfhT8lBo weso2GdCDjS1ydHOY0g7PtBq7SSsHjcVS0tMawDmR8bRRI0aY4OsP4GiyXHeiDRPrxW0 ZZ1A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si14775070pfb.70.2018.06.25.05.33.35; Mon, 25 Jun 2018 05:33:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933391AbeFYMc7 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Jun 2018 08:32:59 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46503 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932387AbeFYMc6 (ORCPT ); Mon, 25 Jun 2018 08:32:58 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id D1EE220719; Mon, 25 Jun 2018 14:32:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from xps13 (AAubervilliers-681-1-87-188.w90-88.abo.wanadoo.fr [90.88.29.188]) by mail.bootlin.com (Postfix) with ESMTPSA id 8E261203D9; Mon, 25 Jun 2018 14:32:56 +0200 (CEST) Date: Mon, 25 Jun 2018 14:32:56 +0200 From: Miquel Raynal To: Chris Packham Cc: boris.brezillon@bootlin.com, dwmw2@infradead.org, computersforpeace@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 0/6] mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F Message-ID: <20180625143256.6b7bf802@xps13> In-Reply-To: <20180624224448.21872-1-chris.packham@alliedtelesis.co.nz> References: <20180624224448.21872-1-chris.packham@alliedtelesis.co.nz> Organization: Bootlin X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chris, On Mon, 25 Jun 2018 10:44:42 +1200, Chris Packham wrote: > Hi, > > I'm looking at adding support for the Micron MT29F1G08ABAFAWP-ITE:F chip > to one of our boards which uses the Marvell NFCv2 controller. > > This particular chip is a bit odd in that the datasheet states support > for ONFI 1.0 but the revision number field is 00 00. It also is marked > ABAFA but reports internally as ABAGA. Finally it has internal 8-bit ECC > which cannot be disabled. > > The existing test in micron_supports_on_die_ecc() determines that on-die > ECC is supported but not mandatory but I know for this chip it is > mandatory despite what set_features returns. > > In order for this to work I need to set nand-ecc-mode = "on-die" in my > dts. Ideally I'd like it to be automatic based on what the hardware can > support but that may be asking too much at the moment. > > Here's a dump of the parameter page from the chip I have > > 00000000: 4f 4e 46 49 00 00 18 00 3f 00 00 00 00 00 00 00 ONFI....?....... > 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00000020: 4d 49 43 52 4f 4e 20 20 20 20 20 20 4d 54 32 39 MICRON MT29 > 00000030: 46 31 47 30 38 41 42 41 47 41 57 50 20 20 20 20 F1G08ABAGAWP > 00000040: 2c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ,............... > 00000050: 00 08 00 00 80 00 00 02 00 00 20 00 40 00 00 00 .......... .@... > 00000060: 00 04 00 00 01 22 01 14 00 01 05 08 00 00 04 00 .....".......... > 00000070: 08 01 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00000080: 08 3f 00 3f 00 58 02 10 27 46 00 64 00 00 00 00 .?.?.X..'F.d.... > 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 000000a0: 00 00 00 00 01 00 00 00 00 02 04 80 01 81 04 03 ................ > 000000b0: 02 01 1e 90 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 a6 ................ > > Series changes in v3: > - No longer RFC > - dropped "mtd: rawnand: micron: add ONFI_FEATURE_ON_DIE_ECC to supported > features" which Boris has already picked up > - dropped "mtd: rawnand: marvell: Support page size of 2048 with 8-bit ECC" > since I can't test it. > > Series changes in v4: > - based on top of http://patchwork.ozlabs.org/patch/932006/ > > Series changes in v5: > - address review comments from Boris on patches 5 and 6 > > Series changes in v6: > - Update commit message on 6/6 > > Chris Packham (6): > mtd: rawnand: marvell: Handle on-die ECC > mtd: rawnand: add manufacturer fixup for ONFI parameter page > mtd: rawnand: add defines for ONFI version bits > mtd: rawnand: micron: add fixup for ONFI revision > mtd: rawnand: micron: support 8/512 on-die ECC > mtd: rawnand: micron: detect forced on-die ECC > > drivers/mtd/nand/raw/marvell_nand.c | 1 + > drivers/mtd/nand/raw/nand_base.c | 14 +-- > drivers/mtd/nand/raw/nand_micron.c | 129 +++++++++++++++++++++++----- > include/linux/mtd/rawnand.h | 14 +++ > 4 files changed, 131 insertions(+), 27 deletions(-) > Applied to nand/next, I just changed the way you aligned/not aligned some lines to respect the 80 columns rule. Thanks, Miquèl