From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62E9B3B27E7 for ; Mon, 10 Aug 2026 12:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786365853; cv=none; b=P7TLWT+r42+IG75qbqYwTYGptO+dP4J5e/YNigqgLXPCSbj7ytNMS7/tBAZN4+9xzpdwqp8enDWTXpCZbTBG6W0YFbW5ToE6NJYlKpMSQMtckXkN0edasKJ2/PJJRfUlWGFUvm+zwpzOWiexbtBm/VOr5z3Qjcip8d9VE51JSIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786365853; c=relaxed/simple; bh=kEL0F0Qqkv2ZC2BHbJ2UJ1jT5pDd8Ge88hVNZO0GO+E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JCU8QEr/hO7VCYumUupaiIW2f69mOWIh9CGKRYy42v6K2ihsYHV5a704xUNeLw42LwfG1H/vBASvvnBu2wacYD0/uxPzcEaSSslSKvq16s/Ut/I20CKxkMznkA/Pa3XjgMQnFywVvSx+kv0ZS2T9TZtlwNe4qHenpDLsYr3JMOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=KwcdlRk/; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="KwcdlRk/" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id BCD811A152A; Mon, 10 Aug 2026 12:44:10 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 901B26033B; Mon, 10 Aug 2026 12:44:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 08E6111C4A544; Mon, 10 Aug 2026 14:43:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786365848; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=kuddQJCPQ9+RgCTheiPwlqc000JoApsk76gda+ZHiC0=; b=KwcdlRk/VuRD4S4Lk7wbP/Pfi6gDlzBK/JkM05Ts99gZhRmwjlyNZALfw+E7WyM8WG5hp5 41QjgqIbkm1ADEdvVGD4X9Km36MOkGUNsV1+uSTzhKn16OuO/6+3Z92BiqbYa2yNKHeW2S UGhbgdylf9NuuxDak5GjSNUO90/N4YgUpbC6/xJ4MdqU7ciinzyWb+tbamj9+kJAt9oW0M /NfD9Z/1J5uHEGFF5V8lPbeUmbw9zArJ0x9oS3CcBIbeGaNk7h/TzZZ+Q9loGSCB/f+ne0 zvjFTcvCVRrGuKtAdojG3ZYZAI+aF5+MJp99dEZXgT51USEl1pWj4Raag6et/Q== From: Miquel Raynal To: Dominique MARTINET Cc: Md Sadre Alam , richard@nod.at, vigneshr@ti.com, tudor.ambarus@linaro.org, s-k6@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, varadarajan.narayanan@oss.qualcomm.com Subject: Re: [PATCH 1/2] mtd: spinand: winbond: add support for W25N04LW In-Reply-To: (Dominique MARTINET's message of "Mon, 10 Aug 2026 17:28:32 +0900") References: <20260807064339.1632249-1-md.alam@oss.qualcomm.com> <20260807064339.1632249-2-md.alam@oss.qualcomm.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Mon, 10 Aug 2026 14:43:52 +0200 Message-ID: <87mruuqh6f.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi Dominique, On 10/08/2026 at 17:28:32 +09, Dominique MARTINET wrote: > Md Sadre Alam wrote on Fri, Aug 07, 2026 at 12:13:38PM +0530: >> Add support for Winbond W25N04LW 4Gbit SPI-NAND. >> It has 8-bit on-die ECC and a 4096+256 byte page >> (4096 byte main area, 128 byte usable OOB once >> on-chip ECC hides the 128 byte parity area), >> organized as 2048 blocks of 64 pages each, unlike >> the existing 2048 byte page W25N04KV/W25N04KW parts. > > This is pretty good timing, I was just looking at sending a patch for > W25N04LW myself! > > I agree with Miqu=C3=A8l that your patch looks odd, you wrote >> + NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1), > but the erase blocks are 256K long so it should be > + NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1), > > did you actually test this device? > > If it helps, the datasheet for W25N04LWZExx / W25N04LWTBxx is freely > available from digikey here[1] > [1] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/7182/W25= N04LWZExx_W25N04LWTBxx_RevD_2025-08-05.pdf Thanks for all the feedback, Sadre, can you please propose an udpate with these details and changes? > (And it also supports continuous read, so I'm curious to see if it'd > work with the recent continous read support from Miqu=C3=A8l[2] merged in > 7.2... I'm not familiar with the subsystem so will need a bit of time to > plug all the hooks in properly) > [2] > https://lore.kernel.org/linux-mtd/20260429-winbond-v6-18-rc1-cont-read-v3= -0-0f38b3c229ad@bootlin.com/ If it has continuous read, it requires the flag and a hook to enable/disable the feature. The existing Winbond helper may already be enough for it. You can test it with a recent version of mtd-utils, I added options to nanddump, nandbiterrs and flash_speed for that. If Sadre dooesn't do it, you can propose a follow-up patch. Thanks, Miqu=C3=A8l