From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CF49C47082 for ; Mon, 7 Jun 2021 06:13:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A86161164 for ; Mon, 7 Jun 2021 06:13:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A86161164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 049068039D; Mon, 7 Jun 2021 08:13:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 4E8C080C68; Mon, 7 Jun 2021 08:13:22 +0200 (CEST) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5EC3980377 for ; Mon, 7 Jun 2021 08:13:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 895E8200004; Mon, 7 Jun 2021 06:13:16 +0000 (UTC) Date: Mon, 7 Jun 2021 08:13:15 +0200 From: Miquel Raynal To: zhengxunli@mxic.com.tw Cc: jagan@amarulasolutions.com, "Jaime Liao" , u-boot@lists.denx.de, vigneshr@ti.com, ycllin@mxic.com.tw Subject: Re: [PATCH] mtd: spinand: macronix: Add support for serial NAND flash Message-ID: <20210607081315.6cd0a079@xps13> In-Reply-To: References: <1622105472-10532-1-git-send-email-jaimeliao@mxic.com.tw> <20210527105845.40447cd4@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Hi zhengxunli@mxic.com.tw, zhengxunli@mxic.com.tw wrote on Mon, 31 May 2021 10:16:24 +0800: > Hi Miquel, >=20 > "Miquel Raynal" wrote on 2021/05/27 =E4=B8=8B= =E5=8D=88=20 > 04:58:45: >=20 > > "Miquel Raynal" =20 > > 2021/05/27 =E4=B8=8B=E5=8D=88 04:59 > >=20 > > To > >=20 > > "Jaime Liao" ,=20 > >=20 > > cc > >=20 > > u-boot@lists.denx.de, jagan@amarulasolutions.com, vigneshr@ti.com,=20 > > zhengxunli@mxic.com.tw, ycllin@mxic.com.tw > >=20 > > Subject > >=20 > > Re: [PATCH] mtd: spinand: macronix: Add support for serial NAND flash > >=20 > > Hi Jaime, > >=20 > > Jaime Liao wrote on Thu, 27 May 2021 16:51:12 > > +0800: > > =20 > > > Macronix NAND Flash devices are available in different configurations > > > and densities. > > >=20 > > > MX"35" means SPI NAND > > > MX35"LF"/"UF" , LF means 3V and UF meands 1.8V > > > MX35LF"2G" , 2G means 2Gbits > > > MX35LF2G"E4"/"24"/"14", > > > E4 means internal ECC and Quad I/O(x4) > > > 24 means 8-bit ecc requirement and Quad I/O(x4) > > > 14 means 4-bit ecc requirement and Quad I/O(x4) > > >=20 > > > MX35LF2G14AC is 3V 2Gbit serial NAND flash device > > > (without on-die ECC) > > > https://www.mxic.com.tw/Lists/Datasheet/Attachments/7926/ =20 > > MX35LF2G14AC,%203V,%202Gb,%20v1.1.pdf =20 > > >=20 > > > MX35UF4G24AD/MX35UF2G24AD/MX35UF1G24AD is 1.8V 4Gbit serial NAND =20 > > flash device =20 > > > (without on-die ECC) > > > https://www.mxic.com.tw/Lists/Datasheet/Attachments/7980/ =20 > > MX35UF4G24AD,%201.8V,%204Gb,%20v0.00.pdf =20 > > >=20 > > > MX35UF4GE4AD/MX35UF2GE4AD/MX35UF1GE4AD are 1.8V 4G/2Gbit serial > > > NAND flash device with 8-bit on-die ECC > > > https://www.mxic.com.tw/Lists/Datasheet/Attachments/7983/ =20 > > MX35UF4GE4AD,%201.8V,%204Gb,%20v0.00.pdf =20 > > >=20 > > > MX35UF2GE4AC/MX35UF1GE4AC are 1.8V 2G/1Gbit serial > > > NAND flash device with 8-bit on-die ECC > > > https://www.mxic.com.tw/Lists/Datasheet/Attachments/7974/ =20 > > MX35UF2GE4AC,%201.8V,%202Gb,%20v1.0.pdf =20 > > >=20 > > > MX35UF2G14AC/MX35UF1G14AC are 1.8V 2G/1Gbit serial > > > NAND flash device (without on-die ECC) > > > https://www.mxic.com.tw/Lists/Datasheet/Attachments/7931/ =20 > > MX35UF2G14AC,%201.8V,%202Gb,%20v1.1.pdf =20 > > >=20 > > > Validated via normal(default) and QUAD mode by read, erase, read back, > > > on Xilinx Zynq PicoZed FPGA board which included Macronix > > > SPI Host(drivers/spi/spi-mxic.c). > > >=20 > > > Signed-off-by: Jaime Liao > > > --- > > > drivers/mtd/nand/spi/macronix.c | 100 +++++++++++++++++++++++++++ =20 > > +++++++++++++ =20 > > > 1 file changed, 100 insertions(+) > > >=20 > > > diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/ =20 > > spi/macronix.c =20 > > > index 215f09a..8a33dce 100644 > > > --- a/drivers/mtd/nand/spi/macronix.c > > > +++ b/drivers/mtd/nand/spi/macronix.c > > > @@ -114,6 +114,106 @@ static const struct spinand_info =20 > > macronix_spinand_table[] =3D { =20 > > > &update_cache_variants), > > > SPINAND_HAS_QE_BIT, > > > SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)), > > > + SPINAND_INFO("MX35LF2G14AC", 0x20, > > > + NAND_MEMORG(1, 2048, 64, 64, 2048, 2, 1, 1), > > > + NAND_ECCREQ(4, 512), > > > + SPINAND_INFO_OP_VARIANTS(&read_cache_variants, > > > + &write_cache_variants, > > > + &update_cache_variants), > > > + SPINAND_HAS_QE_BIT, > > > + SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, > > > + mx35lf1ge4ab_ecc_get_status)), =20 > >=20 > > This looks like a copy of your previous patch, with the SPINAND_ID > > macro dropped. > >=20 > > It would be great if you could clarify your intentions when sending > > patches. This means: > > - Counting up patch versions > > - Explaining their differences and why > >=20 > > So, what is the purpose of this patch give the fact that I already > > applied one very similar yesterday? > >=20 > > Thanks, > > Miqu=C3=A8l =20 >=20 > Forward my colleague(Jaime)'s mail as below: >=20 > "It is grateful for your comments. >=20 > Two patches are different for linux kernel and u-boot. >=20 > In this u-boot patch, my purpose is add SPI-NAND IDs in u-boot. Sorry for the misunderstanding, I thought this was intended for Linux. > For patching reasonable, I have a question. >=20 > AFAIK u-boot didn't include sw-ecc engine. True. > Is it suitable for Flash which are sw-ecc requirement?" Not yet, if there are no on-die ECC engine the parts cannot be used in U-Boot yet. Thanks, Miqu=C3=A8l