From patchwork Tue Jun 19 05:31:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 931416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=alliedtelesis.co.nz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cwcsw+b6"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="G6wxSZ+i"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418xpF04sYz9rxs for ; Tue, 19 Jun 2018 15:48:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=vCmIDzz5wsRqcSTgahXRD7U8l7eJtUQOECt7w7GVn8o=; b=cwc sw+b6Srr9FXnBbnxUSURNvB+dKzox6/xE3hi0LYCm2f1bzXR5RvuU1dBysiLwS1hdfDnoeAmDvej5 0NLqvHZmAUUIuNd1TNNpjQ16Dg6HWJfBxgZAoHkqiJcSWLX9hMMsd1bOZ+9igg70FyC/9IF3F1r8g zf6XhAeyPCzLNoIU07+yT4SDzoeSk2NP/djtyGxJwsSS99GaIit6c8dU6WaBUHr0BPUVxp3Zvd84e 7kvozVnj6HT6iqaQyaiV++NIfAAdR2aU3PBvH/+siStFwDTHgbDmY9WZukWD6wS0JvXbYrr1ninzt 02n36sImvbC77GHXoapQ6e0zqYav1bw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fV9V1-0005lk-V7; Tue, 19 Jun 2018 05:48:15 +0000 Received: from gate2.alliedtelesis.co.nz ([2001:df5:b000:5::4]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fV9FK-0005wr-Da for linux-mtd@lists.infradead.org; Tue, 19 Jun 2018 05:32:04 +0000 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 420AE800E6; Tue, 19 Jun 2018 17:31:36 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1529386296; bh=gtOFZrCEbPq2FHKvbmVhauPPiPV97AvOKRG434gLOaw=; h=From:To:Cc:Subject:Date; b=G6wxSZ+i1EXrlyYQKPQwbcZkGpqqL1X+c2kBGgCRcbotIxP3JIF1gQCGJsV43JcJb kpY7uXvwgebPvf9nsVWm0klTJBKvWLOF2VVPZeHBcwX9G2nn9SmyqDsGh1lnwDtGAE m61b4n9piDRkDGKiUcBwCLUMykmXMmewxa0rj32g= Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 8, 10121) id ; Tue, 19 Jun 2018 17:31:36 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id D078713EEAD; Tue, 19 Jun 2018 17:31:38 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id B1F371E2626; Tue, 19 Jun 2018 17:31:35 +1200 (NZST) From: Chris Packham To: miquel.raynal@bootlin.com, boris.brezillon@bootlin.com, dwmw2@infradead.org, computersforpeace@gmail.com, linux-mtd@lists.infradead.org Subject: [RFC PATCH v2 0/6] mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F Date: Tue, 19 Jun 2018 17:31:19 +1200 Message-Id: <20180619053125.16792-1-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180618_223202_862631_77C19055 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Packham , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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. I think I need to do some re-testing on other Micron parts so this series is still RFC. Although the first 3 patches are probably good to go. 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 ................ Chris Packham (6): mtd: rawnand: marvell: Handle on-die ECC mtd: rawnand: add manufacturer fixup for ONFI parameter page mtd: rawnand: micron: add fixup for ONFI revision mtd: rawnand: marvell: Support page size of 2048 with 8-bit ECC mtd: rawnand: micron: add ONFI_FEATURE_ON_DIE_ECC to supported features mtd: rawnand: micron: support 8/512 on-die ECC drivers/mtd/nand/raw/marvell_nand.c | 2 ++ drivers/mtd/nand/raw/nand_base.c | 4 ++++ drivers/mtd/nand/raw/nand_micron.c | 18 ++++++++++++++---- include/linux/mtd/rawnand.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-)