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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EA15C433EF for ; Wed, 29 Sep 2021 15:10:35 +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 C4E8461246 for ; Wed, 29 Sep 2021 15:10:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C4E8461246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73C6D811CD; Wed, 29 Sep 2021 17:10:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QT6cqk6b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BF7D811CD; Wed, 29 Sep 2021 17:10:14 +0200 (CEST) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BE6AA81FA9 for ; Wed, 29 Sep 2021 17:10:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-ot1-x330.google.com with SMTP id 97-20020a9d006a000000b00545420bff9eso3242977ota.8 for ; Wed, 29 Sep 2021 08:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sBliQaLj7qXFfjhvys5sgwcT31obmGUvAebn3CezzHc=; b=QT6cqk6bXA66Bgxj+xRVLbj94Rqe3UPjyShvH26gN3AML1LimXDxePaJbnMOWwvr2C rlVFAROYgZSjBN//62lQ1Eh6FJ7UvKG6fAzgd8cSiOO8/Rq8vWKpzeeQQSFiZ0s/mS+7 BrlCtGZNZTLIdGCbZ6MfemK+4uBhTqM1/E5h3jCcvZUVdCkF1btfzFt75KzSZQvPlepn RMyZLyENUxZX35d6uLLlfgWPNres1+7GKhI0cL1QRScKDTzbRJ9l41idq+z+2ShMIDDa fU9/Q8e3EqqQdtBiLMwlN4E2c5paf8pmFQvWTD1y9dzFz/h3LnK4lxRVOIhXmtugRCin dBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sBliQaLj7qXFfjhvys5sgwcT31obmGUvAebn3CezzHc=; b=jRPyLv99x/xeY/2oNJsleQy7fD5E0zpd004A3nwDGKuJcp88s+THqaevXa8Z+ddw71 q/L3sF3G+fczFvyZ8B6R5CCCoOZfgE1sH8KIfbyIB10dv9IbS4eKot9SWhNHNNc00P8w nt3Lel7turFuEv/dgKnb1krU7nOM8ldE42hDLSegVRSUwIMgR8KuBVl0IhI2y0/96juR /u1W/Y+tbLypTBqHwJfegZxsA/H4Qw9sw9UA22CHGttr3QN+Gloub1Bf+t5W8eWwmoeX PYfwLxdCpRaAXOuYviXbyUehBjINTc2SrTD454cjll3UikxEXPpdc0O/K5DESYVgQLHm eiOg== X-Gm-Message-State: AOAM530oTwfFd860UZX8RRCGKxchg4yeF95vHD3mmHgutNA0BXsDqOFJ FlgfLNJTkfzcwQS1nDSUsef3LTurqUs= X-Google-Smtp-Source: ABdhPJxwGY75jmnrQ3ruRL3Mh/JxHEsl9bE6ghAC+QCaZqxF/eercnNWb3QSeKC/7JbAEOJGqGICXg== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr492287otc.300.1632928198920; Wed, 29 Sep 2021 08:09:58 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id p21sm3647oip.28.2021.09.29.08.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 08:09:58 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, marek.behun@nic.cz, xypron.glpk@gmx.de, miquel.raynal@bootlin.com, sjg@chromium.org, patrice.chotard@foss.st.com, farhan.ali@broadcom.com, Chris Morgan Subject: [RFCv3 3/3] mtd: Add pairing info for Hynix H27UCG8T2ETR NAND Date: Wed, 29 Sep 2021 10:09:49 -0500 Message-Id: <20210929150949.198-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210929150949.198-1-macroalpha82@gmail.com> References: <20210929150949.198-1-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Add pairing info for the Hynix H27UCG8T2ETR NAND so that we may utilize slc-mode emulation for enhanced reliability and compatibility with upstream Linux. I have checked with the team at #mtd and they can confirm based on a cursory reading of the datasheet for this flash chip it appears to use the same dist3 pairing scheme used by the Toshiba NAND which already supports dist3 today in mainline Linux. Signed-off-by: Chris Morgan --- drivers/mtd/nand/raw/nand_base.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 70b4a76bad..fc6ee36514 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4555,6 +4555,14 @@ ident_done: mtd_set_pairing_scheme(mtd, &dist3_pairing_scheme); } + /* Enable slc-mode on H27UCG8T2ETR to enable upstream Linux */ + if (id_data[0] == NAND_MFR_HYNIX && id_data[1] == 0xde + && id_data[2] == 0x14 && id_data[3] == 0xa7 + && id_data[4] == 0x42 && id_data[5] == 0x4a) { + chip->options |= NAND_NEED_SCRAMBLING; + mtd_set_pairing_scheme(mtd, &dist3_pairing_scheme); + } + if (chip->options & NAND_BUSWIDTH_AUTO) { WARN_ON(chip->options & NAND_BUSWIDTH_16); chip->options |= busw; -- 2.30.2