Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1065488rda; Mon, 23 Oct 2023 00:55:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOOaaD8Z0of/e4TEVUWyf9ePt8bV8RaZ3KwjrGj+NdW/V5xUG1iCWc/BcDi30sgZVTZOtf X-Received: by 2002:a17:90a:aa8d:b0:27e:22b:dce5 with SMTP id l13-20020a17090aaa8d00b0027e022bdce5mr8308429pjq.27.1698047719350; Mon, 23 Oct 2023 00:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047719; cv=none; d=google.com; s=arc-20160816; b=v7wsgiBBted+9ooPRamP9vpBnoLbtd3zoizZZz8/kOPC1yq//Q6J1YT5y3sxSrPF7K KqpKjPgrqHni2gCr9KiT7/R9TVCMke3jZ6jvR40FMIgePweuTre3UBaeS66NlhMzMVax aJi434FDia/g8SERVZK0vcUrSCx90TMAGeDTVoq3YKw0b5xPxVbyBEJ4CBEWS520pDx/ o8gH3xycCLL7nMOSt3d8ixYTxRkL7WayPxqL+fENRHfbmty6gWpeWMP2t3rHE1hmNL2T mvGeaDmxWOkvX0cZqXmpKgBT7tAnGb/JqIMoKUlOEkWYz1c9gxNKTArNiU/RMQ5LzJe5 92fg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=9NG6Qfj/WvzlqK/Izjv2p/D3wthz19tmgf7a/knaCMY=; fh=CNpyf9BuEvhrwN+7dj2iTBXjjX9dUNGudm1OcJwgBOQ=; b=i/0kiuItyaPhuo/FtwWCQYgaPGLj6/G8eelUtMK0jV3xA0C2gctZVXMxO2rWvq6dce VPrYidvuWx3AKMeaFSwgmmJ7RBbpu/AvM2oiLskjbVg7Ex5BBrjdpb0CFjhlm6aH1h7n 6BAeiOdvbyrhmIVZrvMeib2Qfk7iRxduGFI7gWJLZdaWjqLnpJra/MiVNIUOVYGvro5U lgiyvNt51CnjHR6oodOtm9Ckc4reE/4VGlDYBRBjDqGpyY61Mu7d5c8GAWciwK73UvhN fnaviiLABhvelfalumUCGQ9nVOJNXMcwf2mmOQnajQBy+f8JaoPfyP5ObKcaeLqq4YaT hXTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hHX6svNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ng16-20020a17090b1a9000b0027d09fa3a9bsi6112393pjb.183.2023.10.23.00.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hHX6svNA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BC8E4807C874; Mon, 23 Oct 2023 00:55:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233608AbjJWHzA (ORCPT + 99 others); Mon, 23 Oct 2023 03:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233587AbjJWHy6 (ORCPT ); Mon, 23 Oct 2023 03:54:58 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9219A6 for ; Mon, 23 Oct 2023 00:54:56 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 17C761C0007; Mon, 23 Oct 2023 07:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1698047695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9NG6Qfj/WvzlqK/Izjv2p/D3wthz19tmgf7a/knaCMY=; b=hHX6svNA8O44ORGFy2KuHXQI6HdTd0ct3xmsyiM8tjvU2ri8O1qHdk0pwbAV7fuIn9Pz6C RwziQHjcpNNtAGFk7em7mLUJ35b+87AbB8bDSx2Dj3wH/uD03XrZlSrBiOnt75StPEIL+B pSzK9cOn4TSIESr1oPxIdeL7E9kuok8REOmlf3eu0EgyVvsyFfSGmnnMAWLsoAMOyw1Tfq CYJuEsi2gHRFfK+M8oikm52DRszFLnVJly31hzJ8BiWFht8Xj7SflSxEOUP671J+6SDWiv gHBV0jmOFJ601FDlEUD8CiAEDh8Gsw3T2cmDn7+lKcM0LlgGT+eNzjG2cm+aow== Date: Mon, 23 Oct 2023 09:54:51 +0200 From: Miquel Raynal To: Chukun Pan Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] mtd: rawnand: add support for TH58NYG3S0HBAI4 NAND flash Message-ID: <20231023095451.65c4c0ec@xps-13> In-Reply-To: <20231021150212.20509-1-amadeus@jmu.edu.cn> References: <20231021150212.20509-1-amadeus@jmu.edu.cn> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:55:15 -0700 (PDT) Hi Chukun, amadeus@jmu.edu.cn wrote on Sat, 21 Oct 2023 23:02:12 +0800: > 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. Any way you can detect this and fix the parameter page at run time instead? > Tested on Arcadyan AW1000 flashed with OpenWrt. >=20 > Signed-off-by: Chukun Pan > --- > drivers/mtd/nand/raw/nand_ids.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > 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[] =3D { > { .id =3D {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 =3D {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 =3D {0x98, 0xdc, 0x91, 0x15, 0x76} }, > SZ_2K, SZ_512, SZ_128K, 0, 5, 128, NAND_ECC_INFO(8, SZ_512) }, Thanks, Miqu=C3=A8l