From patchwork Wed Apr 20 10:40:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_B=C3=B6hler?= X-Patchwork-Id: 1619463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=397E1kmN; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=aboehler.at header.i=@aboehler.at header.a=rsa-sha256 header.s=default header.b=TL/5qnLd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kjxzt58tHz9sFq for ; Wed, 20 Apr 2022 20:41:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=Uk6onRADelYXYM2w5ywWE43awxNuoI22y0MRjz6goa8=; b=397E1kmN5pIylq 1Z3rrRdh0cdGfz6m1EdIMGYGRnFmv6JbEX8JFyhg/86uT4IYHw1QgQsFTROEhD4uMzlibRgMEgsrk kUTMcyN71FEQ6VN/QytsUIJaD95gcMCPy9SffHI5Rpe/puDreVna7n8AO90klB8n7f3O70zjwwniN R0917/vQxx0Fl9/0aFDBTd1ZX88/G7nd6NPZTs6JUZOT0H/HwKqNZVzobhQMQZu1rYu2mJj8EDteg SELCP8GdUjnszgCVNokc0ahXspwhgs5IsBSH/tLmC3yMw661z3OfScNQcqsBeZusZaez5yDHik1+F S1SbmGYQQPEq4hoJUYKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh7lb-008f8g-Ht; Wed, 20 Apr 2022 10:40:59 +0000 Received: from mail.aboehler.at ([2a01:4f8:121:5012::2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh7lX-008f5p-Mm for linux-mtd@lists.infradead.org; Wed, 20 Apr 2022 10:40:58 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.aboehler.at (Postfix) with ESMTP id 41FB13CC0289 for ; Wed, 20 Apr 2022 12:40:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aboehler.at Received: from mail.aboehler.at ([127.0.0.1]) by localhost (aboehler.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZE5pFiHcnUxz; Wed, 20 Apr 2022 12:40:48 +0200 (CEST) Received: from x390y.edu.htl.org (195-70-113-54.stat.salzburg-online.at [195.70.113.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: andreas@aboehler.at) by mail.aboehler.at (Postfix) with ESMTPSA id 70BC23CC0287; Wed, 20 Apr 2022 12:40:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aboehler.at; s=default; t=1650451248; bh=icoQ9B8gdEZ9kuw0ELXOY7HFRQEXJJRehHwSCeab3TQ=; h=From:To:Cc:Subject:Date:From; b=TL/5qnLdomV1+2iVWoObjaLA0dS5eh49g5Q+1Cz7MZhWOZYgdTK9wcYWVnpZ5z+bh TR2t/c/9+yquinZW+BLeQ7YDsrc28rPkBNHzNK32x/FYGbzL50hn2npvQsvgd67Da7 tt97cGRIre1zdX8sac6b1wzGf9NYXJ987PhO1eMY= From: =?utf-8?q?Andreas_B=C3=B6hler?= To: linux-mtd@lists.infradead.org Cc: =?utf-8?q?Andreas_B=C3=B6hler?= Subject: [PATCH] mtd: rawnand: add support for Toshiba TC58NVG0S3HTA00 NAND flash Date: Wed, 20 Apr 2022 12:40:34 +0200 Message-Id: <20220420104034.6333-1-dev@aboehler.at> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_034056_256354_B6385AE5 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__The_Toshiba_TC58NVG0S3HTA00_is_detecte?= =?unknown-8bit?q?d_with_64_byte_OOB_while?= =?unknown-8bit?q?_the_flash_has_128_bytes_OOB=2E_This_adds_a_static_NAND_ID_?= =?unknown-8bit?q?entry_to_correct?= =?unknown-8bit?q?_this=2E_Tested_on_FRITZ!Box_7530_flashed_with_OpenWrt=2E_S?= =?unknown-8bit?q?igned-off-by=3A_Andreas?= =?unknown-8bit?q?_B=C3=B6hler_=3Cdev=40aboehler=2Eat=3E_---_drivers/mtd/nand?= =?unknown-8bit?q?/raw/nand=5Fids=2Ec_=7C_3_+++_1_file?= =?unknown-8bit?q?_changed=2C_3_insertions=28+=29_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-0=2E2_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The Toshiba TC58NVG0S3HTA00 is detected with 64 byte OOB while the flash has 128 bytes OOB. This adds a static NAND ID entry to correct this. Tested on FRITZ!Box 7530 flashed with OpenWrt. Signed-off-by: Andreas Böhler --- drivers/mtd/nand/raw/nand_ids.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c index 6e41902be35f..d64adbd1ce6b 100644 --- a/drivers/mtd/nand/raw/nand_ids.c +++ b/drivers/mtd/nand/raw/nand_ids.c @@ -29,6 +29,9 @@ struct nand_flash_dev nand_flash_ids[] = { {"TC58NVG0S3E 1G 3.3V 8-bit", { .id = {0x98, 0xd1, 0x90, 0x15, 0x76, 0x14, 0x01, 0x00} }, SZ_2K, SZ_128, SZ_128K, 0, 8, 64, NAND_ECC_INFO(1, SZ_512), }, + {"TC58NVG0S3HTA00 1G 3.3V 8-bit", + { .id = {0x98, 0xf1, 0x80, 0x15} }, + SZ_2K, SZ_128, SZ_128K, 0, 4, 128, NAND_ECC_INFO(8, SZ_512), }, {"TC58NVG2S0F 4G 3.3V 8-bit", { .id = {0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08} }, SZ_4K, SZ_512, SZ_256K, 0, 8, 224, NAND_ECC_INFO(4, SZ_512) },