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 78E1AC433F5 for ; Wed, 29 Sep 2021 15:10:47 +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 03B6961407 for ; Wed, 29 Sep 2021 15:10:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 03B6961407 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 BA60881F0D; Wed, 29 Sep 2021 17:10:41 +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="H8pWvrtD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CC10280607; Wed, 29 Sep 2021 17:10:13 +0200 (CEST) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (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 7CFAF8187B for ; Wed, 29 Sep 2021 17:09:59 +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-oi1-x236.google.com with SMTP id w206so3281807oiw.4 for ; Wed, 29 Sep 2021 08:09:59 -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=Vg5j85HOMYUqSuOAMpiptFhNPfOV7oDi/A7WS6yPrfs=; b=H8pWvrtD6ZE1sk63Oq1+y2aL63WXawcyCBzu5t8tQ9sC/5PmlMs1AKjL3SKLyYWTzL 6rwZb0cFyuOmPVjQOEXma638+wd4U9hX4AiwfaBe5/VXhjnjkLd33K/WRUPRLpZ4QyUb ROEK7pTxkhRHzA6PL52qe7iVxTb/u9bv84Kvvy+QhPlm+LHIklx1drazS2X5m8dqdet1 lCIVCRLDTMgPQZ7ouQaxUFW8sAwsiGavkU/p3ExFofibtDgv4wa/o2zQRuQySPPVO5Zw h0hs8eYQzuK0/h0Mda5kXiNR42nE3pv97fTsknbkEYGD/UrpVRFqZ8f05aUSOjfeHC82 oxtA== 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=Vg5j85HOMYUqSuOAMpiptFhNPfOV7oDi/A7WS6yPrfs=; b=dQXxoZyDcF/30ytr375qPofk0+kVku7Rit2xdpBDgvv5g7YXvJCvAxMnIraQvmJCKR wHTfbfO0WImhI1I5istKBKoWLZN1RnCtAcnbI/Pc58SsJZgfqHWET13l4XoUHbbPmbL4 QfOb77XTkVo6kAQyp+Cfz6eSN6yrHTIdjr8RywaKJ3/dHOhz6RO1ywfBpEdGeYAxdYkO 6I4bZpXNmuizi6W4omXhaMquP8EHRH0tRyMVlYbw6krHibZ18RzyT6Coj+oohqJOQ6Iu QRxPdJPI+nzldDkMgpAawXJ57O2KtkxVibL4eXhKKPgkqix6/AetH6Gx7U7vzlqPFWgG DtiQ== X-Gm-Message-State: AOAM532XW6hQLIxf9USoneDEnn/Vr9dglQYnlsUcXlVSiX6o8OEtnMcK fIOkozrSbbKcg1bSFYFos+d252OuM70= X-Google-Smtp-Source: ABdhPJzibwKM0UXzMBdz8WdG90NKQ6jfTIKPYViRfTlxD2H+1nUJjVEOHk+/Id3RRR7hqCkolkZPNA== X-Received: by 2002:a05:6808:209b:: with SMTP id s27mr8285131oiw.168.1632928197820; Wed, 29 Sep 2021 08:09:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 08:09:57 -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 2/3] mtd: Add pairing info for Toshiba TC58TEG5DCLTA00 NAND Date: Wed, 29 Sep 2021 10:09:48 -0500 Message-Id: <20210929150949.198-3-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 Toshiba TC58TEG5DCLTA00 NAND so that we may utilize slc-mode emulation for enhanced reliability and compatibility with upstream Linux. Signed-off-by: Chris Morgan --- drivers/mtd/nand/raw/nand_base.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 9e50dce40b..70b4a76bad 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4546,6 +4546,15 @@ ident_done: break; } + /* Enable slc-mode on TC58TEG5DCLTA00 to enable upstream Linux */ + if (id_data[0] == NAND_MFR_TOSHIBA && id_data[1] == 0xd7 + && id_data[2] == 0x84 && id_data[3] == 0x93 + && id_data[4] == 0x72 && id_data[5] == 0x51 + && id_data[6] == 0x08 && id_data[7] == 0x04) { + 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