Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp298325rda; Sat, 21 Oct 2023 08:08:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHg/yiBGsgBNLXkrGHYcKLtDkGB0DJP02nshNVhDG0TrfszVBk1NfWyUMg1TthCYF9Zwq90 X-Received: by 2002:a05:6a20:8e26:b0:15b:2125:890f with SMTP id y38-20020a056a208e2600b0015b2125890fmr4593141pzj.37.1697900929019; Sat, 21 Oct 2023 08:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697900929; cv=none; d=google.com; s=arc-20160816; b=Uw29gSbIxlUDG3ct0RW2BqByBPeEd7/tmRbc+BZz3ohcEjLMUILzlUY6wfYR+5Naqu l+JGoBUQW+b+d0Pbq7FLqQvaL9HWHuYVM+wmbOj9bKC9juoHDChQLKl5bZB9nsY6mmAM FU76QKeB0BQClpDBjqynKsejSR9uElyGtOFWPLCFIUQlaPyxoVn+tM2Gcc/bOHjI7jMu UBzH+bl22K/kjpBFTmu346MXQ0t7XsjpbIaRqq9lKLIKQhZn1n6uZwujyyxSiLpSWn7H 06so8soKyrEZ6iZs26bSbKu8mBLc1JmM//jUz9DzE1oQTjXoqzEnNDRJTfAtMX7T5oh/ ffdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=4VuYS+aCqMRiqr9YKdMsndRTz9z+AbSpOtmlz4Iyquw=; fh=WMadBWVWyG2ERyPzTwoW9FDaB3/4COSTkuG6x+dZcss=; b=rN3pMbkPt+2gF8M4ycvwEMAjCjVh+2fV7lUQPpAQlM9aVQT3KrY1a4GqV1n4QXPt3v Q/E90Hm3mhqgPO2BZYBtHImvd2x1cWoRPxR0jMSguxcKABp/X7yU/pZIh0vZ1kC3zSIX finRIqKjC3Hfqkdbq0HcdpUIizDWHyd4CyZ26AVFLFSH5oC6xRoC8ylDczsQ1VZD2PHt aEVYI6/MtFKUh2Fggrj7dre2QvdPbrTAwavlHXsuPpSAeDm8WwkJS0+jdk/0xD+gdQyI R+JY3Vft153C/7KsNKh3t1KbWU0OLtbXXuFUnAMddIfxlG109sdhD19fJHp6KeDYs4n9 qRwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x4-20020a63db44000000b005897813623fsi3612905pgi.470.2023.10.21.08.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 08:08:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 33890804C1BF; Sat, 21 Oct 2023 08:08:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231546AbjJUPIk (ORCPT + 99 others); Sat, 21 Oct 2023 11:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbjJUPIj (ORCPT ); Sat, 21 Oct 2023 11:08:39 -0400 X-Greylist: delayed 331 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 21 Oct 2023 08:08:34 PDT Received: from mail-m155101.qiye.163.com (mail-m155101.qiye.163.com [101.71.155.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6B3DE3 for ; Sat, 21 Oct 2023 08:08:34 -0700 (PDT) Received: from Vostro-3710.lan (unknown [58.61.140.248]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 3D042800015; Sat, 21 Oct 2023 23:02:16 +0800 (CST) From: Chukun Pan To: Miquel Raynal Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Chukun Pan Subject: [PATCH 1/1] mtd: rawnand: add support for TH58NYG3S0HBAI4 NAND flash Date: Sat, 21 Oct 2023 23:02:12 +0800 Message-Id: <20231021150212.20509-1-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCGE5LVk8ZGExJHRgZGEIfHlUTARMWGhIXJBQOD1 lXWRgSC1lBWU5DVU1KVUpPS1VJT0NZV1kWGg8SFR0UWUFZT0tIVUpKS0hKQ1VKS0tVS1kG X-HM-Tid: 0a8b52c2226db03akuuu3d042800015 X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PSo6KSo*IjwxGEM1HzNICzgU DiEwCQtVSlVKTUJMQktLTkhNQk9IVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWU5D VU1KVUpPS1VJT0NZV1kIAVlBSkJCSDcG X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 21 Oct 2023 08:08:46 -0700 (PDT) The Toshiba TH58NYG3S0HBAI4 is detected with 128 byte OOB while the flash has 256 bytes OOB. This adds a static NAND ID entry to correct this. Tested on Arcadyan AW1000 flashed with OpenWrt. Signed-off-by: Chukun Pan --- 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 650351c62af6..2b871dfd1d09 100644 --- a/drivers/mtd/nand/raw/nand_ids.c +++ b/drivers/mtd/nand/raw/nand_ids.c @@ -58,6 +58,9 @@ struct nand_flash_dev nand_flash_ids[] = { { .id = {0xad, 0xde, 0x14, 0xa7, 0x42, 0x4a} }, SZ_16K, SZ_8K, SZ_4M, NAND_NEED_SCRAMBLING, 6, 1664, NAND_ECC_INFO(40, SZ_1K) }, + {"TH58NYG3S0HBAI4 8G 1.8V 8-bit", + { .id = {0x98, 0xa3, 0x91, 0x26, 0x76} }, + SZ_4K, SZ_1K, SZ_256K, 0, 4, 256, NAND_ECC_INFO(8, SZ_512) }, {"TH58NVG2S3HBAI4 4G 3.3V 8-bit", { .id = {0x98, 0xdc, 0x91, 0x15, 0x76} }, SZ_2K, SZ_512, SZ_128K, 0, 5, 128, NAND_ECC_INFO(8, SZ_512) }, -- 2.25.1