From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 D9EFB20B80B for ; Tue, 11 Aug 2026 12:48:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786452519; cv=none; b=kpBtsLcfpkNz1lwTj94q8vlBNwNEnDNNpp/uFcYHGO4y7IzSDD0p674E72P+d4wdVI9bgo9nbNXXYjh/mmuAOGO2qAHpIRNPGfpUw/HIYRNzmmhHDJ5E1txc2HlnLbs6iSUWihb9Rk+BuT3Ej0Vo17afXCGC68w85dSUoZER7Y0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786452519; c=relaxed/simple; bh=Fk/HuU06bPGpy5BUY8aBSisKsG8MkXVZB/aNDXZhEtw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gsVpCGlJitF0/Z9CGIa3+A/yCoubPTmfTyPo7UDi/pApH+FYUAJg7vjSq3/zTD4yzws6ymFta7JakIbPxfY/nLP3yfB8wTIU8de/SMBBj7gHgzC0JBAYxAvY4jU8aY1Oh8LqFFGAoTJ2BFxET8hDqK1Ysu7rQbK4J3EQqpCNX/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=i4Fc75uk; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=U1adYsF2; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="i4Fc75uk"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="U1adYsF2" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67BCRNMr3569291 for ; Tue, 11 Aug 2026 12:48:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= MFUElQSF/+cLBrb/jNB4ej8rEJOMy7YJ0vT4gBn3MwA=; b=i4Fc75ukXJyoIhJH 9Cm3fGOEdmjbQdnReQo7kRz8dGbQC7pM5oz+NEMR6CQQt2JcZmgAVdOxVyArJOUa /PFZ2IWY5Kxhb7m9Do4ybn83uHN7rIiN9H0n4V0hb9dIl7VEhCNFKIvHCBcgIJpy BhMsZHoZEmqPTztohk0zdtpZpuYBrZi5oPKJi9Vc5D6k0b0KW+coy3tXrOoetUKe Oq6tDGVkDQ1aTvxPtX59EN/TFy/JiU0YhzZ0hyFX8rgJFqjgjVdr5JKLgbDh9nAc c0N6Ipj5Y3hvBmtR/gFIkfk0UxvW0ZVIBxGLhEIPWp7SaRuJWZUYuOcuMOcKVK4x 4hVNjQ== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fyxwes8wb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 11 Aug 2026 12:48:36 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-84fa3b14ed2so873210b3a.1 for ; Tue, 11 Aug 2026 05:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786452515; x=1787057315; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=MFUElQSF/+cLBrb/jNB4ej8rEJOMy7YJ0vT4gBn3MwA=; b=U1adYsF2rL7eahYTaIJhlPsMft3PyDuRH9jmA9iq/kxknZbC6n7V90haEQ0ssktUnF NBM5eHUJa/RMtERyLbrK08u+iftqScpHBM28BBmKRXrIim3w1SHuSopj/TR6TLk/jb5q bCpsgZSnS6JS1ZJM2ZM2LtoSqAGsFzZq/T/DEKxe6bweUXWNWLmF2RIc9V5pjA8pj9VL +L77tGymgjdsk6OUAd7bLeqRaxijtEGAsPYR+5CgBlRKhUCkdlEz43fBus+6Nvnfjb7Z +WpJy7id7O8wTe1BN3TGUKbDuhfeqwR9rGTmElWAffQZvtOyhmbr0aXYk+1dJxeWdSLN A/Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786452515; x=1787057315; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=MFUElQSF/+cLBrb/jNB4ej8rEJOMy7YJ0vT4gBn3MwA=; b=L4wJfm21dIsQhUCvJGhxDn01CRBzRiW8Po8PGQktvDIKHijndUES8MvF4lkjUc7HER ryzCTh1v+34uMB118gYyXGLm3da7XVTrcUaf13UCzGh51vegnPgGKGYQ5XpPPTd/hyXJ 3ESMoUfwPMHBIdbfheqeAX++qPcg0wjGG9LWBJxYWAaf8qu5nZmyf7fZZeGSnmCpuepk Nbuu/P/WcfQ4T1VMVs8xpxyP4QTenhuGxPoDdMSHNs1IEUrJHHNvuj0OJ0E0XG60+kV3 bA09vvLBAWOxYJ0MlZFMadkqrhknk2AHWiIXSao8XLInMVe7Fo1stsqAOkY9yctGN4Wg V/ag== X-Forwarded-Encrypted: i=1; AHgh+Rpmpdqm6NmRGQO8KljoIgB49xkbYr4YqOMCvp/GL/UX3Lhk3wKn12ALhLpsr02x6KzLOjS0nDQJnguL51U=@vger.kernel.org X-Gm-Message-State: AOJu0YyExD/IL5iRrEmijUGXR+0FKdRmd0jIvNPoQt52kZpgwxdNj9jT DynwE9iSu5ppcm9qnJFcIB6h6e2bOEcEfX3KX/Aeri1BZdnCIUG/uPqJFUid9DhGsktrX+m0+uT 9SIm3xmyxutd1gCNnjLMJKAeXJz6HF4m/ie0RSnrSZbn3durg2acGo2vZpKHeqLOIRyQ= X-Gm-Gg: AR+sD100VBBHa60M9EADTw/KqTG8ozDTE9sbc8pfEC9haqcARY65VfPQVFECvI/bQ89 pjmbOgxfXRvEYAGhZEkLYdhbjJpdZF6ygGCwgpq20GOPLE/C5iou7DEg/WOwkPI/8oprgwNXd7G 7poEPFfETVV8JzBJcNeiveeV4zuQZCfxcLaixD6uC/Ya+VyqJyZVjTqLjwdTAD3Mawqvnyl3aj9 v67VqS4XhWdm8QF0mk4dPskVx+egcSMOwWahXD7LO9BDMCBjkeaOI0lRUqMrTS/5zDV7HAqd7Tn SZ8x7awCdRmp/upCCHAr1RREr6llKo144tKX77UD+KSyMw1RwBBnoB1NDvURJOog3fP0cAph9Ky F6voT0lexVXI1e6xyGFmrcUuaVcSLXdFlqQALODDmmgH5LrfgpWTzcbFyTXsvz3nnLxpCLqpARw p46wp+DxZJiJY= X-Received: by 2002:a05:6a21:3995:b0:3c3:f371:1ea9 with SMTP id adf61e73a8af0-3cc2b7cce46mr4205473637.10.1786452515200; Tue, 11 Aug 2026 05:48:35 -0700 (PDT) X-Received: by 2002:a05:6a21:3995:b0:3c3:f371:1ea9 with SMTP id adf61e73a8af0-3cc2b7cce46mr4205370637.10.1786452514594; Tue, 11 Aug 2026 05:48:34 -0700 (PDT) Received: from hu-mdalam-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1412035f9d8sm6696555c88.2.2026.08.11.05.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 05:48:34 -0700 (PDT) Date: Tue, 11 Aug 2026 18:18:27 +0530 From: Md Sadre Alam To: Miquel Raynal Cc: Dominique MARTINET , 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 Message-ID: References: <20260807064339.1632249-1-md.alam@oss.qualcomm.com> <20260807064339.1632249-2-md.alam@oss.qualcomm.com> <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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87mruuqh6f.fsf@bootlin.com> X-Proofpoint-GUID: 1gqjRTOjHzCoJ_cpF_lKbS4cM5d-2Z_E X-Authority-Analysis: v=2.4 cv=K8QS2SWI c=1 sm=1 tr=0 ts=6a7b1a24 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=8nJEP1OIZ-IA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=lLZmtIKjAAAA:8 a=VwQbUJbxAAAA:8 a=P-IC7800AAAA:8 a=ar1VmM8jAAAA:8 a=Q3Hh8UE4-bdW3S4IBIkA:9 a=3ZKOabzyN94A:10 a=wPNLvfGTeEIA:10 a=OpyuDcXvxspvyRM73sMx:22 a=q5Nj8NTjyn2D8kUwajRn:22 a=d3PnA9EDa4IxuAV0gXij:22 a=rFd2LkbIa9bXzCDub527:22 X-Proofpoint-ORIG-GUID: 1gqjRTOjHzCoJ_cpF_lKbS4cM5d-2Z_E X-Proofpoint-Spam-Info: AW1haW4tMjYwODExMDEwNiBTYWx0ZWRfX8fae/ZBhhlSo TsSEFYLuRCahEdVcfgRlF/J3W7nuaShkrZYeEpKR1xk7HqbylBLHcVwYuoTbtumAgZ6JvRhL03g WbUyM5IV2PtHo6igOtAJAH3ydAzVGtM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODExMDEwNiBTYWx0ZWRfXxXEEpjR4erco nevmOy8mLGBbsJBTTU3LRajb4crUoHXZVjnnUhHPYcmXxXS/4BtEoE6mqh6uobgRQLKaz6A89tS /CONkYwPpRzwogaF3GBMIEZCK+LkuYMHwE1LqDh2cf9FzV2AKK700wFVcOQp12dv5uzmIyzh5xt 8QC0i4wpb/ScSNkHR9wQ6zFHmCZLgKmM0WXsaK5MKXOCNY3zrRRnF2oFI90lPO1Q9306IuKmyPN XrDkNeYOYa8OsKU1xV72hxpSdHIqDkROz++x3HaG4UHyjRG9nQWEqKj2xcceAyGqi/byTdiEcw9 LX+VrIWu4acPfY1Em3RqgU81iXHShWoAxjPI26AEF+X/zMmUgCgSXGUAJ6NOFmuip9QgkPoby18 YoR06V/Qe5/Nfph03zf3f+Gjoxw8JWUZFdnZ2z6DMXn0LHGBfp26k8s1V38hadHItClaUFqoZIp HmWHuUb8KxVqfDcarhg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-11_02,2026-08-10_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 spamscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 phishscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608110106 On Mon, Aug 10, 2026 at 02:43:52PM +0200, Miquel Raynal wrote: > 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èl 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/W25N04LWZExx_W25N04LWTBxx_RevD_2025-08-05.pdf > > Thanks for all the feedback, Sadre, can you please propose an udpate > with these details and changes? I do not currently have access to this device, so I cannot properly validate an updated version on hardware. Given that the current patch needs the OOB size fixed to 256, and likely the OOB layout adjusted accordingly, I think it is better if Dominique sends his tested version. I am fine with him taking over this patch. > > > (And it also supports continuous read, so I'm curious to see if it'd > > work with the recent continous read support from Miquèl[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. I currently do not have access to this device to test continuous read, so please go ahead with the follow-up patch if you have hardware to validate it. Thanks, Alam.